Subject: [PATCH] Substitute all emacsclient occurrences
From: Lin Jian <[email-masked]>
To: [email-masked]
Date: Tue, 30 Jan 2024 06:15:51 +0800
List-Id: <debbugs-submit.debbugs.gnu.org>

Tags: patch

After commit "From .desktop files, reuse a frame or start a new
Emacs as required" on 2021-06-30, there are two emacsclient
occurrences for the Exec key of etc/emacsclient.desktop.

Before this change, only the first occurrence is substituted.

I propose a patch to substitute all emacsclient occurrences.

In GNU Emacs 29.1 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo
version 1.18.0, Xaw3d scroll bars)
Windowing system distributor 'The X.Org Foundation', version 11.0.12101010
System Description: NixOS 24.05 (Uakari)

Configured using:
 'configure
 --prefix=/nix/store/mzdvpxzkhlryxmbxwbih7bgvkzkw1ly7-emacs-29.1
 --disable-build-details --with-modules --with-x-toolkit=lucid
 --with-xft --with-cairo --with-compress-install
 --with-toolkit-scroll-bars --with-native-compilation
 --without-imagemagick --without-small-ja-dic --with-tree-sitter
 --with-xinput2 --without-xwidgets'

From 69ea684a44e1619b3e89a2f2a7189713dfdc03ab Mon Sep 17 00:00:00 2001
From: Lin Jian <[email-masked]>
Date: Tue, 30 Jan 2024 06:11:26 +0800
Subject: [PATCH] Substitute all emacsclient occurrences

After commit "From .desktop files, reuse a frame or start a new
Emacs as required" on 2021-06-30, there are two emacsclient
occurrences for the Exec key of etc/emacsclient.desktop.
Before this change, only the first occurrence is substituted.
* Makefile.in (install-etc): Substitute all emacsclient occurrences.

Copyright-paperwork-exempt: yes
---
 Makefile.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile.in b/Makefile.in
index 996f7b8d8c7..069f756bcf8 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -844,7 +844,7 @@ install-etc:
 	rm -f $${tmp}
 	tmp=etc/emacsclient.tmpdesktop; rm -f $${tmp}; \
 	client_name=`echo emacsclient | sed '$(TRANSFORM)'`${EXEEXT}; \
-	sed -e "/^Exec=/ s|emacsclient|${bindir}/$${client_name}|" \
+	sed -e "/^Exec=/ s|emacsclient|${bindir}/$${client_name}|g" \
 	  -e "/^Icon=emacs/ s/emacs/${EMACS_NAME}/" \
 	  $(USE_STARTUP_NOTIFICATION_SED_CMD) \
 	  $(USE_WAYLAND_DISPLAY_SED_CMD) \
-- 
2.42.0