|
From: <arn...@we...> - 2004-01-07 09:07:16
|
On Tue, 6 Jan 2004, Hans-Bernhard Broeker wrote:
> On Tue, 6 Jan 2004, Arnd Baecker wrote:
>
> > Redoing the copy and paste a second time it works as expected. (setting
> > `unset mouse` or -nofeedback did not change anything).
>
> That's the original X11 buffering/pasting problem alright, but possibly
> in a new disguise. It shouldn't happen in "unset mouse" mode, though.
> You may have to disable both mouse and feedback now.
I tried this as well, however, the problem remains.
> AFAICS, the problem happens whenever keyboard input arrives while gnuplot
> is in the process of drawing a plot. Both font size feedback and mouse
> command feedback try to feed their input into the same channel as the
> keyboard, leading to a kind of race-condition. The process is entirely
> timing-dependent, and thus quite hard to debug.
Yes this is really nasty (sorry for bringing it up again ;-) -
anyway, I am just wondering if there is any chance at all that
this can be made to work in a reliable way?
Are there any reasonable alternatives?
Alright, then I tried to re-compile with
./configure --disable-mouse
Here the compile ended with
if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../term -I../term
-DBINDIR=\"/home/python/PYTHON//bin\"
-DX11_DRIVER_DIR=\"/home/python/PYTHON//libexec/gnuplot/3.8k\"
-DCONTACT=\"gnu...@li...\"
-DHELPFILE=\"/home/python/PYTHON//share/gnuplot/3.8k/gnuplot.gih\"
-I/usr/X11R6/include -I/usr/include/libpng12 -g -O2 -MT term.o -MD -MP
-MF ".deps/term.Tpo" \
-c -o term.o `test -f 'term.c' || echo './'`term.c; \
then mv -f ".deps/term.Tpo" ".deps/term.Po"; \
else rm -f ".deps/term.Tpo"; exit 1; \
fi
In file included from term.h:267,
from term.c:1043:
../term/x11.trm: In function `X11_args':
../term/x11.trm:304: error: `X11_MOUSE_FEEDBACK' undeclared (first use in
this function)
../term/x11.trm:304: error: (Each undeclared identifier is reported only
once
../term/x11.trm:304: error: for each function it appears in.)
make[3]: *** [term.o] Error 1
make[3]: Leaving directory
`/home/python/INSTALL_PYTHON/CompileDir/gnuplot/src'
I.e., the source of this error are the lines
if (strcmp(*argv, "-nofeedback") == 0)
X11_MOUSE_FEEDBACK = FALSE;
Commenting out these two lines compilation happily continued to the end.
With this there is no problem with pasting anymore
(however, all the nice mousing stuff is gone ;-)...)
Two more remarks:
1.) I mentioned in my previous mail (in the P.P.S.) that I have
some problems when piping commands to gnuplot.
Whereas an `unset mouse` did not cure them, the
--disable-mouse did.
So all this feedback and mousing stuff seems problematic
when sending commands to gnuplot via a pipe...
2.) I'd really love to have mousing working, even when gnuplot
is steered via a pipe.
Example:
- do a plot (in my case from python)
- send a "pause mouse" command
- read MOUSE_X and MOUSE_Y back to the calling program
- start some program/computation with these coords
as input
- go to step one with the new data
See http://www.physik.tu-dresden.de/~baecker/python/plot.html
for a brief example on how to get variables from gnuplot
back to python.
Regards,
Arnd
|