Skip to content

Commit ba4e893

Browse files
committed
Update README
1 parent d05584d commit ba4e893

File tree

1 file changed

+44
-52
lines changed

1 file changed

+44
-52
lines changed

README.org

Lines changed: 44 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
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]]
10-
editor. It features:
9+
This package allows running [[http://www.gnuplot.info/][gnuplot]] files from within the [[https://www.gnu.org/software/emacs/][GNU Emacs]] editor. It
10+
features:
1111

1212
- Syntax highlighting and indentation for gnuplot scripts.
1313
- Pull-down menus for common gnuplot-related tasks.
@@ -64,67 +64,58 @@ When =gnuplot-mode= is on, the following keybindings are available:
6464
| M-tab | complete keyword before point |
6565
| tab | indent current line |
6666

67-
68-
With the exception of the commands for sending commands to Gnuplot,
69-
most of the above commands also work in the Gnuplot comint buffer, in
70-
addition to the following:
67+
With the exception of the commands for sending commands to Gnuplot, most of the
68+
above commands also work in the Gnuplot comint buffer, in addition to the
69+
following:
7170

7271
| M-C-p | plot the most recent script buffer line-by-line |
7372
| M-C-f | save the current script buffer and load that file |
7473
| C-c C-e | pop back to most recent script buffer |
7574

7675
** Context-sensitive keyword completion
7776

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

84-
If the context-sensitivity annoys you, you can get simple
85-
non-context-sensitive completion back by toggling
86-
=gnuplot-context-sensitive-mode=.
83+
If the context-sensitivity annoys you, you can get simple non-context-sensitive
84+
completion back by toggling =gnuplot-context-sensitive-mode=.
8785

88-
By its nature, the completion code has to know a fair bit about the
89-
structure of the gnuplot language. If you use it with an old version
90-
of gnuplot (pre version 4) it will make mistakes. Most of gnuplot
91-
4.6's command language is parsed correctly except for the =set
92-
terminal= commands.
86+
By its nature, the completion code has to know a fair bit about the structure of
87+
the gnuplot language. If you use it with an old version of gnuplot (pre
88+
version 4) it will make mistakes. Most of gnuplot 4.6's command language is
89+
parsed correctly except for the =set terminal= commands.
9390

9491
** Eldoc mode
9592

96-
~gnuplot-mode~ can show syntax hints in the modeline when ~eldoc-mode~
97-
is turned on and context sensitivity is enabled.
93+
~gnuplot-mode~ shows syntax hints in the modeline when ~eldoc-mode~ is turned on and
94+
context sensitivity is enabled. Both are enabled by default.
9895

9996
** Inline Images
10097

101-
You can optionally have plots displayed inline in the Gnuplot comint
102-
process buffer. This is handy for trying things out without having to
103-
switch between Emacs and the Gnuplot display. Call
104-
=gnuplot-inline-display-mode= in a gnuplot-mode buffer to try it out. This
105-
feature is implemented using temporary =png= files, and is also somewhat
106-
experimental. It requires Gnuplot to have =png= support and a GNU Emacs
107-
with image support. Please report bugs.
108-
109-
98+
You can have plots displayed inline in the Gnuplot comint process buffer. This
99+
is handy for trying things out without having to switch between Emacs and the
100+
Gnuplot display. It requires Gnuplot to have =png= support and a GNU Emacs with
101+
image support. Call =gnuplot-external-display-mode= in a gnuplot-mode buffer to
102+
disable the feature.
110103

111104
* FAQ / Remarks
112105

113106
** Usage on Windows
114107

115-
Multiple users have reported issues when trying to work with
116-
=gnuplot.el= on Windows. Most notably, the gnuplot process hangs after
117-
sending a first line of input (this is a common Emacs issue on
118-
Windows, see [[https://www.gnu.org/software/emacs/manual/html_mono/efaq-w32.html#Sub_002dprocesses][here]]).
108+
Multiple users have reported issues when trying to work with =gnuplot.el= on
109+
Windows. Most notably, the gnuplot process hangs after sending a first line of
110+
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]]).
119111

120-
A partial workaround was to use =pgnuplot.exe= as the
121-
=gnuplot-program=. However, =pgnuplot.exe= is not included with
122-
gnuplot since version 5.0.
112+
A partial workaround was to use =pgnuplot.exe= as the =gnuplot-program=. However,
113+
=pgnuplot.exe= is not included with gnuplot since version 5.0.
123114

124115
You currently have two solutions:
125116

126-
1. Experiment using the =gnuplot-program= and =gnuplot-program-args=
127-
variables. For instance, setting
117+
1. Experiment using the =gnuplot-program= and =gnuplot-program-args= variables. For
118+
instance, setting
128119

129120
#+begin_src emacs-lisp
130121
(setq gnuplot-program "/path/to/cmdproxy.exe")
@@ -133,27 +124,28 @@ You currently have two solutions:
133124

134125
has been reported to work (see [[https://github.com/emacs-gnuplot/gnuplot/pull/33/files][here]] for a reference).
135126

136-
2. Use the simpler [[https://github.com/mkmcc/gnuplot-mode][gnuplot-mode]] package that sends the entire buffer
137-
to gnuplot. Since no =comint= is involved, it should function
138-
correctly, but you lose most features of the =gnuplot.el= package.
139-
We would like to implement a send-buffer without comint as well
140-
eventually.
127+
2. Use the simpler [[https://github.com/mkmcc/gnuplot-mode][gnuplot-mode]] package that sends the entire buffer to gnuplot.
128+
Since no =comint= is involved, it should function correctly, but you lose most
129+
features of the =gnuplot.el= package. We would like to implement a send-buffer
130+
without comint as well eventually.
141131

142132
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]]
143133

144-
145134
** Pause Command
146135

147-
Gnuplot's =pause -1= command, which waits for the user to press a key,
148-
is problematic when running under Emacs. Sending =pause -1= to the
149-
running gnuplot process will make Emacs appear to freeze. (It isn't
150-
really crashed: typing =C-g= will unlock it and let you continue). The
151-
workaround for now is to make Gnuplot output a string before pausing,
152-
by doing =pause -1 "Hit return"= or similar.
136+
Gnuplot's =pause -1= command, which waits for the user to press a key, is
137+
problematic when running under Emacs. Sending =pause -1= to the running gnuplot
138+
process will make Emacs appear to freeze. (It isn't really crashed: typing =C-g=
139+
will unlock it and let you continue). The workaround for now is to make Gnuplot
140+
output a string before pausing, by doing =pause -1 "Hit return"= or similar.
153141

154142
** Issue with Unicode Character Display
155143

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

158150
* Maintenance
159151

0 commit comments

Comments
 (0)