From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#67628: Emacs 29.1: (x-open-connection (getenv "DISPLAY")) gets "Display :0.0 does not exist" error Date: Tue, 05 Dec 2023 14:30:41 +0200 Message-ID: <83a5qo6dce.fsf@gnu.org> References: <20231204193138.3bb398b8@Elitebook> <83il5d683k.fsf@gnu.org> <20231205004405.3fc7190e@Elitebook> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29871"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 67628@debbugs.gnu.org To: Herman , Po Lu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Dec 05 13:32:48 2023 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 1rAUbX-0007SE-H1 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 05 Dec 2023 13:32:47 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rAUaj-0005Yd-2G; Tue, 05 Dec 2023 07:31:57 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rAUag-0005Vs-Ko for bug-gnu-emacs@gnu.org; Tue, 05 Dec 2023 07:31:55 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rAUad-0006a7-HV for bug-gnu-emacs@gnu.org; Tue, 05 Dec 2023 07:31:54 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rAUao-0002A4-9m for bug-gnu-emacs@gnu.org; Tue, 05 Dec 2023 07:32:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 05 Dec 2023 12:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67628 X-GNU-PR-Package: emacs Original-Received: via spool by 67628-submit@debbugs.gnu.org id=B67628.17017794848240 (code B ref 67628); Tue, 05 Dec 2023 12:32:02 +0000 Original-Received: (at 67628) by debbugs.gnu.org; 5 Dec 2023 12:31:24 +0000 Original-Received: from localhost ([127.0.0.1]:36717 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rAUaB-00028p-P9 for submit@debbugs.gnu.org; Tue, 05 Dec 2023 07:31:24 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53186) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rAUa6-00028W-2D for 67628@debbugs.gnu.org; Tue, 05 Dec 2023 07:31:22 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rAUZp-0006QT-2H; Tue, 05 Dec 2023 07:31:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=dtwNjPhsr7yjc1UuvJfP7v2YJF5blv9T3YXQBMCS8ls=; b=i4hd57kwZaCc rQs59zzMTNgjqOlYbNVEsOhGJKu42nVsgjfNQEx9bAFnC9n6VvN7gRpZYmEc+QNaNx1F2o4QbeIBQ KwrX1Gk9NAKREwSNgIEF5eARufqmMoDF5f5aey1s09IiO5V9rOO4570CCKBXOZkz+2DZDMQMiUTll AQiT7bXo7fycdZ/oZUNhTlAOld/yy6W9Q7D7hN2mk1xC/cWiF+VisPSu24puztpCbLSQGOCEKkyd9 f0Rc//B8VO1Xf0iHv/U/7+b6cLtyToUULDjyN9Wg3nP8cpXYjlhQ7PrshRac9Ibd/5uxF0xRcfo2K x3XEEvCozVrBMHBW7w4fZA==; In-Reply-To: <20231205004405.3fc7190e@Elitebook> (message from Herman on Tue, 5 Dec 2023 00:44:05 +0200) 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:275564 Archived-At: > Date: Tue, 5 Dec 2023 00:44:05 +0200 > From: Herman > Cc: 67628@debbugs.gnu.org > > On Mon, 04 Dec 2023 22:11:43 +0200 > Eli Zaretskii wrote: > > > > Date: Mon, 4 Dec 2023 19:31:38 +0200 > > > From: Herman > > > > > > '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. Po Lu, any ideas or suggestions?