Skip to content

Commit 47861d3

Browse files
committed
Update README
1 parent 54bfa2e commit 47861d3

File tree

1 file changed

+32
-46
lines changed

1 file changed

+32
-46
lines changed

README.org

Lines changed: 32 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@
66
#+html: <a href="https://melpa.org/#/gnuplot"><img alt="MELPA" src="https://melpa.org/packages/gnuplot-badge.svg"/></a>
77
#+html: <a href="https://stable.melpa.org/#/gnuplot"><img alt="MELPA Stable" src="https://stable.melpa.org/packages/gnuplot-badge.svg"/></a>
88

9-
This package allows running [[http://www.gnuplot.info/][gnuplot]] files from within the [[https://www.gnu.org/software/emacs/][GNU Emacs]] editor. It
9+
This package allows running [[http://www.gnuplot.info/][Gnuplot]] files from within the [[https://www.gnu.org/software/emacs/][GNU Emacs]] editor. It
1010
features:
1111

12-
- Syntax highlighting and indentation for gnuplot scripts.
13-
- Pull-down menus for common gnuplot-related tasks.
14-
- Interactive gnuplot sessions using =comint=.
12+
- Syntax highlighting and indentation for Gnuplot scripts.
13+
- Pull-down menus for common Gnuplot-related tasks.
14+
- Interactive Gnuplot sessions using =comint=.
1515
- Context-sensitive completion.
16-
- Inline display of gnuplot plots.
16+
- Inline display of Gnuplot plots.
1717

18-
It is recommended to run =gnuplot-mode= on GNU Emacs 25 or above,
19-
using gnuplot version 5.0 or above.
18+
It is recommended to use GNU Emacs 25 or above, and Gnuplot version 5.0 or
19+
above.
2020

2121
* Installation
2222

@@ -26,23 +26,18 @@ The easiest way to install =gnuplot= is to directly get it from [[https://elpa.n
2626

2727
: M-x install-package RET gnuplot RET
2828

29-
or do =M-x list-packages= and search for =gnuplot= in the list. Note that there is
30-
an alternative =gnuplot-mode= package on MELPA which is less featureful.
31-
32-
* Configuration
33-
34-
=gnuplot-mode= is enabled automatically for =*.gp= files. The function
35-
=gnuplot-info-lookup-symbol= looks at the Gnuplot info file.
29+
or do =M-x list-packages= and search for =gnuplot= in the list. Note that there is a
30+
different [[https://github.com/mkmcc/gnuplot-mode][gnuplot-mode]] package on MELPA which is less featureful.
3631

3732
* Usage
3833

39-
Apart from enabling =gnuplot-mode= automatically for =*.gp= files, these functions
40-
are useful for starting up gnuplot-mode:
34+
=gnuplot-mode= is enabled automatically for =*.gp= files. These functions are useful
35+
as entry points:
4136

42-
- =M-x run-gnuplot= : start gnuplot repl
43-
- =M-x gnuplot-mode= : start gnuplot-mode in the current buffer
44-
- =M-x gnuplot-make-buffer= : open a new buffer (which is not visiting
45-
a file) and start gnuplot-mode in that buffer
37+
- =M-x run-gnuplot= - start =gnuplot-comint-mode= REPL.
38+
- =M-x gnuplot-mode= - switch to =gnuplot-mode= in the current buffer
39+
- =M-x gnuplot-make-buffer= - open a new buffer, which is not visiting a file, and
40+
start =gnuplot-mode= in that buffer.
4641

4742
** Bindings
4843

@@ -58,7 +53,7 @@ When =gnuplot-mode= is on, the following keybindings are available:
5853
| C-c C-c | comment region |
5954
| C-c C-o | set arguments for command at point |
6055
| S-mouse-2 | set arguments for command under mouse cursor |
61-
| C-c C-d | read the gnuplot info file |
56+
| C-c C-d | read the gnuplot info manual |
6257
| C-c C-e | show gnuplot buffer |
6358
| C-c C-k | kill gnuplot process |
6459
| C-c C-z | customize gnuplot-mode |
@@ -75,11 +70,11 @@ following:
7570

7671
** Context-sensitive keyword completion
7772

78-
By default gnuplot-mode will try to parse your commands as you type and suggest
73+
By default =gnuplot-mode= will try to parse your commands as you type and suggest
7974
only relevant completion candidates on typing =M-TAB= or =TAB=. For example, with
8075
point after the =with= of a =plot= command, tab completion will suggest only
8176
plotting styles. This also enables more specific help topic lookup in the
82-
gnuplot info file.
77+
Gnuplot info manual.
8378

8479
If the context-sensitivity annoys you, you can get simple non-context-sensitive
8580
completion back by toggling =gnuplot-context-sensitive-mode=.
@@ -96,55 +91,46 @@ context sensitivity is enabled. Both are enabled by default.
9691

9792
** Inline Images
9893

99-
You can have plots displayed inline in the Gnuplot comint process buffer. This
94+
You can have plots displayed inline in the Gnuplot Comint process buffer. This
10095
is handy for trying things out without having to switch between Emacs and the
101-
Gnuplot display. It requires Gnuplot to have =png= support and a GNU Emacs with
102-
image support. Call =gnuplot-external-display-mode= in a gnuplot-mode buffer to
103-
disable the feature.
96+
Gnuplot display. It requires Gnuplot and Emacs to have =png= support. Call
97+
=gnuplot-external-display-mode= in a gnuplot-mode buffer to disable the feature.
10498

10599
* Common issues
106100

107101
** Usage on Windows
108102

109103
Multiple users have reported issues when trying to work with =gnuplot.el= on
110-
Windows. Most notably, the gnuplot process hangs after sending a first line of
111-
input (this is a common Emacs issue on Windows, see [[https://www.gnu.org/software/emacs/manual/html_mono/efaq-w32.html#Sub_002dprocesses][here]]).
112-
113-
A partial workaround was to use =pgnuplot.exe= as the =gnuplot-program=. However,
114-
=pgnuplot.exe= is not included with gnuplot since version 5.0.
115-
116-
You currently have two solutions:
104+
Windows. Most notably, the Gnuplot process hangs after sending a first line of
105+
input (this is a common Emacs issue on Windows, see [[https://www.gnu.org/software/emacs/manual/html_mono/efaq-w32.html#Sub_002dprocesses][here]]). More information on
106+
=gnuplot.el= and Windows can be found on these threads [[https://github.com/emacs-gnuplot/gnuplot/issues/15][1]] and [[https://github.com/emacs-gnuplot/gnuplot/pull/33][2]]. You currently have
107+
two solutions:
117108

118109
1. Experiment using the =gnuplot-program= and =gnuplot-program-args= variables. For
119-
instance, setting
110+
instance the following setting has been reported to work (see [[https://github.com/emacs-gnuplot/gnuplot/pull/33/files][here]]).
120111

121112
#+begin_src emacs-lisp
122113
(setq gnuplot-program "/path/to/cmdproxy.exe")
123114
(setq gnuplot-program-args "/C /path/to/gnuplot.exe")
124115
#+end_src
125116

126-
has been reported to work (see [[https://github.com/emacs-gnuplot/gnuplot/pull/33/files][here]] for a reference).
127-
128-
2. Use the simpler [[https://github.com/mkmcc/gnuplot-mode][gnuplot-mode]] package that sends the entire buffer to gnuplot.
117+
2. Try the simpler [[https://github.com/mkmcc/gnuplot-mode][gnuplot-mode]] package that sends the entire buffer to Gnuplot.
129118
Since no =comint= is involved, it should function correctly, but you lose most
130-
features of the =gnuplot.el= package. We would like to implement a send-buffer
131-
without comint as well eventually.
132-
133-
More information on =gnuplot.el= and Windows can be found on these threads: [[https://github.com/emacs-gnuplot/gnuplot/issues/15][1]], [[https://github.com/emacs-gnuplot/gnuplot/pull/33][2]]
119+
features of this package.
134120

135121
** Pause Command
136122

137123
Gnuplot's =pause -1= command, which waits for the user to press a key, is
138-
problematic when running under Emacs. Sending =pause -1= to the running gnuplot
124+
problematic when running under Emacs. Sending =pause -1= to the running Gnuplot
139125
process will make Emacs appear to freeze. (It isn't really crashed: typing =C-g=
140126
will unlock it and let you continue). The workaround for now is to make Gnuplot
141127
output a string before pausing, by doing =pause -1 "Hit return"= or similar.
142128

143129
** Issue with Unicode Character Display
144130

145131
Some users have reported [[https://github.com/emacs-gnuplot/gnuplot/issues/39][issues when trying to display unicode characters]]. This
146-
issue is likely due to your distribution bundling gnuplot with [[https://unix.stackexchange.com/questions/496206/unicode-in-gnuplot-terminal/496245#496245][editline instead
147-
of readline]]. Recompiling the source with support for unicode should fix the
132+
issue is likely due to your distribution bundling Gnuplot with [[https://unix.stackexchange.com/questions/496206/unicode-in-gnuplot-terminal/496245#496245][editline instead
133+
of readline]]. Recompiling the source with support for Unicode should fix the
148134
issue until this issue is fixed upstream. Thanks to [[https://github.com/rolandog][rolandog]] for discovering
149135
this fix.
150136

@@ -155,4 +141,4 @@ Regenerate ~gnuplot.texi~ and ~gnuplot-eldoc.el~ from the Gnuplot source.
155141
1. Run ~emacs -batch -l doc2texi.el -f d2t-doc-to-texi~ inside the ~gnuplot-*/docs/~
156142
source directory.
157143
2. Run ~makeinfo --no-split gnuplot.texi~ and ensure that it compiles cleanly.
158-
3. Copy ~gnuplot-eldoc.el~ and ~gnuplot.texi~ to the package source.
144+
3. Copy ~gnuplot-eldoc.el~ and ~gnuplot.texi~ to the package source directory.

0 commit comments

Comments
 (0)