* FAQ: gnuplot vs. emacs' compile command @ 2003-05-10 5:31 Dan Jacobson 2003-05-11 4:42 ` Dan Jacobson 0 siblings, 1 reply; 7+ messages in thread From: Dan Jacobson @ 2003-05-10 5:31 UTC (permalink / raw) Cc: bug-gnu-emacs The following message is a courtesy copy of an article that has been posted to comp.graphics.apps.gnuplot as well. What's the big problem that $ cat Makefile gp: echo "plot 'file';pause -1"|gnuplot -persist $ make #works fine $ emacs -eval '(compile "make")' #doesn't plot anything. $ emacs -eval '(shell-command "make")' #works wonderfully $ emacs -eval '(shell-command "make&")' #doesn't plot anything Sure you'll tell me to see /usr/share/doc/gnuplot-doc/0FAQ.gz's "7.10 Calling gnuplot in a pipe or with a gnuplot-script doesn't produce a plot!" but even that fancy perl example doesn't cover my emacs vs. gnuplot dilemma. Or you will try to change the subject by offering http://feff.phys.washington.edu/~ravel/software/gnuplot-mode/ But that doesn't answer my question of how does one run gnuplot from a Makefile in GNU emacs' compile mode? Don't tell me that there is no way for this to be overcome. I will never be able to do it "because the technology Jacobson was asking for was 5-10 years in the future." "He was essentially asking for plugging the standard input to the standard putoff, no simple algorithm there." OK, one can indeed do gp: echo -e 1\\n2 > a echo "plot 'a';pause $p" > b gnuplot b With p=-1, the compilation never finished even after the window closes. With p=5 etc, one has to set an arbitrary time limit, however the compilation will indeed finish. -persist doesn't help here. -- http://jidanni.org/ Taiwan(04)25854780 ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: FAQ: gnuplot vs. emacs' compile command 2003-05-10 5:31 FAQ: gnuplot vs. emacs' compile command Dan Jacobson @ 2003-05-11 4:42 ` Dan Jacobson 2003-05-13 3:47 ` Dan Jacobson 0 siblings, 1 reply; 7+ messages in thread From: Dan Jacobson @ 2003-05-11 4:42 UTC (permalink / raw) The following message is a courtesy copy of an article that has been posted to comp.graphics.apps.gnuplot as well. cd /tmp && echo -e 1 1\\n2 2 >file && cat >Makefile<<! gp: echo "plot 'file';pause -1"|gnuplot -persist ! emacs -eval '(compile "make")' #doesn't plot anything. emacs -eval '(shell-command "make&")' #doesn't plot anything emacs -eval '(shell-command "make")' #works wonderfully make #works fine H> Quite hard to tell, actually. You've piled up three big programs H> together (four, if you count in the shell), and somehow the combination H> of all of them fails to do quite exactly what you want. H> H> From the symptoms you quote, I'd put the blame at emacs, or the way H> you're using it. You're also over-doing things on the gnuplot end a H> bit. You should use either "pause -1", or "-persist". Doing both is H> not generally useful. H> H> "Doesn't plot anything" is not the whole story, either. What *else* H> do you see? I.e.: what _does_ it do? What is displayed in your H> *compile* buffer in emacs? Did you actually type a <Return> into the H> compilation buffer to satisfy your "pause -1"? No, it's all over before I have a chance. Using emacs -eval '(compile "make")' With: echo "plot 'file';pause -1"|gnuplot -persist just flashes the graph for a split second. With: echo "plot 'file'" |gnuplot echo "plot 'file'" |gnuplot -persist echo "plot 'file';pause -1"|gnuplot apparently gnuplot acts like a noop, no graph is seen; gnuplot's exit value is 0. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: FAQ: gnuplot vs. emacs' compile command 2003-05-11 4:42 ` Dan Jacobson @ 2003-05-13 3:47 ` Dan Jacobson 2004-02-12 14:43 ` Kim F. Storm 0 siblings, 1 reply; 7+ messages in thread From: Dan Jacobson @ 2003-05-13 3:47 UTC (permalink / raw) Cc: arafune Fellas, the gnuplot team may have found ugly emacs process bugs, see http://groups.google.com/groups?threadm=b9o6mk$4q1$1%40nets3.rz.RWTH-Aachen.DE ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: FAQ: gnuplot vs. emacs' compile command 2003-05-13 3:47 ` Dan Jacobson @ 2004-02-12 14:43 ` Kim F. Storm 2004-02-12 19:34 ` Stefan Monnier 0 siblings, 1 reply; 7+ messages in thread From: Kim F. Storm @ 2004-02-12 14:43 UTC (permalink / raw) Cc: Dan Jacobson, arafune Did anyone actually look at this bug back in May ? FYI, I have included the text at the referenced link here. Dan Jacobson <jidanni@dman.ddts.net> writes: > Fellas, the gnuplot team may have found ugly emacs process bugs, see > <...> > : Dan Jacobson <jidanni@dman.ddts.net> wrote: : : > Using emacs -eval '(compile "make")' : > With: echo "plot 'file';pause -1"|gnuplot -persist : > just flashes the graph for a split second. : : So let's get into dissecting this further. The first candidate to : remove is 'make'. It doesn't really do anything useful in this whole : setup, so we might as well get rid of it. Let's replace it by a shell : script doing the same things. And while at it, let's get rid of the : separate data file, too: : : --- gpaction --- : gnuplot -persist <<EOS : plot '-' : 1 1 : 2 2 : e : EOS : ---- end --- : : sh gpaction # does the plot and returns : emacs -eval '(compile "sh gpaction")' # doesn't plot, but returns : emacs -eval '(shell-command "sh gpaction")' # plot, but no return : : For the latter, emacs is unresponsive --- it's obviously waiting for : something to happen, which doesn't. Only after you terminate the : gnuplot graph window (key 'q' into it), or press Ctrl-G in emacs to : forcibly break out of the wait loop, it will continue. : : During that pause, look at the output from 'ps jx' and you'll find : that gnuplot_x11 is an orphan --- i.e. it's the only surviving process : in its process group. In "shell-command", emacs apparently doesn't : kill it, whereas in "compile", it probably does. : -- : Hans-Bernhard Broeker (broeker@physik.rwth-aachen.de) : Even if all the snow were burnt, ashes would remain. -- Kim F. Storm http://www.cua.dk ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: FAQ: gnuplot vs. emacs' compile command 2004-02-12 14:43 ` Kim F. Storm @ 2004-02-12 19:34 ` Stefan Monnier 2004-02-12 22:47 ` Kim F. Storm 0 siblings, 1 reply; 7+ messages in thread From: Stefan Monnier @ 2004-02-12 19:34 UTC (permalink / raw) Cc: Dan Jacobson, arafune, emacs-devel > Did anyone actually look at this bug back in May ? > FYI, I have included the text at the referenced link here. What is the bug exactly? My understanding is of the problem: when Emacs exits, gnuplot is killed because its stdout is connected to Emacs (i.e. it receives a SIGPIPE or SIGHUP or somesuch). Stefan > Dan Jacobson <jidanni@dman.ddts.net> writes: >> Fellas, the gnuplot team may have found ugly emacs process bugs, see >> <...> >> > : Dan Jacobson <jidanni@dman.ddts.net> wrote: > : > : > Using emacs -eval '(compile "make")' > : > With: echo "plot 'file';pause -1"|gnuplot -persist > : > just flashes the graph for a split second. > : > : So let's get into dissecting this further. The first candidate to > : remove is 'make'. It doesn't really do anything useful in this whole > : setup, so we might as well get rid of it. Let's replace it by a shell > : script doing the same things. And while at it, let's get rid of the > : separate data file, too: > : > : --- gpaction --- > : gnuplot -persist <<EOS > : plot '-' > : 1 1 > : 2 2 > : e > : EOS > : ---- end --- > : > : sh gpaction # does the plot and returns > : emacs -eval '(compile "sh gpaction")' # doesn't plot, but returns > : emacs -eval '(shell-command "sh gpaction")' # plot, but no return > : > : For the latter, emacs is unresponsive --- it's obviously waiting for > : something to happen, which doesn't. Only after you terminate the > : gnuplot graph window (key 'q' into it), or press Ctrl-G in emacs to > : forcibly break out of the wait loop, it will continue. > : > : During that pause, look at the output from 'ps jx' and you'll find > : that gnuplot_x11 is an orphan --- i.e. it's the only surviving process > : in its process group. In "shell-command", emacs apparently doesn't > : kill it, whereas in "compile", it probably does. > : -- > : Hans-Bernhard Broeker (broeker@physik.rwth-aachen.de) > : Even if all the snow were burnt, ashes would remain. > -- > Kim F. Storm http://www.cua.dk > _______________________________________________ > Emacs-devel mailing list > Emacs-devel@gnu.org > http://mail.gnu.org/mailman/listinfo/emacs-devel ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: FAQ: gnuplot vs. emacs' compile command 2004-02-12 19:34 ` Stefan Monnier @ 2004-02-12 22:47 ` Kim F. Storm 2004-02-13 0:05 ` Dan Jacobson 0 siblings, 1 reply; 7+ messages in thread From: Kim F. Storm @ 2004-02-12 22:47 UTC (permalink / raw) Cc: arafune, Dan Jacobson, emacs-devel Stefan Monnier <monnier@iro.umontreal.ca> writes: > > Did anyone actually look at this bug back in May ? > > FYI, I have included the text at the referenced link here. > > What is the bug exactly? I don't know. Dan, can you elaborate? > My understanding is of the problem: > when Emacs exits, gnuplot is killed because its stdout is connected to > Emacs (i.e. it receives a SIGPIPE or SIGHUP or somesuch). .. which emacs cannot do anything about. > > > Stefan > > > > Dan Jacobson <jidanni@dman.ddts.net> writes: > > >> Fellas, the gnuplot team may have found ugly emacs process bugs, see > >> <...> > >> > > > : Dan Jacobson <jidanni@dman.ddts.net> wrote: > > : > > : > Using emacs -eval '(compile "make")' > > : > With: echo "plot 'file';pause -1"|gnuplot -persist > > : > just flashes the graph for a split second. > > : > > : So let's get into dissecting this further. The first candidate to > > : remove is 'make'. It doesn't really do anything useful in this whole > > : setup, so we might as well get rid of it. Let's replace it by a shell > > : script doing the same things. And while at it, let's get rid of the > > : separate data file, too: > > : > > : --- gpaction --- > > : gnuplot -persist <<EOS > > : plot '-' > > : 1 1 > > : 2 2 > > : e > > : EOS > > : ---- end --- > > : > > : sh gpaction # does the plot and returns > > : emacs -eval '(compile "sh gpaction")' # doesn't plot, but returns > > : emacs -eval '(shell-command "sh gpaction")' # plot, but no return > > : > > : For the latter, emacs is unresponsive --- it's obviously waiting for > > : something to happen, which doesn't. Only after you terminate the > > : gnuplot graph window (key 'q' into it), or press Ctrl-G in emacs to > > : forcibly break out of the wait loop, it will continue. > > : > > : During that pause, look at the output from 'ps jx' and you'll find > > : that gnuplot_x11 is an orphan --- i.e. it's the only surviving process > > : in its process group. In "shell-command", emacs apparently doesn't > > : kill it, whereas in "compile", it probably does. > > : -- > > : Hans-Bernhard Broeker (broeker@physik.rwth-aachen.de) > > : Even if all the snow were burnt, ashes would remain. > > > -- > > Kim F. Storm http://www.cua.dk > > > > > _______________________________________________ > > Emacs-devel mailing list > > Emacs-devel@gnu.org > > http://mail.gnu.org/mailman/listinfo/emacs-devel > > -- Kim F. Storm <storm@cua.dk> http://www.cua.dk ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: FAQ: gnuplot vs. emacs' compile command 2004-02-12 22:47 ` Kim F. Storm @ 2004-02-13 0:05 ` Dan Jacobson 0 siblings, 0 replies; 7+ messages in thread From: Dan Jacobson @ 2004-02-13 0:05 UTC (permalink / raw) I recall the gnuplot author had a lot of response. I am only good at finding bugs, not following up. If next time I run into a bug, you'll be sure to hear from me. ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2004-02-13 0:05 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2003-05-10 5:31 FAQ: gnuplot vs. emacs' compile command Dan Jacobson 2003-05-11 4:42 ` Dan Jacobson 2003-05-13 3:47 ` Dan Jacobson 2004-02-12 14:43 ` Kim F. Storm 2004-02-12 19:34 ` Stefan Monnier 2004-02-12 22:47 ` Kim F. Storm 2004-02-13 0:05 ` Dan Jacobson
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/emacs.git https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.