The easiest way to install gnuplot-mode in a recent Emacs is to use the Emacs package system with the MELPA repository, or the el-get package (described in README.org). Either method will install the most recent gnuplot-mode from the Github repository. If you want to install gnuplot-mode yourself from a cloned repository, read on.
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.
- Type
./configure.If configure doesn’t work for you, you can use
Makefile.dstinstead: see Installing without configure or make 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 specify the
--with-lispdir=switch to change wheremake installwill put the compiled Lisp files, for example to install them in your.emacs.ddirectory.If you build this from a shell within Emacs itself and get strange issues with load paths or environment variables, build it in a separate terminal
- Run
make. There will be some compilation warnings, but they should be harmless. - To make the reference card, run
make pdformake ps. - 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.elcfiles to a place where emacs can find them, e.g. your personal.emacs.d.
If configure fails for some reason, you can use the included
Makefile.dst file by doing make -f Makefile.dst. This makefile
doesn’t include an install target, so you’ll have to install the
.elc files manually. It does have targets to build the
gnuplot-mode reference card (pdf, ps or all).
The “configure; make” sequence may not work on all systems,
particularly Win32 systems. The long-winded way of making the .elc
and 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, or pdflatex gpelcard.tex.
- Insert the contents of the
dotemacs.elfile into your.emacsor 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")
The included configure, aclocal.m4 and Makefile.in files were
generated from configure.ac and Makefile.am using GNU autotools
2.69. If you want to regenerate them for some reason, do the
following:
autoreconf automake --add-missing
The build- and installation-related files are the following:
| File | Description |
|---|---|
| configure.ac | Definitions for `autoconf` |
| Makefile.am | Definitions for `automake` |
| Makefile.dst | Alternative makefile, avoiding configure & autotools |
| dot.el | a short lisp file used by Makefile.dst |
| configure | `configure` script generated from configure.ac |
| aclocal.m4 | m4 macros generated from configure.ac |
| Makefile.in | Makefile template generated from Makefile.am |
| install-sh | scripts needed by configure and make |
| missing |
Contact gnuplot-mode’s author Bruce Ravel <bruceravel1@gmail.com> or submit an issue on github: http://github.com/bruceravel/gnuplot-mode