[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: FAQ: gnuplot vs. emacs' compile command
From: |
Dan Jacobson |
Subject: |
Re: FAQ: gnuplot vs. emacs' compile command |
Date: |
Sun, 11 May 2003 12:42:29 +0800 |
User-agent: |
Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2 (i386-pc-linux-gnu) |
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.