emacs-gnuplot / gnuplot Goto Github PK
View Code? Open in Web Editor NEWA major mode for Emacs for interacting with Gnuplot
License: GNU General Public License v3.0
A major mode for Emacs for interacting with Gnuplot
License: GNU General Public License v3.0
Hello,
I am experiencing an issue with nested for loops and the behavior of the return key. A minimal script is
do for [i=1:10]{
do for [j=1:10]{
plot sin(x)
}
}
If I place the cursor at the end of the second or third line and press tab or enter, the cursor jumps directly at the last curly brace.
I am using GNU Emacs 25.2.1 and gnuplot-mode from Melpa.
Regards,
Vincent
gnuplot.el does something a bit too hands-on with its syntax highlighting, which breaks query-replace.
I have a plot.gp such as this:
plot '-' title "a", '-' title "b", '-' title "c"
I launch query-replace by hitting M-%. Then I try to replace all ',' with ''. After replacing the first match, gnuplot.el jumps the point past the second, so the second ',' is not replaced like it should.
Hi,
The github site starts with
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
whereas that URL starts with
Infinite redirects! ;)
Also, while I'm here: I'm dealing with some fallout of my own upload of gnuplot.el to github over at https://sourceforge.net/p/gnuplot/bugs/1544/ -- just to make it clear, I wasn't involved in the gnuplot 5.0 release notes pointing to my decommissioned github project..
Hi. The Debian freeze is coming up, and I'd like to push the new gnuplot-mode into it. Can yall do a release? Thanks!
There is anyone who has push permissions for this project thinking to maintain this repository?
I think the world still needs this project, and the ob-gnuplot
at org-contrib depends on it.
If you have any problem managing this, you can add some collaborators or transfer repository to emacs-orphanage and have the community maintain the package.
Friendly ping.
Hi:
When bytecompiling I am getting these warnings which are very simple to fix.
Warning (bytecomp): Package cl is deprecated
Warning (bytecomp): ‘incf’ is an obsolete alias (as of 27.1); use ‘cl-incf’ instead.
Warning (bytecomp): ‘flet’ is an obsolete macro (as of 24.3); use either ‘cl-flet’ or ‘cl-letf’.
Warning (bytecomp): ‘case’ is an obsolete alias (as of 27.1); use ‘cl-case’ instead.
Warning (bytecomp): ‘destructuring-bind’ is an obsolete alias (as of 27.1); use ‘cl-destructuring-bind’ instead.
Warning (bytecomp): ‘case’ is an obsolete alias (as of 27.1); use ‘cl-case’ instead.
Warning (bytecomp): the following functions might not be defined at runtime:
gnuplot-point-at-end-of-command,
gnuplot-beginning-of-continuation, gnuplot-beginning-of-command,
gnuplot-point-at-beginning-of-command,
info-lookup-interactive-arguments, gnuplot--adjust-info-display
Warning (bytecomp): ‘member*’ is an obsolete function (as of 27.1); use ‘cl-member’ instead. [2 times]
Warning (bytecomp): ‘remove*’ is an obsolete function (as of 27.1); use ‘cl-remove’ instead. [2 times]
Warning (bytecomp): ‘member*’ is an obsolete function (as of 27.1); use ‘cl-member’ instead.
Warning (bytecomp): ‘remove*’ is an obsolete function (as of 27.1); use ‘cl-remove’ instead. [10 times]
Warning (bytecomp): ‘flet’ is an obsolete macro (as of 24.3); use either ‘cl-flet’ or ‘cl-letf’.
Warning (bytecomp): ‘easy-menu-add’ is an obsolete function (as of 28.1); use ‘ignore’ instead. [2 times]
Warning (bytecomp): reference to free variable ‘right-toolbar’
Warning (bytecomp): reference to free variable ‘right-toolbar-width’
Warning (bytecomp): reference to free variable ‘left-toolbar’
Warning (bytecomp): reference to free variable ‘left-toolbar-width’
Warning (bytecomp): reference to free variable ‘bottom-toolbar’
Warning (bytecomp): reference to free variable ‘bottom-toolbar-height’
Warning (bytecomp): reference to free variable ‘top-toolbar’
Warning (bytecomp): reference to free variable ‘top-toolbar-height’
Warning (bytecomp): ‘easy-menu-add’ is an obsolete function (as of 28.1); use ‘ignore’ instead.
Warning (bytecomp): ‘ecase’ is an obsolete alias (as of 27.1); use ‘cl-ecase’ instead.
Warning (bytecomp): ‘comint-dynamic-simple-complete’ is an obsolete function (as of 24.1); use ‘completion-in-region’ instead.
Warning (bytecomp): ‘case’ is an obsolete alias (as of 27.1); use ‘cl-case’ instead.
Warning (bytecomp): assignment to free variable ‘toolbar-info-frame’
Warning (bytecomp): the following functions are not known to be defined: set-specifier,
add-spec-to-specifier, gnuplot-context-completion-at-point
Jim Mehl says: “I usually put pause -1 lines in my gnuplot scripts. I have to be careful to comment these out if I execute the script within emacs. It just hangs. Is there a way out?”
When run in a terminal the pauses let me review the screen, then proceed (like many gnuplot demo scripts). When I run this script within emacs 23.1.1 with gnuplot-mode (gnuplot 4.5), emacs becomes unresponsive. I cannot switch buffers. I can switch to another window and kill emacs (usually undesirable).
plot [-5:5] sin(x)/x
pause -1
plot [-5:5] (sin(x)/x)**2
pause -1
When exporting an org document containing multiple gnuplot blocks, messages of the type:
"gnuplot-mode 0.7-beta (gnuplot 3.7) -- report bugs as issues at https://github.com/emacsorphanage/gnuplot/" are spamming the echo area and message buffers.
I honestly don't think this startup message is necessary at all (removing it might also fix a version number issue present in another issue, IIRC). If having the message is deemed important, I would suggest echoing it only once when the package and loaded, and suppress subsequent invocations.
I will try to push a fix soon, if that's OK with you @conao3
This is a new error that cropped up just today although I've been successfully plotting extensively for past couple of weeks. There were no errors with the same plot files until today. The following lines get logged to the messages buffer. Nothing else in the gnuplot buffer, the gnuplot> prompt is active and ready to receive commands.
-----------------------------
gnuplot-mode 0.7-beta -- determining gnuplot version ......
gnuplot-mode 0.7-beta (gnuplot 5.2) -- report bugs with "C-c C-u"
Starting gnuplot plotting program...
gnuplot-make-gnuplot-buffer: Symbol’s function definition is void: process-kill-without-query
-----------------------------
Other related details:
;;; gnuplot.el --- drive gnuplot from within emacs
;; Copyright (C) 1998, 2011 Phil Type and Bruce Ravel, 1999-2012 Bruce Ravel
;; Author: Bruce Ravel <[email protected]> and Phil Type
;; Maintainer: Bruce Ravel <[email protected]>
;; Created: June 28 1998
;; Updated: November 1 2012
;; Version: 0.7.0
;; Keywords: gnuplot, plotting
-----------------------------
M-x org-version:
Org mode version 9.1.7 (9.1.7-18-g2f587d-elpa)
----------------------------
M-x version:
GNU Emacs 27.0.50 (build 1, x86_64-apple-darwin15.6.0, NS appkit-1404.47 Version 10.11.6 (Build 15G19009)
----------------------------
uname
Darwin Kernel Version 15.6.0: root:xnu-3248.73.5~1/RELEASE_X86_64 x86_64
This error appears when compiling gnuplot-mode 0.6.1 with either the emacs 22.1.1 that comes with Mac OS or with Aquamacs.
gnuplot.el:1597:24:Error: Symbol's value as variable is void: gnuplot-keywords-negatable-options
Thanks.
Attached is elisp code for commenting/uncommenting a region. It works for Xemacs. Also attached is a diff to show how I modified gnuplot.el
Mulitple users report being unable to properly use gnuplot in the latest release.
See here for an email thread about this.
I get the following message when starting gnuplot-mode
in my Emacs (tested with emacs -Q
and simply opening and org-mode gnuplot block):
gnuplot-mode 0.7-beta -- determining gnuplot version ......
Warning: could not determine gnuplot version, guessing 3.7
Initialization fails with: "Invalid menu item in easymenu"
Gnuplot used to work perfectly for me a few weeks ago (after a fresh pull). Looking at the commit history, maybe one of the reformatting commits is messing something up?
When I open a simple blah.gnuplot file, gnuplot-mode sets the buffer's dirty flag.
I can reproduce this with a -Q Emacs instance simply by loading gnuplot-mode, then opening a *.gnuplot file.
-Steve
Using gnuplot version 5.0, after typing the beginning of an inline data block, the gnuplot session hangs.
Try typing the following line in the session buffer:
$Mydata << EOD
1 2
EOD
You won't be able to start typing the second line. Emacs hangs at
accept-process-output(#<process gnuplot>)
comint-send-input()
call-interactively(comint-send-input nil nil)
command-execute(comint-send-input)
empty files are produced in temp directory and no error is shown
I don't know what you think about this @conao3 but dropping support for XEmacs (and older version of Emacs, but I will open a separate issue for this) could simplify the code quite a bit by removing a lot of workarounds and hack.
More specifically, the comment string of gnuplot-toolbar-use-toolbar
states that the gnuplot tool bar does not work on GNU Emacs. Can anyone confirm this? If this is the case, should we aim at porting the toolbar features to GNU Emacs or just drop them altogether?
It seems that the gnuplot project points its users at a fairly old version of gnuplot-mode.
See http://gnuplot.info/ReleaseNotes_5_0.html (and search down the page for "emacs") and https://github.com/rudi/gnuplot-el
I am about to open an issue there suggesting that gnuplot point here instead.
Hi,
I encounter this error
Symbol’s function definition is void: toolbar-make-button-list
when install gnuplot
. Did anyone met this error, how to fix it?
My emacs version is
GNU Emacs 25.0.95.1 (x86_64-apple-darwin15.4.0, NS appkit-1404.46 Version 10.11.4 (Build 15E65)) of 2016-06-23
I am using emacs 24 and el-get as package manger. I installed gnu-plot mode with el-get, which sets gnuplot-mode directory in the load-path. So when other packages requiring info-look, the old version in gnuplot directory is being loaded.
which indeed causing problems for other packages (for eg: pydoc-info package.)
So I request you to move old info-look to a sub directory.
This is definitely more of a "someday" task than an immediate need.
After looking a bit closer at gnuplot-context
, I realized that gnuplot.el
provides its own context-aware completion engine by defining a subset of the gnuplot language grammar and uses it to parse data for completion. While this is impressive in its own right, I wonder if there are no built-in tools in Emacs that would allow to directly define the gnuplot grammar and would do the parsing for us, which would alleviate the maintenance cost of 2k+ lines of non-trivial elisp.
After looking for built-in solutions, semantic seems to be a viable option, and would allow nice integration of other built-in tools (eldoc and info come to mind, since this package manages these as well).
Now this is definitely not something I feel like I could implement easily myself (at least in the near future), but I would like to give it a try at some point to get better at elisp. If anyone else would like to give it a go, they are more than welcome to open a PR and/or contact me on the matter.
Hi. It looks like this tree has been stable for at least a year now. Can we make a "release"? A git tag would be sufficient to mark the current tree as the 0.7 release. This would make it easier for distributions to distribute this.
Thanks
When a command that is continued to a next line is commented, the following lines are colored the opposite way: Comments as code and code as comments. See attached screenshot.
gnuplot-mode 0.7 (gnuplot 3.7)
GNU Emacs 24.5.1 (x86_64-pc-linux-gnu, GTK+ Version 3.18.9) of 2016-04-17
Ubuntu 16.04.1 LTS
kernel
4.4.0-34-generic x86_64 GNU/Linux
So, looking through the files of this repository, I see 8 different compilation or installation-related files (excluding INSTALL.org
). They also are pretty consequent files:
$ wc -l aclocal.m4 configure configure.ac install-sh Makefile.am Makefile.dst Makefile.in missing
700 aclocal.m4
3730 configure
19 configure.ac
527 install-sh
40 Makefile.am
39 Makefile.dst
729 Makefile.in
215 missing
5999 total
So the question is, do we really need all these files? I have never maintained an emacs package before but I am pretty sure most of these files are useless to some degree (even when manually installing this package).
Looking at the Makefiles in more details, I see that installing this package is a three step process:
I don't think a makefile is needed for any of these steps:
@tarsius I would like to now what you think about this situation. Would it be safe to simply remove all these Makfiles? What would the manual installation instructions look like without a Makefile?
Hi,
I've been using gnuplot-mode and especially the 'dedicated' option in 'gnuplot-inline-image-mode'. It's useful for me because I want to keep the plots contained within Emacs.
I'm interested in finding a way to invoke gnuplot directly from 'calc'. Basically, when I plot something with 'calc-graph-plot' I want the script to be sent to 'gnuplot-insert-inline-image-output' to open a new buffer. Is anything like this easily possible?
I just talked to @tarsius about packages maintained within the emacsorphanage. Since the orphanage gives the impression that a package is unmaintained I propose to move the package to a separate organization, maybe called emacs-gnuplot
. This would involve changing the recipes in Melpa and Elpa. What do you think @mtreca? See the comment JonWaltman/pcmpl-args.el#28 (comment) by @tarsius for context. Ideally the orphanage is only used for packages which currently lack a maintainer.
A fellow names John Hardy (among several who have contacted me over the last couple of years) said:
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:
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
Hi,
just a few days ago everything was working smoothly. However, recently I have noticed that when I open a gnuplot file with gnuplot-mode activated, the code is not colored anymore.
Any idea of what could cause this issue?
I use spacemacs (develop branch), gnuplot 5.4 and gnuplot-mode 0.7.
Thanks for all the work!
cheers
CI checks for GNU Emacs 25 keep failing.
@conao3 is there anything we can do to fix these?
I get this error with the current HEAD.
I triggered this by pressing C-c C-r in gnuplot-mode on a marked region
Currently, info commands of the package rely on having the gnupot manual installed and available to Emacs.
We could automate this process in two ways:
EDIT: I think the best way to implement this is to create a defcustom gnuplot-info-file that points by default to the info file supplied by gnuplot.el (which I need to bump to 5.0), and to note in the README that this variable can be overriden for users with different versions of gnuplot.
I spent a while filling out a bug report, and then the mail to your phys.washington.edu address bounced. Perhaps you could just make the function call (browse-url "https://github.com/bruceravel/gnuplot-mode/issues")
instead.
I just installed gnuplot 4.6 in Windows Vista, and then installed gnuplot-mode. Unfortunately, when I try to send the buffer to gnuplot, only the first line of the buffer seems to get sent (looking at the gnuplot window). I'm using pgnuplot.exe as my executable, but I've also tried gnuplot.exe and this doesn't help.
Note: If I use the latest version of gnuplot-mode.el by Mike McCourt, with the same gnuplot setup, it sends the whole buffer to gnuplot just fine, so the gnuplot setup does work (in theory).
Thanks.
When I press [C-c C-l]
send line of code which in gnuplot-mode to gnuplot-comint-mode. Or type code in gnuplot-comint-mode directly. But both failed.
After check out *gnuplot*
buffer content:
It shows:
Terminal type set to 'qt'
gnuplot> plot sin(x)
fit.log test.gnuplot test2.dat
org-babel-gnuplot.png test1.dat
I does not draw a plot image.
From Dan Maftei [email protected]:
Hello, thanks very much for your gnuplot emacs mode. I greatly appreciate it!
I am wondering if it's possible to open up the interactive gnuplot mode
buffer in a new frame rather than a new window? I looked through the code
at the gnuplot-make-gnuplot-buffer function to see if this were possible
but could not figure out how (I'm totally new to elisp).
Have you thought about this before?
Evans Winner points out that: ”make-local-hook seems to have been removed from Emacs 24. I found that it was a show-stopper until I commented the call out – this was line 1866 in my copy of the source.”
Hi
thanks for the code, which I use very often, really appreciated!
I run into the error mentioned in the subject line when sending a (any) region to a gnuplot buffer.
The issue seems to be related to the new version of the gnuplot-trim-gnuplot-buffer
function; this is where, at least, the debugger kicks in. Notice that the gnuplot code is executed ok (and plots generated as they should), but the evaluator triggers the error.
The issue kicks in when using gnuplot in org-mode buffers. In these cases the execution of the first gnuplot block triggers the error and the evaluation of the buffer (and other code blocks) stops.
I seem to get the error systematically. The old version works fine.
the bug seems to be old and already fixed, but it just appeared here again in emacs v24
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=451942
gnuplot.el:334:1:Warning: !! The file uses old-style backquotes !!
This functionality has been obsolete for more than 10 years already
and will be removed soon. See (elisp)Backquote in the manual.
(not sure whether this is the right place to ask, but let's see)
I'm plotting two series of data that's daily measurements, and a running average, from emacs.
I wish to have the daily measurements as points, the running averages as lines.
is there a way to do that? my guess was:
#+PLOT: ind:1 deps:(3 6 4 7) with:(points lines points lines)
but the list is not iterated and instead I get a Wrong type argument: stringp, (points lines points lines)
error.
gnuplot-mode 0.6.0 (gnuplot 4.6) -- report bugs with #("⇧Shift+Ctrl+C ⇧Shift+Ctrl+U" 0 6 (face ergoemacs-pretty-key) 7 11 (face ergoemacs-pretty-key) 12 13 (face ergoemacs-pretty-key) 14 20 (face ergoemacs-pretty-key) 21 25 (face ergoemacs-pretty-key) 26 27 (face ergoemacs-pretty-key))
gnuplot-mode was written back in the day of gnuplot version 3.5. Are there any new features since then that should be explicitly supported?
When I comment a line with comment-region emacs function, the text highlighting below this line is inverted:
comments are shown in the way that commands should be, and vice versa.
Note: I comment the line by selecting it pressing F4, which is bounded to the comment-region function in my ~/.emacs file: (global-set-key [f4] 'comment-region)
Emacs : GNU Emacs 24.4.1 (x86_64-pc-linux-gnu, GTK+ Version 3.14.5)
of 2015-03-07 on trouble, modified by Debian
Package: gnuplot-mode (version 0.7-beta)
Here is a test script for gnuplot:
reset
set encoding utf8
set terminal pngcairo enhanced
set grid
set xlabel 'α'
set ylabel 'Δβ'
set output "./test.png"
plot [x=0:5] exp(-x)*cos(5*x) with lines title "I_{b} = 0,2 Ампер"
When I run this from command line with gnuplot test.gpi
, I get the following output:
But when I open the same file in emacs and issue the command gnuplot-send-buffer-to-gnuplot
, I get:
I get this error in the middle of producing a dozen or so plots from an org file.
kill-region: Text is read-only: #<buffer gnuplot>
This is an old file that used to be able to generate the plots without errors. I can recreate the plots individually through the org-file fine. Only when I run them all at once, I get this error. I instrumented the kill-region function for Edebug to produce this trace:
kill-region(1 29)
kill-line()
gnuplot-trim-gnuplot-buffer()
run-hooks(gnuplot-after-plot-hook)
gnuplot-send-string-to-gnuplot(" " buffer)
gnuplot-send-region-to-gnuplot(1 575 buffer)
gnuplot-send-buffer-to-gnuplot()
org-babel-execute:gnuplot(" ...")
These are the versions:
: Emacs version: GNU Emacs 27.0.50 (build 1, x86_64-apple-darwin15.6.0, NS appkit-1404.47 Version 10.11.6 (Build 15G20015))
: org version: 9.1.13
: gnuplot 5.2 patchlevel 2
: gnuplot.el Version: 0.7.0
I guess this is the first place where intervention is needed:
I'm holding a spreadsheet in an emacs buffer, not yet decided whether to use ses
or org
., in both cases I have to go through gnuplot
and in particular org-plot makes use of gnuplot-mode
.
I'd like to grab the graph in a buffer, in svg format.
the svg format allows me further editing of the graph still using emacs.
my workflows using ses:
*gnuplot trail*
bufferthe workflow using org-plot is more complicated:
*gnuplot*
buffer and copy the commandsgnuplot-make-buffer
to open a new gnuplot bufferset terminal svg
*gnuplot*
bufferI do not see svg in the possible terminals offered by gnuplot-mode.
when terminal is set to svg, I would expect gnuplot-mode to do this:
first time gnuplot outputs svg code, it will be almost complete (misses the closing svg tag).
subsequent times it starts immediately after the closing defs tag.
Hi,
after a fresh install of Linux Mint 18.1 Serena I have a problem with gnuplot-mode detecting the installed version of Gnuplot and reverting to 3.7. In the message buffer of Emacs I get
gnuplot-mode 0.7-beta -- determining gnuplot version ......
Warning: could not determine gnuplot version, guessing 3.7
gnuplot-mode 0.7-beta (gnuplot 3.7) -- report bugs with "C-c C-u"
Here some details on the version of the programs installed:
GNU Emacs 24.5.1 (x86_64-pc-linux-gnu, GTK+ Version 3.18.9)
gnuplot 5.0 patchlevel 3
gnuplot-mode 0.7-beta
Do you have any guess on why? Workaround?
Let me take this opportunity to thank all of you for your work really helpful in may daily working life.
Best,
Running make -f Makefile.dst test
for testing fails with error:
In toplevel form:
gnuplot-test-context.el:5:1:Error: Symbol’s value as variable is void: gnuplot-token
make: *** [Makefile.dst:21: gnuplot-test-context.elc] Error 1
When entering gnuplot-mode in emacs, it suggests using "C-c C-u" for bugreporting.
However C-c C-u sends an email to Bruce Ravel who is no more active.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.