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: Fri, 08 Sep 2023 17:49:43 +0200 Message-ID: <87fs3omzqg.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> <87lednz6u8.fsf@mssdvd.com> <87edjekc1k.fsf@yahoo.com> <87il8oodrm.fsf@mssdvd.com> <87il8ncruu.fsf@mssdvd.com> <83wmx2z8w1.fsf@gnu.org> <87cyyufi5k.fsf@yahoo.com> Reply-To: Davide Masserut Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10607"; mail-complaints-to="usenet@ciao.gmane.io" Cc: stefankangas@gmail.com, 65509@debbugs.gnu.org To: Po Lu , Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Sep 08 17:51:14 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 1qedlJ-0002XD-OJ for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 08 Sep 2023 17:51:14 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qedlC-0002yS-6F; Fri, 08 Sep 2023 11:51:06 -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 1qedl6-0002y7-B4 for bug-gnu-emacs@gnu.org; Fri, 08 Sep 2023 11:51:01 -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 1qedl6-0006OC-36 for bug-gnu-emacs@gnu.org; Fri, 08 Sep 2023 11:51:00 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qedl8-0006AW-CS for bug-gnu-emacs@gnu.org; Fri, 08 Sep 2023 11:51: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: Fri, 08 Sep 2023 15:51: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.169418820623642 (code B ref 65509); Fri, 08 Sep 2023 15:51:02 +0000 Original-Received: (at 65509) by debbugs.gnu.org; 8 Sep 2023 15:50:06 +0000 Original-Received: from localhost ([127.0.0.1]:45268 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qedkD-00069F-FY for submit@debbugs.gnu.org; Fri, 08 Sep 2023 11:50:05 -0400 Original-Received: from out-220.mta1.migadu.com ([2001:41d0:203:375::dc]:17587) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qedkA-00068f-0O for 65509@debbugs.gnu.org; Fri, 08 Sep 2023 11:50:04 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mssdvd.com; s=key1; t=1694188197; 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=VAe6qCneugHz9HCoRbR8yC85mT8fMrli+hT2Iy0YfEQ=; b=nT9t2kjDMshwl2KrDpeFOL1T1rX9Rps7iSE5VWJJYoavOE6hBSmrNEod8f6XqXmdNMQr9u +Thg3ZjyBezKOUKUU0Ss/KhP2nXxIKTTQs06XNcQ6fnGwAuxJw5paBHpKfJXOK9CbT99bb 2dJQ4s6DI1qcUUsRyzIhopX+1Vg7UKbCFRVrFH9iypm5Iy9uzt7zj3ueaWs7jlV49W6EKn hhyap6O+mMGuZY5D+18aiPInBWTRT4fymcvzMpcbhnKgOFAbX6s6DZB4ARW1NyU2X5xmOn 8j1CN6l4Qzgx7KqOHbiBVzgy+Sx+EBmWNnT3NU1R1dbWqroYp6X6AluNJ/K57A== In-Reply-To: <87cyyufi5k.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:269785 Archived-At: --=-=-= Content-Type: text/plain Po Lu writes: > Eli Zaretskii writes: > >>> From: Davide Masserut >>> Cc: Stefan Kangas , Eli Zaretskii , >>> 65509@debbugs.gnu.org >>> Date: Wed, 06 Sep 2023 16:01:58 +0200 >>> >>> It turns out that Emacs 29 has new CLI option that solves exactly these problems. >>> >>> The attached patch replaces the usage of --display=$DISPLAY with --reuse-frame. >> >> Po Lu, any objections to installing this on emacs-29? > > Yes. Davide, would you please rewrite the patch so that your change is > only applied to the PGTK port? Done. Po, why can't we use --reuse-frame in X builds? --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Avoid-using-display-to-reuse-frames-in-PGTK.patch >From 43085522a08b94ef594bd270d61a38d7bb26e036 Mon Sep 17 00:00:00 2001 From: Davide Masserut Date: Thu, 24 Aug 2023 18:33:39 +0200 Subject: [PATCH] Avoid using --display to reuse frames in PGTK Using hard-coded display values can cause PGTK graphical frames to open using the wrong backend or not open at all. * Makefile.in (install-etc): Use --reuse-frame instead of --display=$DISPLAY. --- Makefile.in | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Makefile.in b/Makefile.in index fdd9353e254..c82aad1af60 100644 --- a/Makefile.in +++ b/Makefile.in @@ -843,6 +843,9 @@ EMACS_ICON= ifeq (${USE_STARTUP_NOTIFICATION},no) USE_STARTUP_NOTIFICATION_SED_CMD=-e "/^StartupNotify=true$$/d" endif +ifeq ($(HAVE_PGTK),yes) +USE_WAYLAND_DISPLAY_SED_CMD=-e "s/display=[^ ]*/reuse-frame/" +endif install-etc: umask 022; ${MKDIR_P} "$(DESTDIR)${desktopdir}" tmp=etc/emacs.tmpdesktop; rm -f $${tmp}; \ @@ -857,6 +860,7 @@ install-etc: sed -e "/^Exec=/ s|emacsclient|${bindir}/$${client_name}|" \ -e "/^Icon=emacs/ s/emacs/${EMACS_NAME}/" \ $(USE_STARTUP_NOTIFICATION_SED_CMD) \ + $(USE_WAYLAND_DISPLAY_SED_CMD) \ ${srcdir}/etc/emacsclient.desktop > $${tmp}; \ ${INSTALL_DATA} $${tmp} "$(DESTDIR)${desktopdir}/$${client_name}.desktop"; \ rm -f $${tmp} @@ -870,6 +874,7 @@ install-etc: client_name=`echo emacsclient | sed '$(TRANSFORM)'`${EXEEXT}; \ sed -e "/^Exec=/ s|emacsclient|${bindir}/$${client_name}|" \ -e "/^Icon=emacs/ s/emacs/${EMACS_NAME}/" \ + $(USE_WAYLAND_DISPLAY_SED_CMD) \ ${srcdir}/etc/emacsclient-mail.desktop > $${tmp}; \ ${INSTALL_DATA} $${tmp} "$(DESTDIR)${desktopdir}/$${client_name}-mail.desktop"; \ rm -f $${tmp} -- 2.42.0 --=-=-=--