[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/gnuplot 32c280e 172/184: Add a gnuplot-program-args variab
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/gnuplot 32c280e 172/184: Add a gnuplot-program-args variable. (#65) |
Date: |
Sun, 29 Aug 2021 11:03:39 -0400 (EDT) |
branch: elpa/gnuplot
commit 32c280e2fc4ffcc968791bc280f400d7b96d510e
Author: Maxime Tréca <16440823+mtreca@users.noreply.github.com>
Commit: GitHub <noreply@github.com>
Add a gnuplot-program-args variable. (#65)
This variable can be used to pass additional flags to the
gnuplot-program invocation when starting a gnuplot process.
Document issues when using gnuplot and Windows
---
README.org | 53 +++++++++++++++++++++++++++++++----------------------
gnuplot.el | 13 +++++++++++--
2 files changed, 42 insertions(+), 24 deletions(-)
diff --git a/README.org b/README.org
index bb122ab..c3a054c 100644
--- a/README.org
+++ b/README.org
@@ -68,6 +68,37 @@ A basic gnuplot configuration can be found below.
A reference card for gnuplot-mode can be compiled using the =gpelcard.tex=
file included in this package.
+*** Usage on Windows
+
+Multiple users have reported issues when trying to work with
+=gnuplot.el= on Windows. Most notably, the gnuplot process hangs after
+sending a first line of 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]]).
+
+A partial workaround was to use =pgnuplot.exe= as the
+=gnuplot-program=. However, =pgnuplot.exe= is not included with
+gnuplot since version 5.0.
+
+You currently have two solutions:
+
+1. Experiment using the =gnuplot-program= and =gnuplot-program-args=
+ variables. For instance, setting
+
+ #+begin_src emacs-lisp
+(setq gnuplot-program "/path/to/cmdproxy.exe")
+(setq gnuplot-program-args "/C /path/to/gnuplot.exe")
+ #+end_src
+
+ has been reported to work (see
[[https://github.com/emacsorphanage/gnuplot/pull/33/files][here]] for a
reference).
+
+2. Use the simpler [[https://github.com/mkmcc/gnuplot-mode][gnuplot-mode]]
package that sends the entire buffer
+ to gnuplot. Since no =comint= is involved, it should function
+ correctly, but you lose most features of the =gnuplot.el= package.
+ We would like to implement a send-buffer without comint as well
+ eventually.
+
+More information on =gnuplot.el= and WIndows can be found on these threads:
[[https://github.com/emacsorphanage/gnuplot/issues/15][1]],
[[https://github.com/emacsorphanage/gnuplot/pull/33][2]]
+
** New features for gnuplot-mode 0.7
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
@@ -148,25 +179,3 @@ A basic gnuplot configuration can be found below.
Gnuplot-mode is already on http://melpa.milkbox.net, but it would
be good to get it into the other repositories too.
-
- 2. 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/emacs-orgmode@gnu.org/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]]
diff --git a/gnuplot.el b/gnuplot.el
index 1c639a0..d1f0721 100644
--- a/gnuplot.el
+++ b/gnuplot.el
@@ -475,6 +475,12 @@ useful for functions included in
`gnuplot-after-plot-hook'.")
"The name of the gnuplot executable."
:group 'gnuplot
:type 'string)
+
+(defcustom gnuplot-program-args nil
+ "Whitespace-separated flags to pass to the gnuplot executable."
+ :group 'gnuplot
+ :type 'string)
+
(defvar gnuplot-program-version nil
"Version number of gnuplot.
This is using `gnuplot-fetch-version-number'.")
@@ -1817,8 +1823,11 @@ buffer."
(unless (and gnuplot-process (eq (process-status gnuplot-process) 'run)
gnuplot-buffer (buffer-live-p gnuplot-buffer))
(message "Starting gnuplot plotting program...")
- (setq gnuplot-buffer (make-comint gnuplot-process-name gnuplot-program)
- gnuplot-process (get-buffer-process gnuplot-buffer))
+ (let ((gnuplot-cmd (list 'make-comint gnuplot-process-name
gnuplot-program)))
+ (when gnuplot-program-args
+ (setq gnuplot-cmd (append gnuplot-cmd '(nil) (split-string
gnuplot-program-args))))
+ (setq gnuplot-buffer (eval gnuplot-cmd)
+ gnuplot-process (get-buffer-process gnuplot-buffer)))
(set-process-query-on-exit-flag gnuplot-process nil)
(with-current-buffer gnuplot-buffer
(gnuplot-comint-mode)
- [nongnu] elpa/gnuplot 99c3855 130/184: Move gnuplot-context-sensitive-mode into gnuplot.el, (continued)
- [nongnu] elpa/gnuplot 99c3855 130/184: Move gnuplot-context-sensitive-mode into gnuplot.el, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot 2ec49e9 139/184: Update GitHub url, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot 4b267b8 146/184: Merge pull request #44 from conao3/change-license, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot 4d04c86 150/184: remove weird char, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot 8f2ddd0 148/184: untabify, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot fcf5f4b 160/184: [WIP] Start removing Xemacs, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot e47e77e 155/184: Merge pull request #49 from conao3/fix-completion, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot e6dc1f6 164/184: comint-process-echoes is buffer-local, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot df47e87 181/184: Remove version-related variables., ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot 62117fe 171/184: Deprecate XEmacs support and XEmacs toolbar (#59), ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot 32c280e 172/184: Add a gnuplot-program-args variable. (#65),
ELPA Syncer <=
- [nongnu] elpa/gnuplot 116cad8 182/184: Release v 8.0.0, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot a707c51 169/184: Update gnuplot.info to 5.2.6., ELPA Syncer, 2021/08/29