bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#50237: 28.0.50; [calc] Default terminal when plotting in gnuplot wit


From: Lars Ingebrigtsen
Subject: bug#50237: 28.0.50; [calc] Default terminal when plotting in gnuplot without x11 support
Date: Tue, 31 Aug 2021 03:48:26 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Ihor Radchenko <yantar92@gmail.com> writes:

> Sorry, I was not clear enough. My Emacs is compiled with X11 support,
> but my Gnuplot does not have X11 support. To reproduce, you need to
> compile Gnuplot without X11 support.

Oh, I see.

Looking at the `calc-graph-plot', it guesses at the display type to use
by looking at what abilities the Emacs has:

                    ((calc-graph-w32-p)
                     "qt")
                    ((or (eq window-system 'x) (getenv "DISPLAY"))

So it's doing a "set terminal x11", which then gnuplot rejects.

For this to work correctly, I think calc would have to ask gnuplot:

> The following is output of "set term" command in gnuplot. x11 terminal
> is not there.
>
> Available terminal types:
>        cairolatex  LaTeX picture environment using graphicx package and Cairo 
> backend
>            canvas  HTML Canvas object
>               cgm  Computer Graphics Metafile
>           context  ConTeXt with MetaFun (for PDF documents)
>           domterm  DomTerm terminal emulator with embedded SVG

And then parse the output to see whether gnuplot supports our guess?
Or see what gnuplot said when we tried to change the terminal...  Hm...

Let's see...

(calc-gnuplot-command "set terminal" "lala")

gnuplot> 
Terminal type is now 'unknown'
                      ^
         unknown or ambiguous terminal type; type just 'set terminal' for a list

Yup, that got the expected error...

OK; I've now pushed a fix for this to Emacs 28 which seems to work in my
simulated test case.  Can you update Emacs and see whether it works for
you, too?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

[Prev in Thread] Current Thread [Next in Thread]