GNU bug report logs - #67628
Emacs 29.1: (x-open-connection (getenv "DISPLAY")) gets "Display :0.0 does not exist" error

Previous Next

Package: emacs;

Reported by: Herman <mahlamytsike <at> gmail.com>

Date: Mon, 4 Dec 2023 20:02:01 UTC

Severity: normal

Full log


View this message in rfc822 format

From: Herman <mahlamytsike <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 67628 <at> debbugs.gnu.org
Subject: bug#67628: Emacs 29.1: (x-open-connection (getenv "DISPLAY")) gets "Display :0.0 does not exist" error
Date: Tue, 5 Dec 2023 00:44:05 +0200
On Mon, 04 Dec 2023 22:11:43 +0200
Eli Zaretskii <eliz <at> gnu.org> wrote:

> > Date: Mon, 4 Dec 2023 19:31:38 +0200
> > From: Herman <mahlamytsike <at> gmail.com>
> > 
> > 'x-create-frame' succeeds, but 'x-open-connection' fails with same
> > display argument.
> > 
> > This error "Display :0.0 does not exist" happens only, when
> > variable 'debug-on-error' is non-nil. When 'debug-on-error' is nil,
> > the error is not present. I.e. it works on the principle - you get
> > what you are looking for.  
> 
> It could be that the code catches the error and proceeds, but your
> setting debug-on-error non-nil prevents that.
> 
> Why do you need to set debug-on-error in that case?

At first I also thought that it is actually normal to catch an error when debug is enabled. I had debug turned on to look for other errors.

One argument could be that in version 28.2 debug did not catch such an error when debug is enabled. Version 29.1 behaves differently.

Another argument is that in the Elisp manual, in the Multiple terminals chapter, it is written that: "Normally, Emacs Lisp programs need not call 'x-open-connection' function, as 'make-frame-on-display' calls it automatically. The only reason for calling it is to check whether communication can be established with a given X display." 
If in 29.1 now 
$ emacs --daemon -Q
$ emacsclient -e "(setq debug-on-error t)"
then 
$ emacsclient -e "(make-frame-on-display (getenv \"DISPLAY\"))"
does not give an error, i.e. the display is found

but if
$ emacs --daemon -Q
$ emacsclient -e "(setq debug-on-error t)"
then
$ emacsclient -e "(x-open-connection (getenv \"DISPLAY\"))"
gives an error, i.e. the display does not exist.




This bug report was last modified 1 year and 253 days ago.

Previous Next


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