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#65509: [PATCH] Use correct env var when opening frames with freedesktop menu entries Date: Fri, 15 Sep 2023 10:32:29 +0300 Message-ID: <83r0mzki2a.fsf@gnu.org> References: <87ttsomgb5.fsf@mssdvd.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> <87fs3omzqg.fsf@mssdvd.com> <83wmwrkjbn.fsf@gnu.org> <87ttrvzz8v.fsf@yahoo.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33837"; mail-complaints-to="usenet@ciao.gmane.io" Cc: dm@mssdvd.com, stefankangas@gmail.com, 65509@debbugs.gnu.org To: Po Lu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Sep 15 09:33:02 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 1qh3K2-0008at-3d for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 15 Sep 2023 09:33:02 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qh3Jy-0000PD-95; Fri, 15 Sep 2023 03:32:58 -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 1qh3Jw-0000Oz-Hu for bug-gnu-emacs@gnu.org; Fri, 15 Sep 2023 03:32:57 -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 1qh3Jw-0007Jh-9w for bug-gnu-emacs@gnu.org; Fri, 15 Sep 2023 03:32:56 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qh3K2-00072C-5u for bug-gnu-emacs@gnu.org; Fri, 15 Sep 2023 03:33:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 15 Sep 2023 07:33: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.169476317827030 (code B ref 65509); Fri, 15 Sep 2023 07:33:02 +0000 Original-Received: (at 65509) by debbugs.gnu.org; 15 Sep 2023 07:32:58 +0000 Original-Received: from localhost ([127.0.0.1]:41945 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qh3Jx-00071t-Gg for submit@debbugs.gnu.org; Fri, 15 Sep 2023 03:32:57 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41790) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qh3Jr-00071Z-Vr for 65509@debbugs.gnu.org; Fri, 15 Sep 2023 03:32:55 -0400 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 1qh3Jg-0007Hy-6q; Fri, 15 Sep 2023 03:32:40 -0400 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=qaA9/YP/yDC9K3wbPFj5j+Kqd6d9VSbSc4/Gy6UykfA=; b=Qx61QrZex5GQ AZFQW6IRhbVMJMegbnp6HU2WU2e3j5bDIR3fAARyLRTSK1KBvexu5zKJfgGKGqxDWpBIZgBWzvhS3 PwLIF02R8yEu6l7yR/6DHgUxktp64tAwZcH5MM5C1oxuDkTZWpI3vuOQXKozfnUyZwvifxVEmXD8z j80QLXfaYwrdCi0TT+3kEX69hHlEh8/L0J+SSqGnKsTsuKhMRS4I/CEp5sZh8Gn1d6YeHt5OcZWtS wbSUOOZAeEUtkX2h2tIejmKkClJiKTI1Tg0rvM+8j5xy6lB/wHNxK5qfKKjTtlfcrBG8XuzgbtaVU UmWPN+mFpx4X7BHHdz8abg==; In-Reply-To: <87ttrvzz8v.fsf@yahoo.com> (message from Po Lu on Fri, 15 Sep 2023 15:12:16 +0800) 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:270504 Archived-At: > From: Po Lu > Cc: Davide Masserut , stefankangas@gmail.com, > 65509@debbugs.gnu.org > Date: Fri, 15 Sep 2023 15:12:16 +0800 > > Eli Zaretskii writes: > > > Ping! Po Lu, could you please respond? > > > >> From: Davide Masserut > >> Cc: stefankangas@gmail.com, 65509@debbugs.gnu.org > >> Date: Fri, 08 Sep 2023 17:49:43 +0200 > >> > >> > >> 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? > >> > >> > >> >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 > >> > > That was lost in the spam filter. I'd rather not use --reuse-frame > under the X build, because that's not safe for Emacs 29. Why is it not safe? > This LGTM now. Thanks.