|
From: Ethan A M. <EAM...@gm...> - 2018-07-15 22:15:00
|
On Sunday, 15 July 2018 15:16:35 Gunter Königsmann wrote:
> >
> > That's from 10 years ago, but the answer is correct.
> > Instead of "pause -1" you want some variant of "pause mouse",
> > possibly "pause mouse close"
> > .
>
> That was exactly what I was searching for.
>
> On my gnuplot 5.2 patchlevel 2 it only nearly does what I want, though:
>
> It waits until I first close the window and then press <enter> in the
> terminal I opened gnuplot from. If I first press <enter> in the terminal
> and then close the gnuplot window or fail to press <enter> gnuplot won't
> close.
>
> I'll attach a simple testfile to this mail.
>
> gnuplot wait.gnuplot
>
> doesn't work as expected but
>
> echo |gnuplot wait.gnuplot
>
> does.
>
> If I did the Right Thing perhaps I can mimic the latter command somehow...
I think you are running into idiosyncracies of the particular
desktop manager or environment. The issue is due partly to what
signal is sent when the plot window is closed, and which process that
signal is delivered to. There may also be a difference depending on
which interactive gnuplot terminal is being used.
For my desktop (KDE 5) and the qt terminal, I get the behavior you
want if I close the plot window with "q" or "cntrl-q" but not if I
close it with "alt-F4" or the window border decoration "x".
Both qt and x11 work as desired if I add the command
bind "Close" "exit gnuplot"
before the pause command.
Ethan
>
> Kind regards,
>
> Gunter.
|