unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#67628: Emacs 29.1: (x-open-connection (getenv "DISPLAY")) gets "Display :0.0 does not exist" error
@ 2023-12-04 17:31 Herman
  2023-12-04 20:11 ` Eli Zaretskii
  0 siblings, 1 reply; 15+ messages in thread
From: Herman @ 2023-12-04 17:31 UTC (permalink / raw)
  To: 67628

Hi !

'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.

Tested also on Emacs 28.2 and there error is not present regardless of the value of the variable 'debug-on-error'.

xfwm4 4.18.0
xorg-server 21.1.9
Emacs 29.1
Archlinux

How to reproduce:
#################

$ emacs --fg-daemon -Q
...
Starting Emacs daemon.
$ emacsclient --eval "(setq debug-on-error t)"
t
$ emacsclient --eval "(x-open-connection (getenv \"DISPLAY\"))"
nil
...
Debugger entered--Lisp error: (error "Display :0.0 does not exist")
  signal(error ("Display :0.0 does not exist"))
  error("Display %s does not exist" ":0.0")
  get-device-terminal(":0.0")
  frames-on-display-list(":0.0")
  font-setting-change-default-font(":0.0" nil)
  dynamic-setting-handle-config-changed-event((config-changed-event font-render ":0.0"))
  funcall-interactively(dynamic-setting-handle-config-changed-event (config-changed-event font-render ":0.0"))
  call-interactively(dynamic-setting-handle-config-changed-event nil [(config-changed-event font-render ":0.0")])
  command-execute(dynamic-setting-handle-config-changed-event nil [(config-changed-event font-render ":0.0")] t)

The full testing:
#################

$ emacs --fg-daemon -Q
...
Starting Emacs daemon.
$ emacsclient --eval "(setq debug-on-error t)"
t
$ emacsclient --eval "debug-ignored-errors"
(beginning-of-line beginning-of-buffer end-of-line end-of-buffer end-of-file buffer-read-only file-supersession mark-inactive user-error)
$ emacsclient --eval "debug-on-signal"
nil
$ emacsclient --eval "debug-on-event"
sigusr2
$ emacsclient --eval "(terminal-list)"
(#<terminal 0 on initial_terminal>)
$ emacsclient --eval "(get-device-terminal nil)"
#<terminal 0 on initial_terminal>
$ emacsclient --eval "(x-display-list)"
nil
$ emacsclient --eval "(x-open-connection (getenv \"DISPLAY\"))"
nil
...
Debugger entered--Lisp error: (error "Display :0.0 does not exist")
  signal(error ("Display :0.0 does not exist"))
  error("Display %s does not exist" ":0.0")
  get-device-terminal(":0.0")
  frames-on-display-list(":0.0")
  font-setting-change-default-font(":0.0" nil)
  dynamic-setting-handle-config-changed-event((config-changed-event font-render ":0.0"))
  funcall-interactively(dynamic-setting-handle-config-changed-event (config-changed-event font-render ":0.0"))
  call-interactively(dynamic-setting-handle-config-changed-event nil [(config-changed-event font-render ":0.0")])
  command-execute(dynamic-setting-handle-config-changed-event nil [(config-changed-event font-render ":0.0")] t)

$ emacs --fg-daemon -Q
...
Starting Emacs daemon.
$ emacsclient --eval "(setq debug-on-error t)"
t
$ emacsclient --eval "(x-create-frame \`((display . ,(getenv \"DISPLAY\"))))"
#<frame *scratch* - GNU Emacs at Elitebook 0x55f5f31eeba0>
$ emacsclient --eval "(terminal-list)"
(#<terminal 0 on initial_terminal> #<terminal 1 on :0.0>)
$ emacsclient --eval "(get-device-terminal nil)"
#<terminal 1 on :0.0>
$ emacsclient --eval "(x-display-list)"
(":0.0")
$ emacsclient --eval "(kill-emacs)"
$ emacs --fg-daemon -Q
...
Starting Emacs daemon.
$ emacsclient --eval "(x-open-connection (getenv \"DISPLAY\"))"
nil
$ emacsclient --eval "(x-display-list)"
(":0.0")
$ emacsclient --eval "(terminal-list)"
(#<terminal 0 on initial_terminal> #<terminal 1 on :0.0>)
$ emacsclient --eval "(get-device-terminal nil)"
#<terminal 0 on initial_terminal>





^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2023-12-09  9:12 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-04 17:31 bug#67628: Emacs 29.1: (x-open-connection (getenv "DISPLAY")) gets "Display :0.0 does not exist" error Herman
2023-12-04 20:11 ` Eli Zaretskii
2023-12-04 22:44   ` Herman
2023-12-05 12:30     ` Eli Zaretskii
2023-12-05 12:37       ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-12-06 11:54         ` Eli Zaretskii
2023-12-06 12:21           ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-12-06 12:38             ` Eli Zaretskii
2023-12-06 12:40               ` Eli Zaretskii
2023-12-06 12:50                 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-12-06 13:15                   ` Eli Zaretskii
2023-12-07  1:01                     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-12-09  9:12                       ` Eli Zaretskii
2023-12-06 12:41               ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-12-06 13:10                 ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).