|
From: Ethan M. <merritt@u.washington.edu> - 2009-02-13 00:01:04
|
On Thursday 12 February 2009 15:28:06 Petr Mikulik wrote: > > > I was thinking how to smoothly support x11, wxt, and others, in a portable > > > way. What about: > > > > > > set term screen ... options ... > > > or > > > set term default ... options ... > > > > > > There, the "screen" terminal is that after gnuplot's start-up, i.e. that in > > > GPVAL_TERM. Then, Octave (or others) won't have to care about > > > set term x11 > > > set term win > > > set term aqua > > > etc.; it will just do > > > set term screen|default|other_synonym Let's go back to the beginning. What exactly is the problem that is being solved? At time of entry you get some default terminal. If you want to force that before hand, you can either set GNUTERM as an environmental variable, or you could invoke the program as "gnuplot -e 'set term foo'" or you could place a "set term" command in ~/.gnuplot. At this point the terminal that was selected on entry is stored in GPVAL_TERM. If you want to keep a copy, you can say SAVE_TERM = GPVAL_TERM. At this point I lost the chain of argument. What is it that you want to do with this saved terminal? Something different from "set term push" ? I think both "set term screen" and "set term current" are horribly confusing. Why are they not no-ops? > > > Gnuplot will have to ensure that all "set term x11|wxt|qt|win|pm|aqua" > > > options are the same (or silently ignored if not relevant). > > > > Don't we already have "set termoption" for that? > > It would have to be expanded to accept the size/position commands > > (if they ever exist on these other terminals) but other than that > > I think it does exactly what you want. I have been thinking that > > the termoption command could accept additional options anyhow. > > I wonder which method is better. In your proposed case, the > set termoption XXX > would have to be identical to > set terminal CURRENT XXX > > I have just added a patch for the proposed > set term screen XXX > into sourceforge: > https://sourceforge.net/tracker/index.php?func=detail&aid=2594217&group_id=2055&atid=302055 > > What is better? This: > set term screen 2 title 'hello' > or > set termopt 2 title 'hello' > ? > > Maybe we could also add > set term current XXX > > > --- > PM > -- Ethan A Merritt Biomolecular Structure Center University of Washington, Seattle 98195-7742 |