This directory contains files for running Gnuplot from within emacs. This package was assembled by Bruce Ravel <[email protected]>. See the homepage at http://xafs.org/BruceRavel/GnuplotMode
| File | Description |
|---|---|
| README.org | this file |
| INSTALL | thorough installation instructions |
| gnuplot.el | gnuplot mode for emacs |
| gnuplot-gui.el | a GUI for setting command arguments interactively |
| gnuplot-context.el | context-sensitive completion and help lookup |
| dot.el | a short lisp file used by the Makefile |
| gnuplot.info | info version of gnuplot 4.6 help |
| gpelcard.tex | quick reference card for gnuplot mode (latex) |
| dotemacs.el | example .emacs lines for enabling gnuplot mode |
- Makefile.am
- configure.ac
- Makefile.dst
gnuplot-mode can be installed directly from
http://melpa.milkbox.net as the “gnuplot” package (note: not
“gnuplot-mode”, which is a different package). Note that MELPA
always builds the latest commit to the master branch, which may
be ahead of the official release.
El-get does contain gnuplot-mode recipe. So to install simply call,
M-x el-get-install RET gnuplot-mode
Alternatively, you can place the following in your init file sothat
el-get can install and load gnuplot-mode at Emacs start up.
(el-get 'sync 'gnuplot-mode)
To do a full install from a clone of the git repository you will need recent versions of GNU Autotools. This is for consistency with Gnuplot CVS, which has an autotools-based build system.
Within the cloned repository, run autoreconf and
automake --add-missing. Then continue from step 2 of the instructions
for “Installing from a .tar.gz distribution” below.
Or you could just copy the three .el files to your .emacs.d and
byte-compile them within Emacs. (Note that you should
byte-compile them, especially gnuplot-context.el, which is
unacceptably slow when run interpreted).
Gnuplot-mode has been included with Gnuplot since the 3.7 distribution. The installation instructions for the free-standing distribution have been modified to be consistent with that.
- Unpack the gnuplot.tar.gz and cd to the gnuplot directory.
- Type
./configure. If configure doesn’t work for you, see note 7 below.You can specify the Emacs executable to use for byte-compiling by using the
EMACSenvironment variable: for example./configure EMACS=xemacsto use XEmacs. On Mac OS X, if your Emacs application is located at/Applications/Emacs.app, you should do./configure EMACS=/Applications/Emacs.app/Contents/MacOS/EmacsYou can also optionally specify the
--with-lispdir=switch to change wheremake installwill put the compiled Lisp files.Note that if you run a shell within Emacs, it is often a good idea not to build this package from inside it. Run it in a separate terminal instead, or you may get strange environment variable and load path conflicts.
- Run
make. There will be some compilation warnings, but they should be harmless. - Run
make install, or manually 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 ~e .elc files to a place where emacs, i.e. your personal emacs directory. - Insert the contents of the dotemacs file into your .emacs file or into the system’s emacs start-up file to enable gnuplot mode.
- The function
gnuplot-info-lookup-symbollooks 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/infoA 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") - To make the reference card, run
make pdformake ps.
gnuplot-mode supports the new curly-brace-block do and if
statements introduced in recent versions of gnuplot. The
indentation code to handle these is pretty simple, but should work.
Please report any bugs. The number of columns to offset inner
blocks is controlled by the gnuplot-basic-offset variable.
By default gnuplot-mode will try to parse your commands as you
type, so that tab completion via M-TAB or TAB will only suggest
relevant completion candidates. For example, with point after the
with of a plot command, tab completion will suggest only
plotting styles. This also enables more specific help topic lookup
in the gnuplot info file, provided you have the right version of
gnuplot.info installed.
If the context-sensitivity annoys you, you can get the old behavior
back by toggling gnuplot-context-sensitive-mode. See also the
variable gnuplot-tab-completion.
If you install the file gnuplot-eldoc.el from a recent Gnuplot
distribution, gnuplot-mode can show syntax hints in the modeline
when eldoc-mode is turned on and context sensitivity is enabled.
You can optionally have plots displayed inline in the Gnuplot
comint process buffer. This is handy for trying things out without
having to switch between Emacs and the Gnuplot display. Call
gnuplot-inline-imge-mode or type C-c M-i to try it out. This
feature is implemented using temporary .png files, and is also
somewhat experimental. It requires Gnuplot to have png support
and a GNU Emacs with image support. Please report bugs.
- Version 0.7 of gnuplot-mode is designed for use with gnuplot
version 4.4 and up. It will also mostly work fine with older
versions. If it doesn’t work with newer versions, that’s a bug
;-)
This version has mostly been tested under GNU Emacs 23 and 24. It should also work on GNU Emacs 22 and XEmacs 21. Earlier than that it may work, but has not been tested.
- 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.
- The gnuplot-mode distribution comes with the version of the gnuplot info file that gets made by gnuplot 4.6. 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.
- 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/
- By definition, the context sensitive completion has to know a
fair bit about the structure of the gnuplot language. If you use
it with an old version of gnuplot (pre version 4) it may make
mistakes. Most of gnuplot 4.6’s command language is parsed
correctly, with the exception of the various
set terminalcommands. - Gnuplot’s
pause -1command, which waits for the user to press a key, is problematic when running under Emacs. Sendingpause -1to the running gnuplot process will make Emacs appear to freeze. (It isn’t really crashed: typingC-gwill unlock it and let you continue). The workaround for now is to make Gnuplot output a string before pausing, by doing
pause -1 "Hit return"
or similar. Thanks to Jim Mehl for reporting this issue.
- Use ELPA
Gnuplot-mode is already on http://melpa.milkbox.net, but it would be good to get it into the other repositories too.
- Using gnuplot-mode on windows is problematic. John Handy says:
You probably get nagged quite a bit about this. Some have been running into issues with gnuplot-mode and Windows and I’m wondering if you have any comments. I use it just fine on Linux, but it seems that Windows users are not able to send data to gnuplot successfully.
Org-mode also uses gnuplot-mode and this org-plot and org-mode babel+gnuplot are not working correctly on Windows.
Any thoughts? I’m hoping to include any results in the Org-mode wiki for gnuplot use: http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-gnuplot.php
If you’re interested, here are some of the threads I’m referring to: http://newsgroups.derkeiler.com/Archive/Comp/comp.emacs/2007-07/msg00159.html http://www.mail-archive.com/[email protected]/msg14544.html http://groups.google.com/group/gnu.emacs.help/browse_thread/thread/53489131c79f62b3
If you’d like to see my summary of the issues to the org-mode mailing list, it’s here: http://thread.gmane.org/gmane.emacs.orgmode/30235