GNU bug report logs - #50237
28.0.50; [calc] Default terminal when plotting in gnuplot without x11 support

Previous Next

Package: emacs;

Reported by: Ihor Radchenko <yantar92 <at> gmail.com>

Date: Sat, 28 Aug 2021 10:20:02 UTC

Severity: normal

Tags: moreinfo

Found in version 28.0.50

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #22 received at 50237 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Ihor Radchenko <yantar92 <at> gmail.com>
Cc: 50237 <at> debbugs.gnu.org
Subject: Re: bug#50237: 28.0.50; [calc] Default terminal when plotting in
 gnuplot without x11 support
Date: Tue, 31 Aug 2021 03:48:26 +0200
Ihor Radchenko <yantar92 <at> 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




This bug report was last modified 3 years and 260 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.