unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Po Lu <luangruo@yahoo.com>
To: Herman <mahlamytsike@gmail.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: 'x-create-frame' succeeds, but 'x-open-connection' fails with same display argument
Date: Mon, 04 Dec 2023 08:31:29 +0800	[thread overview]
Message-ID: <87il5eoljy.fsf@yahoo.com> (raw)
In-Reply-To: <20231204021112.07410c13@Elitebook> (Herman's message of "Mon, 4 Dec 2023 02:11:12 +0200")

Herman <mahlamytsike@gmail.com> writes:

> Hi !
>
> $ emacs --fg-daemon
> $ 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-create-frame \`((display . ,(getenv \"DISPLAY\"))))"
> #<frame *scratch* - GNU Emacs 0x55db73fd9c30>
> $ 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
> $ 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 29.1.
>
> /--- 30.2 Multiple Terminals topic in Elisp manual says,
> 'x-open-connection' can be tested for communication with a given X
> display. What I have missed ?
>
> Thank you in advance for your help !

I think this is a bug in Emacs, since the display is opened but a font
configuration event arrives shortly after it does, and triggers some
form of bug where, as no frame on that display then exists,
get-device-terminal signals that the display in the configuration event
is nonexistent.



  reply	other threads:[~2023-12-04  0:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-04  0:11 'x-create-frame' succeeds, but 'x-open-connection' fails with same display argument Herman
2023-12-04  0:31 ` Po Lu [this message]
2023-12-04  3:31   ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87il5eoljy.fsf@yahoo.com \
    --to=luangruo@yahoo.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=mahlamytsike@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).