From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs 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 Message-ID: <87zgsy5qqd.fsf@gnus.org> References: <87eeadub04.fsf@localhost> <87a6l0dn65.fsf@gnus.org> <87a6kzngae.fsf@localhost> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25983"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 50237@debbugs.gnu.org To: Ihor Radchenko Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Aug 31 03:49:28 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mKsu0-0006Yf-2R for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 31 Aug 2021 03:49:28 +0200 Original-Received: from localhost ([::1]:43670 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mKstx-0000fN-SN for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 30 Aug 2021 21:49:25 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39034) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mKstb-0000ez-1L for bug-gnu-emacs@gnu.org; Mon, 30 Aug 2021 21:49:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49152) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mKsta-0000IB-QI for bug-gnu-emacs@gnu.org; Mon, 30 Aug 2021 21:49:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mKsta-0002jq-A2 for bug-gnu-emacs@gnu.org; Mon, 30 Aug 2021 21:49:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 31 Aug 2021 01:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50237 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 50237-submit@debbugs.gnu.org id=B50237.163037452210499 (code B ref 50237); Tue, 31 Aug 2021 01:49:02 +0000 Original-Received: (at 50237) by debbugs.gnu.org; 31 Aug 2021 01:48:42 +0000 Original-Received: from localhost ([127.0.0.1]:60698 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mKstG-0002jG-EA for submit@debbugs.gnu.org; Mon, 30 Aug 2021 21:48:42 -0400 Original-Received: from quimby.gnus.org ([95.216.78.240]:41328) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mKstE-0002j1-39 for 50237@debbugs.gnu.org; Mon, 30 Aug 2021 21:48:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=kJXqsviGpcK37vwV241xz6H7qccKHzU9WBUstpwiEo8=; b=ShHVMkeRHYCdiZ/VaAQZ1sfD6c N0U9voCueq48Kk0tvahpxhJ9cxqMkk0GlaBhCPqFegwrOPjgmWm9b9c47Amp74qLg5gSsh+8ZLPE3 DGT2wuIxgZR9+FsPjsNBjjYYAHUYFROE4Wd6G9TUWVViDbm0HJqmd91H0tPSPLl6QDGo=; Original-Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mKst3-0005Tb-9N; Tue, 31 Aug 2021 03:48:33 +0200 In-Reply-To: <87a6kzngae.fsf@localhost> (Ihor Radchenko's message of "Mon, 30 Aug 2021 22:44:25 +0800") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:213061 Archived-At: Ihor Radchenko 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