From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Davide Masserut via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#65509: [PATCH] Use correct env var when opening frames with freedesktop menu entries Date: Sun, 03 Sep 2023 15:42:44 +0200 Message-ID: <87lednz6u8.fsf@mssdvd.com> References: <87ttsomgb5.fsf@mssdvd.com> <83msy7eesk.fsf@gnu.org> <87pm33sazt.fsf@yahoo.com> <835y4tbtpj.fsf@gnu.org> <87pm303499.fsf@mssdvd.com> <8334zwa4vi.fsf@gnu.org> <87y1hokr6v.fsf@yahoo.com> <83jzt795wi.fsf@gnu.org> <87r0nflrhb.fsf@yahoo.com> <87lednqw1v.fsf@mssdvd.com> <871qffl97z.fsf@yahoo.com> <87wmx7jts3.fsf@yahoo.com> Reply-To: Davide Masserut Mime-Version: 1.0 Content-Type: text/plain; format=flowed Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="901"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , Stefan Kangas , 65509@debbugs.gnu.org To: Po Lu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Sep 03 16:10:03 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 1qcnne-000AZ3-71 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 03 Sep 2023 16:10:03 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qcnnV-00016e-Vn; Sun, 03 Sep 2023 10:09:54 -0400 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 1qcnnU-00016O-Ct for bug-gnu-emacs@gnu.org; Sun, 03 Sep 2023 10:09:52 -0400 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 1qcnnU-00038b-4c for bug-gnu-emacs@gnu.org; Sun, 03 Sep 2023 10:09:52 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qcnne-0003Oz-Ei for bug-gnu-emacs@gnu.org; Sun, 03 Sep 2023 10:10:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Davide Masserut Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 03 Sep 2023 14:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65509 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 65509-submit@debbugs.gnu.org id=B65509.169375019713061 (code B ref 65509); Sun, 03 Sep 2023 14:10:02 +0000 Original-Received: (at 65509) by debbugs.gnu.org; 3 Sep 2023 14:09:57 +0000 Original-Received: from localhost ([127.0.0.1]:43248 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qcnnY-0003Ob-VJ for submit@debbugs.gnu.org; Sun, 03 Sep 2023 10:09:57 -0400 Original-Received: from out-217.mta1.migadu.com ([2001:41d0:203:375::d9]:28870) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qcnnW-0003OS-1u for 65509@debbugs.gnu.org; Sun, 03 Sep 2023 10:09:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mssdvd.com; s=key1; t=1693750182; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=3DVaxkNVakb3EhddndVcHG3xdNbLz0kFEZpcg8XQ2L0=; b=ZiZhMu9S0XopXxp8ejSc72GIzorWrhN6vDvGI8b6HC9IyxcT74qizgTJCv+4xo3ok7PlKC LtWAOTx3lUCVfzYeSkTT+j05CVxtMhatEeECjJsIY4ohoXVDWnTxSIWJjTatIXVWV2hPEM 4m6/JtvKT147qmq7QnmiZPHbwVrjGGqeNIyhMxCd6BQgZFkrXwhE9V0AIzcMvyT6TL3+y+ ZtQVAnpFpXMYo0murjvYnwXa+9mkID7WXWkAyAb8RsNTRqmv90k1snhChuUZQl08ebxENT kGnxRGtf4/lRK3VORXCp5BB6VmAQt/vyaSpKQ9CM7bnSmqMR9evm7GcmOwfTpw== X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. In-reply-to: <87wmx7jts3.fsf@yahoo.com> X-Migadu-Flow: FLOW_OUT 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:269169 Archived-At: Po Lu writes: > Stefan Kangas writes: > >> Not sure it's worth doing, but one option is to do both. Users >> that >> miss one would see the other. > > I won't object to such a change, though I cannot claim to > understand the > rationale behind it. (Who would see the message printed to > stderr, but > not the dialog displayed, during connection setup?) X DEs don't set the $WAYLAND_DISPLAY environment variable, so querying for it returns an empty string. If I run this in X: emacsclient --alternate-editor= --display=$WAYLAND_DISPLAY .emacs.el the following occurs. When the --display argument is an empty string, Emacs first tries to reuse an exiting frame and, if doesn't find one, it falls back to open it in the same terminal. The problem arises when an instance is launched through the DE facilities: Emacs can't use a terminal as a fallback and therefore it opens in the background without showing the frame. If we decide that handling such case is not worth the trouble, an error in system log should warn the user to use the X backend.