Commit 448690fc authored by Vincent Fourmond's avatar Vincent Fourmond

Imported Upstream version 0.6.0

parents
This diff is collapsed.
May 17 2002 Bruce Ravel <ravel@phys.washington.edu>
* gnuplot.el: Version 0.5r
* handle continuation lines better
* C-c C-c now for comment region, C-c C-o for GUI
* trim gnuplot buffer + customize vble controlling max buffer
length
* Altered Makefile.in to install .el files along with .elc
files
May 30 2001 Bruce Ravel <ravel@phys.washington.edu>
* gnuplot.el: Version 0.5q
* added font-lock bindings for words associated with plotting
Apr 15 2001 Bruce Ravel <ravel@phys.washington.edu>
* gnuplot.el: Version 0.5p
* fixed the fix for the serious bug in how speedbar and
gnuplot-mode interact. In the words of Bullwinkle, "This
time for sure!"
Jan 4 2001 Bruce Ravel <ravel@phys.washington.edu>
* gnuplot.el: Version 0.5n
* fixed a serious bug in how speedbar and gnuplot-mode
interact
Nov 29 2000 Bruce Ravel <ravel@phys.washington.edu>
* gnuplot.el: Version 0.5m
* much better algorithm for determining gnuplot version number
* add colorization and gui support for new commands in 3.8.
* gui support for emf term.
* gui support for new "set style" syntax.
Nov 16 2000 Bruce Ravel <ravel@phys.washington.edu>
* gnuplot.el: Version 0.5l
* support for pm3d in gnuplot-gui and in plot options
insertions menu.
* mentioned pm3d in gpelcard.
* `gnuplot-negate-option' works with new syntax
Sep 22 1999 Bruce Ravel <ravel@phys.washington.edu>
* gnuplot.el: Version 0.5k
* make `gnuplot-send-line-and-forward' skip over blank and
comment lines as suggested by <SE>.
* Jan 10 2000 Bound C-c C-j to `gnuplot-forward-script-line'.
Sep 9 1999 Bruce Ravel <ravel@phys.washington.edu>
* gnuplot.el: Version 0.5j
* Do a more robust check for the gnuplot process before
killing the gnuplot buffer, as suggested by <SE>.
Sep 2 1999 Bruce Ravel <ravel@phys.washington.edu>
* gnuplot.el: Version 0.5i
* Once again changed how `comint-process-echos' gets set.
Maybe I got it right this time?
* Also fixed certain situations where the info file did not
get properly loaded (insertion with info toggle on and info
button in GUI).
Aug 15 1999 Bruce Ravel <ravel@phys.washington.edu>
* gnuplot.el: Version 0.5h
* Added `gnuplot-determine-gnuplot-version' so that the
gnuplot version number and `comint-process-echos' actually
get set correctly. Actually, the first time something is
plotted, the echoing might not work, but the second time it
will.
May 27 1999 Bruce Ravel <ravel@phys.washington.edu>
* gnuplot.el: Version 0.5g
* fixed a bug in XEmacs in the font-locking rules for comments
and strings
* figure out what version of gnuplot is being run by reading
the Gnuplot start-up message and set
gnuplot-echo-command-line-flag appropriately
* fixed a bug which made gnuplot-mode fail when font-lock was
not a feature
May 15 1999 Bruce Ravel <ravel@phys.washington.edu>
* gnuplot.el: Version 0.5f
* include pgnuplot.c and installation instructions for Windows
95 and 98
* allow user to defer parsing info file so that gnuplot-mode
starts up faster
Apr 6 1999 Bruce Ravel <ravel@phys.washington.edu>
* gnuplot.el: Version 0.5e
* drop gnuplot-which-highlight variable but still make sure
colorization works under emacs, xemacs, font-lock, and
hilit19
* insert a space at the end of a unique completion
* fixed completion in file widget in GUI
* primitive support for plot, splot, fit in gui.
* rewrote a lot of GUI code
Mar 21 1999 Bruce Ravel <ravel@phys.washington.edu>
* gnuplot.el: Version 0.5d
* use installation materials provided by Lars Hecking,
maintainer of gnuplot itself
* added some GUI support for hidden3d
* various improvements to the types alists used by the GUI
* improved various document strings and the bug reporter function
Feb 15 1999 Bruce Ravel <ravel@phys.washington.edu>
* gnuplot.el: Version 0.5c
* update copyright information and gpelcard.tex
Jan 28 1999 Bruce Ravel <ravel@phys.washington.edu>
* gnuplot.el: Version 0.5b
* fixed a bug in gnuplot-kill-gnuplot-buffer
* fixed a bug in gnuplot-plot-from-comint
* fixed the description of the gnuplot-faces customization group
Jan 23 1999 Bruce Ravel <ravel@phys.washington.edu>
* gnuplot.el: Version 0.5a
* send file to gnuplot now uses the "load" command
* can plot scripts from the comint buffer using
gnuplot-plot-from-comint or
gnuplot-save-and-plot-from-comint.
* C-d in comint buffer is more graceful
Dec 27 1998 Bruce Ravel <ravel@phys.washington.edu>
* gnuplot.el: Version 0.5
* preliminary version of interactive graphical system for
setting command arguments
* make changes to insertion menu and to gnuplot-insert
function to accomodate GUI system
* made gnuplot-negate-option function and bound it to C-c C-n
* replace kw-compl with a simple completion function
* transparent icons in toolbar
* move toolbar code into gnuplot.el
Dec 15 1998 Bruce Ravel <ravel@phys.washington.edu>
* gnuplot.el: Version 0.4f
* defcustom all the insertion submenus
* added gnuplot-insertion-menu-flag
* Makefile now knows how to determine which version of
info-look to compile
Dec 13 1998 Bruce Ravel <ravel@phys.washington.edu>
* gnuplot.el: Version 0.4e
* deal with the many versions of info-look in the Makefile
* drop install-gnuplot
* break insertions menu up into several variables and put
menubar initialization into a function
Dec 9 1998 Bruce Ravel <ravel@phys.washington.edu>
* gnuplot.el: Version 0.4d
* added function gnuplot-setup-info-look and hook variable
gnuplot-info-hook to handle situation of different versions
of the info file.
Nov 30 1998 Bruce Ravel <ravel@phys.washington.edu>
* gnuplot.el: Version 0.4c
* fixed frame behavior
* fixed comint highlighting behavior
* added :link to defgroup. added "[:]" to range insertions
* fixed behavior of filename insertion function
* added more :link's to the defgroup
* edited Makefile and README file in the distribution, added
dot.el to the distribution to suppress compile-time
warnings
Nov 21 1998 Bruce Ravel <ravel@phys.washington.edu>
* gnuplot.el: Version 0.4b
* Fix bug in line plotting function when line is empty
* Add toolbar for XEmacs and file gnuplot-toolbar.el
* Allow display of gnuplot process in a separate frame
Nov 18 1998 Bruce Ravel <ravel@phys.washington.edu>
* gnuplot.el: Version 0.4a
* clean up useless buffers left lying around by info-look
* Fix font-lock rules so that quoted words and the text
surrounding them are correctly highlighted
* Fix font-lock rules for plot and splot
* Added function `gnuplot-send-line-and-forward' and bound it to
C-c C-v. Mention this in gpelcard
Nov 14 1998 Bruce Ravel <ravel@phys.washington.edu>
* gnuplot.el: Version 0.4
* Added info-look to distribution. It was taken from the emacs
20.2 installation and one small change was made to allow
it compile under XEmacs.
* Use info-look for info interface. With this the gnuplot-mode
user interface to the gnuplot info file does not change
but the interior code is much cleaner and I get to use an
already invented wheel. One nice feature is that the help
function is completely independent of the version number of
gnuplot as long as the index in the gnuplot.info file is
called "General Index". Also `gnuplot-keywords' (which is
used for help, keyword-completion, and hilit19 highlighting)
is now generated automatically the first time gnuplot mode
is invoked.
* Changed default of `gnuplot-show-help-flag' to nil.
Earlier versions (taken from gnuplot.el file)
0.1 Jun 25 1998 Finished with initial release.
0.2 Sep 4 1998 Added filename insertion, indentation, and
colorization/completion in comint buffer. <BR>
0.2a Sep 11 1998 made `indent-line-function' buffer-local (whoops!)
and fixed some stuff in the installation script <BR>
0.3 Sep 12 1998 include insertions menu <BR>
0.3a Sep 14 1998 fixed bug finding info file if missing, fixed bug
starting font-lock, fixed bug re overwriting files in
installation script <BR>
0.3b Sep 15 1998 Added (require 'info) to `(eval-and-compile' clause,
Added (kill-all-local-variables) to `gnuplot-mode', altered order
of:-
(provide 'gnuplot)
;; any final chores before leaving
(run-hooks 'gnuplot-load-hook)
at the end of the file in case something in the load hook
requires gnuplot (oh not that old one again...), added
`gnuplot-comint-setup-hook', corrected `gnuplot-mark-active'
which caused an error to be raised by (mark) when the mark
was inactive <DB> Some changes to font-lock rules <LB>&<BR>
To install gnuplot-mode:
1. At the command line:
> configure
> make
If you use XEmacs, do "make EMACS=xemacs" (or change the EMACS
variable to "xemacs" in the Makefile, the run "make").
If "configure" doesn't work for you, the file "Makefile.dst" can be
used. In that case do, "make -f Makefile.dst".
2. Move the .elc files to a place where emacs can find them, for
example /usr/share/emacs/site-lisp or your personal emacs
directory.
3. Insert the contents of the `dotemacs' file into your .emacs file
or system start-up file to enable gnuplot mode.
4. The function `gnuplot-info-lookup-symbol' looks at the Gnuplot
info file that comes with this package or that can be made from
the Gnuplot distribution. For that function to work, the file
gnuplot.info must be placed somewhere where info can find it, for
example /usr/info. A line like this in your .emacs allows you to
put gnuplot.info any place convenient:
(add-to-list 'Info-default-directory-list "/path/to/file")
The "configure; make" sequence may not work on all systems,
particularly Win32 systems. The long-winded way of making the .elc
gpelcard.ps files is to edit each of the .el files with emacs and do
`M-x byte-compile-file'. Then "latex gpelcard.tex" and
"dvips gpelcard.dvi".
You will need to follow the instructions contained in the file
Win9x/INSTALL.Win9x to get gnuplot working with Emacs on a Windows 95
or 98 machine.
Problems? Contact gnuplot-mode's author Bruce Ravel
<ravel@phys.washington.edu>
## set this variable to "xemacs" if you use XEmacs
EMACS = emacs
## You will probably not need to change anything below this line
BYTE = $(EMACS) -batch -q -no-site-file -l dot.el -f batch-byte-compile
.PHONY: all default clean
default:
$(MAKE) info-look.elc gnuplot.elc gnuplot-gui.elc
gnuplot.elc: gnuplot.el
$(BYTE) gnuplot.el
gnuplot-gui.elc: gnuplot-gui.el
$(BYTE) gnuplot-gui.el
## There are many possibilities for info-look:
##
## EMACS version use
## -----------------------------------------
## Emacs or XEmacs 19 info-look.20.2.el
## Emacs 20.2 or less info-look.20.2.el
## Emacs 20.3 nothing
## XEmacs 20+ info-look.20.3.el
##
## want to use my modified version even if 20.2 is installed because a
## bug is fixed
##
## the first 6 lines attempt to ascertain the version number of
## $(EMACS), then multiply by 100 to convert it to an integer for the
## sake of the integer comparisons in the following lines. Is this a
## hassle, or what?!
##
MESSAGE = compiling info-look for $(EMACS) $$vnum
info-look.elc: info-look.20.2.el info-look.20.3.el
@if [ $(EMACS) = "emacs" ]; \
then vnum=`emacs --version | grep 'Emacs [12]' | awk '{print $$3}'`; \
else vnum=`xemacs --version | grep 'Emacs [12]' | awk '{print $$2}'`; \
fi; \
vn=`echo "$$vnum" | awk 'BEGIN{FS="."}{print $$1 "." $$2}'`; \
version=`echo "$$vn" | awk '{print 100*$$1}'`; \
if [ $(EMACS) = "emacs" -a $$version -ge 2030 ]; \
then echo "no need to compile info-look for $(EMACS) $$vnum"; \
else echo "$(MESSAGE)"; \
fi; \
if [ $(EMACS) = "emacs" -a $$version -lt 2030 ]; \
then cp -v info-look.20.2.el info-look.el; \
elif [ $(EMACS) = "xemacs" -a $$version -ge 2000 ]; \
then cp -v info-look.20.3.el info-look.el; \
elif [ $(EMACS) = "xemacs" -a $$version -lt 2000 ]; \
then cp -v info-look.20.2.el info-look.el; \
fi ;\
if [ ! \( $(EMACS) = "emacs" -a $$version -ge 2030 \) ]; \
then $(BYTE) info-look.el; fi;
gpelcard.ps: gpelcard.dvi
dvips -o gpelcard.ps gpelcard.dvi
gpelcard.dvi: gpelcard.tex
latex gpelcard.tex
all:
$(MAKE) gnuplot.elc info-look.elc gnuplot-gui.elc gpelcard.ps
clean:
rm -f *.elc info-look.el gpelcard.dvi gpelcard.log gpelcard.aux
##----------------------------------------------------------------------
## old stuff:
## from the `all' and `default' targets:
# gnuplot-toolbar.elc kw-compl.elc
#kw-compl.elc: kw-compl.el
# $(BYTE) kw-compl.el
## only make this for XEmacs
#gnuplot-toolbar.elc: gnuplot-toolbar.el
# if [ $(EMACS) = "xemacs" ]; then $(BYTE) gnuplot-toolbar.el; fi
#
# Makefile.in for gnuplot-mode
#
# Based on original Makefile
# by Lars Hecking <lhecking@nmrc.ucc.ie> 1999-02-25
#
# Modified to install .el files along with .elc files
# BR May 17 2002
SHELL = /bin/sh
prefix = @prefix@
datadir = @datadir@
lispdir = @lispdir@
srcdir = @srcdir@
subdir = lisp
top_builddir = .
top_srcdir = @top_srcdir@
@SET_MAKE@
EMACS = @EMACS@
MAKEINFO = @MAKEINFO@
LATEX = latex
DVIPS = dvips
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
VPATH = @srcdir@
# Command to byte-compile
BYTEC = $(EMACS) -batch -q -no-site-file -l $(srcdir)/dot.el -f batch-byte-compile
ELCS = info-look.elc gnuplot.elc gnuplot-gui.elc
DIST_COMMON = ChangeLog Makefile.dst Makefile.in README aclocal.m4 configure \
configure.in
EXTRA_DIST = dot.el dotemacs gnuplot-gui.el gnuplot.el gnuplot.el.old \
gpelcard.tex info-look.20.2.el info-look.20.3.el
DISTFILES = $(DIST_COMMON) $(EXTRA_DIST)
default: $(ELCS)
gnuplot.elc: gnuplot.el
test "$(srcdir)" = "$(top_builddir)" || cp $(srcdir)/gnuplot.el .
$(BYTEC) gnuplot.el
gnuplot-gui.elc: gnuplot.elc gnuplot-gui.el
test "$(srcdir)" = "$(top_builddir)" || cp $(srcdir)/gnuplot-gui.el .
$(BYTEC) gnuplot-gui.el
## There are many possibilities for info-look:
##
## EMACS version use
## -----------------------------------------
## Emacs or XEmacs 19 info-look.20.2.el
## Emacs 20.2 or less info-look.20.2.el
## Emacs 20.3 nothing
## XEmacs 20+ info-look.20.3.el
##
## want to use my modified version even if 20.2 is installed because a
## bug is fixed
##
## the first 6 lines attempt to ascertain the version number of
## $(EMACS), then multiply by 100 to convert it to an integer for the
## sake of the integer comparisons in the following lines. Is this a
## hassle, or what?!
##
MESSAGE = compiling info-look for $(EMACS) $$vnum
info-look.elc: info-look.20.2.el info-look.20.3.el
@if [ $(EMACS) = "emacs" ]; \
then vnum=`emacs --version | grep 'Emacs [12]' | awk '{print $$3}'`; \
else vnum=`xemacs --version | grep 'Emacs [12]' | awk '{print $$2}'`; \
fi; \
vn=`echo "$$vnum" | awk 'BEGIN{FS="."}{print $$1 "." $$2}'`; \
version=`echo "$$vn" | awk '{print 100*$$1}'`; \
if [ $(EMACS) = "emacs" -a $$version -ge 2030 ]; \
then echo "no need to compile info-look for $(EMACS) $$vnum"; \
else echo "$(MESSAGE)"; \
fi; \
if [ $(EMACS) = "emacs" -a $$version -lt 2030 ]; \
then echo Using info-look.20.2.el; \
cp $(srcdir)/info-look.20.2.el info-look.el; \
elif [ $(EMACS) = "xemacs" -a $$version -ge 2000 ]; \
then echo Using info-look.20.3.el; \
cp $(srcdir)/info-look.20.3.el info-look.el; \
elif [ $(EMACS) = "xemacs" -a $$version -lt 2000 ]; \
then echo Using info-look.20.2.el; \
cp $(srcdir)/info-look.20.2.el info-look.el; \
fi ;\
if [ ! \( $(EMACS) = "emacs" -a $$version -ge 2030 \) ]; \
then $(BYTEC) info-look.el; fi;
ps: gpelcard.ps
gpelcard.ps: gpelcard.dvi
$(DVIPS) -o gpelcard.ps gpelcard.dvi
gpelcard.dvi: gpelcard.tex
$(LATEX) $(srcdir)/gpelcard.tex
all: gnuplot.elc info-look.elc gnuplot-gui.elc
install:
mkinstalldirs $(lispdir)
@for p in *.el *.elc; do \
echo " $(INSTALL_DATA) $$p $(lispdir)/$$p"; \
$(INSTALL_DATA) $$p $(lispdir)/$$p; \
done
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
subdir = lisp
distdir: $(DISTFILES)
distdir=`cd $(distdir) && pwd`
@for file in $(DISTFILES); do \
d=$(srcdir); \
if test -d $$d/$$file; then \
cp -pr $$d/$$file $(distdir)/$$file; \
else \
test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|| cp -p $$d/$$file $(distdir)/$$file || :; \
fi; \
done
check-am: all-am
check: check-am
installcheck-am:
installcheck: installcheck-am
install-exec-am:
install-exec: install-exec-am
.PHONY: tags distdir info-am info dvi-am dvi check check-am \
installcheck-am installcheck install-exec-am install-exec \
install-data-am install-data install-am install uninstall-am uninstall \
all-redirect all-am all installdirs mostlyclean-generic \
distclean-generic clean-generic maintainer-clean-generic clean \
mostlyclean distclean maintainer-clean
clean:
-rm -f *.elc info-look.el gpelcard.ps gpelcard.dvi gpelcard.log \
gpelcard.aux
test "$(srcdir)" = "$(top_builddir)" || rm -f gnuplot.el gnuplot-gui.el
distclean: clean
rm -f Makefile config.status config.log config.cache
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
This directory contains files for running Gnuplot from within emacs.
This package was assembled by Bruce Ravel <ravel@phys.washington.edu>.
See http://feff.phys.washington.edu/~ravel/gnuplot/ for the latest.
Contents
========
README this file
INSTALL thorough installation instructions
ChangeLog a log of changes by version number
gnuplot.el gnuplot mode for emacs
gnuplot-gui.el a GUI for setting command arguments interactively
info-look.20.2.el programmer's interface to info files, old version
info-look.20.3.el programmer's interface to info files, new version
dot.el a short lisp file used by the Makefile
gnuplot.info info version of gnuplot 3.6 help
gpelcard.tex quick reference card for gnuplot mode (latex)
gpelcard.ps
dotemacs example .emacs lines for enabling gnuplot mode
Makefile.in \
Makefile.dst \
aclocal.m4 \ files inherited from the gnuplot distribution
configure } for making gnuplot-mode
configure.in /
install-sh /
mkinstalldirs /
Win9x/INSTALL.Win9x Extra installation instructions for Windows 95/98
Win9x/pgnuplot.c Program required to run gnuplot from Emacs
Soon gnuplot-mode will be included with the gnuplot 3.7 distribution.
The installation instructions for the free-standing distribution have
been modified to be consistent with that.
Installation
============
1. Unpack the gnuplot.tar.gz and cd to the gnuplot directory.
2. Type "configure". If configure doesn't work for you, see note 7
below.
3. Run "make". If you use XEmacs, run "make EMACS=xemacs" (or change
the EMACS variable to "xemacs" in the Makefile, the run "make").
4. Move the lisp files to the system site_lisp directory if you are
installing as root. If you are installing as a normal user move
the .elc files to a place where emacs, i.e. your personal emacs
directory.
5. Insert the contents of the `dotemacs' file into your .emacs file
or into the system's emacs start-up file to enable gnuplot mode.
6. The function `gnuplot-info-lookup-symbol' looks at the Gnuplot
info file that comes with this package or that can be made from
the Gnuplot distribution. For that function to work, the file
gnuplot.info must be placed somewhere where info can find it, for
example /usr/info. A line like this in your .emacs allows you to
put gnuplot.info any place convenient:
(add-to-list 'Info-default-directory-list "/path/to/file")
Wouldn't it be //great// if Emacs had some kind of systematized package
installing facility? I think so, too! Oh well....
NOTES
=====
1. gnuplot-mode is designed for use with version 3.7 of gnuplot. It
should work very well with any of the 3.6 beta versions. Only some
of the specialized features will not work with version 3.5 -- the
GUI interface to setting command arguments is an example.
2. To use gnuplot-mode with Emacs on Windows 95 or 98 see the
instructions in the directory Win9x.
3. The installation materials used by gnuplot-mode come from the
gnuplot distribution.
4. If "configure" doesn't work for you, the file "Makefile.dst" can be
used. In that case do, "make -f Makefile.dst" and carry on from
there.
5. If you do not have the custom library installed, you will get
several harmless warnings when compiling gnuplot.el. Most of
gnuplot-mode will work even without the custom library installed.
6. The file info-look.el provides the on-line help functionality.
Without it, things like on-line help and keyword completion will
not work. Using a tool that is a standard part of Emacs is a good
idea, but this one gets complicated. This file became part of
Emacs with version 20. It changed between 20.2 and 20.3. And it
does not come with XEmacs. What's more, the version from 20.2 has
a bug and the newer version does not work with Emacs 19. So, this
distribution comes with two versions of info-look.el, the version
from Emacs 20.2 patched to work correctly and the version from
Emacs 20.3. Here's what happens when you run make:
a. If you use Emacs 19 or XEmacs 19, then the Makefile will
compile the 20.2 version.
b. If you use Emacs 20.2 or lower, the Makefile will compile the
20.2 version.
c. If you use XEmacs 20 or higher, the Makefile will compile the
20.3 version.
d. If you use Emacs 20.3 or higher, the Makefile won't compile any
version.
7. The gnuplot-mode distribution comes with the version of the gnuplot
info file that gets made by gnuplot 3.7. Use it rather than the
old one. If you really must use the older info file, see the
document string for the variable `gnuplot-info-hook'. If you
already have the info file installed on your computer, you will not
need the one that comes with gnuplot-mode.
8. The interactive graphical graphical interface to setting command
arguments contained in gnuplot-gui.el is experimental. It is
incomplete and may make mistakes. Hopefully, you will find it
useful. It *requires* that you are using a version of emacs with
the widget library installed or that you have installed it
yourself. Version numbers in the 20's of Emacs and XEmacs ship
with the widget library. For version numbers in the 19's, it can
be obtained at http://www.dina.kvl.dk/~abraham/custom/
Time-stamp: <1999-05-15 11:29:23 bruce>
This file describes how to install gnuplot-mode on a Windows 95 or 98
system so that you may use Gnuplot from within Emacs.
Gnuplot-mode was written by Bruce Ravel <ravel@phys.washington.edu>.
Contact him with any questions or comments regarding gnuplot-mode.
For questions or comments regarding Emacs or Gnuplot, contact the
authors of those programs.
------O------
Gnuplot-mode and Gnuplot can be used with Emacs on a Windows 95 or 98
system, although a small amount of additional effort will be required
to get everything working.
The best solution is to install a sufficiently recent version of
Gnuplot which includes the ability to run as a child process (as of
May 15 1999 there is no such version). A more complete description of
this is attached to the end of this document. Recent versions of
Gnuplot can be found at ftp://ftp.gnuplot.vt.edu/pub/gnuplot/
If you install a very recent version of gnuplot which includes the
ability to run as a child process, then the installation
instructions for gnuplot-mode are much simpler. After following
the normal installation instructions, just add the following line
to your Emacs initialization file:
(add-hook 'gnuplot-load-hook
'(lambda ()
(setq gnuplot-program
"c:/path/to/pgnuplot/pgnuplot.exe")))
Replace "c:/path/to/pgnuplot/pgnuplot.exe" with the full path to
pgnuplot on your computer.
You can make gnuplot work even with an older version of Gnuplot for
Windows by following these steps:
1. Edit the file pgnuplot.c so that the variable FULLPATH at line 5
is pointing at the actual location of the Gnuplot executable on
your computer.
2. Using any C compiler, compile pgnuplot.c to pgnuplot.exe
3. Byte-compile gnuplot.el and gnuplot-gui.el as described in the
INSTALL file in the main gnuplot-mode directory. Make sure the
.elc files a placed in a location where Emacs knows to look,
i.e. in its load-path. You can add new directories to the
load-path by placing the following line near the top of your
Emacs initialization file (.emacs or _emacs):
(setq load-path (append (list "c:/path/to/lisp/files")
load-path))
4. Add these lines to your Emacs initialization file (.emacs or
_emacs):
(autoload 'gnuplot-mode "gnuplot"
"gnuplot major mode" t)
(autoload 'gnuplot-make-buffer "gnuplot"
"open a buffer in gnuplot-mode" t)
(setq auto-mode-alist (append '(("\\.gp$" . gnuplot-mode))
auto-mode-alist))
(global-set-key [(f9)] 'gnuplot-make-buffer)
(add-hook 'gnuplot-load-hook
'(lambda ()
(setq gnuplot-program
"c:/path/to/pgnuplot/pgnuplot.exe")))
The last line is very important. It tells Emacs to launch
pgnuplot.exe as its subprocess rather than Gnuplot itself. The
first four lines are explained in the comments near the
beginning of gnuplot.el.
Replace "c:/path/to/pgnuplot/pgnuplot.exe" with the full path to
pgnuplot on your computer.
------O------
Resources:
Emacs for Windows NT/9x:
http://www.cs.washington.edu/homes/voelker/ntemacs.html
The Gnuplot distribution site (includes Windows executables):
ftp://ftp.gnuplot.vt.edu/pub/gnuplot/
The gnuplot-mode homepage:
http://feff.phys.washington.edu/~ravel/gnuplot/
Cygwin, Unix tools for Windows NT/9x:
http://sourceware.cygnus.com/cygwin/
------O------
What follows are the comments of the author of pgnuplot.c,
Hans-Bernhard Broeker, describing the function and need for this
program.
Thu, 11 Feb 1999
Here's the tiny program I came up with to fix the single most
annoying problem specific to the Windows version of gnuplot: lack
of support for piping commands into it via STDIN.
For those who don't know the context: Windows GUI programs like
wgnuplot do not have any access to the usual I/O channels stdin and
stdout. So the usual method to allow gnuplot to run as a child
application, being controlled via a command stream by another one
(i.e. the classical 'popen("gnuplot", "w");' method), can not work
on Windoze.
It's implemented as a separate Win32 console application (that's a
different kind of program, which cannot display GUI windows, but
does have STDIN/STDOUT channels). This program will get hold of a
running wgnuplot (or start one itself, passing on any command line
arguments), and deliver each character it sees on its own standard
input stream as a keypress message to the command window of
wgnuplot.
Effectively, this makes 'pgnuplot.exe' an almost 100% complete
replacement of wgnuplot.exe, as far as starting the program is
concerned, but adding the stdin capabilities. A different way of
seeing it is as a prototype of a general application that wants to
run wgnuplot as a child process.
#include <windows.h>
/* You MUST change the value of FULLPATH to the actual location of the