From unknown Fri Jun 20 07:22:47 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#67736 <67736@debbugs.gnu.org> To: bug#67736 <67736@debbugs.gnu.org> Subject: Status: 30.0.50; emacsclient.desktop fails with quoting-related error Reply-To: bug#67736 <67736@debbugs.gnu.org> Date: Fri, 20 Jun 2025 14:22:47 +0000 retitle 67736 30.0.50; emacsclient.desktop fails with quoting-related error reassign 67736 emacs submitter 67736 Mekeor Melire severity 67736 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 09 19:56:20 2023 Received: (at submit) by debbugs.gnu.org; 10 Dec 2023 00:56:20 +0000 Received: from localhost ([127.0.0.1]:49195 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rC87H-0004l7-So for submit@debbugs.gnu.org; Sat, 09 Dec 2023 19:56:20 -0500 Received: from lists.gnu.org ([2001:470:142::17]:47298) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rC87F-0004ko-7x for submit@debbugs.gnu.org; Sat, 09 Dec 2023 19:56:18 -0500 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 1rC86v-0004zT-UU for bug-gnu-emacs@gnu.org; Sat, 09 Dec 2023 19:55:57 -0500 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rC86s-0003OW-RK for bug-gnu-emacs@gnu.org; Sat, 09 Dec 2023 19:55:57 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 3EBCF240027 for ; Sun, 10 Dec 2023 01:55:51 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1702169751; bh=sRMFF269rufKXpJYiKpetb6G/4oOkrs/QssEnO8ZUhs=; h=From:To:Subject:Date:Message-ID:MIME-Version:From; b=Tu6SfpYYEN5Jdjfk5gZwmjH9U7XqQTXDfkZ9d0fJjtwDabQkGlc6eiuLtOaqdSEXn BJjEcSzq7k5iMa5QSMTmayc1QVxEguidxVycYtdbJ/5+DtHhogHJoRRztldqh1IhTo w8PV8Np+hTAsMtvy0B+sgkQOMLadjJOPGtWGcHHEGFOQvInNkwUvJxWAj4F5GDbqI8 RO9MXKM0xu5EZbe2izTQWlBKleJdnbqzXkHgj3UxvJy1pD/f4nnY5j0r5jaPzreNVn GSpIbngGk7FWMENSfbOiqMFRClDZni/gLwyivzKFTDfyJZxGeOCPHnA45juYOQVjB/ iYh3vMmYUAXLg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Snmdf58dmz6tm4; Sun, 10 Dec 2023 01:55:50 +0100 (CET) From: Mekeor Melire To: bug-gnu-emacs@gnu.org Subject: 30.0.50; emacsclient.desktop fails with quoting-related error Date: Sun, 10 Dec 2023 00:13:33 +0000 Message-ID: <87a5qiswvy.fsf@posteo.de> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=mekeor@posteo.de; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) In GNU+Linux, in Xorg, with xdg-utils installed, and with emacsclient.desktop[1] from Emacs repository installed, configure the mapping from mime-types to applications by creating a file ~/.config/mimeapps.list with contents: [Default Applications] text/plain=emacsclient.desktop Create a plain-text file and open it with the XDG default application: echo hello > example.txt xdg-open example.txt I expect Emacsclient to start and open the file. Instead, I get the following error messages which point to quoting-related problems. $ xdg-open example.txt egrep: warning: egrep is obsolescent; using grep -E [: -c: line 1: unexpected EOF while looking for matching `"' [: -c: line 2: syntax error: unexpected end of file [: -c: line 1: unexpected EOF while looking for matching `"' [: -c: line 2: syntax error: unexpected end of file [: -c: line 1: unexpected EOF while looking for matching `"' [: -c: line 2: syntax error: unexpected end of file Apparently, since the default application Emacsclient exits with failure, xdg-open then proceeds by trying out other applications that have an installed .desktop-file. Thus another program opens the file. Does anyone else experience this problem? It seems like it is a problem introduced with bug#49195 / commit cbf220bc31c0a00c45b22c140eda7854d81d991b [2]. All versions of the Exec= line of emacsclient.desktop result in the same erroneous behavior for me since this commit. I.e. the last version that works is just: Exec=emacsclient -c %F Please let me know if you can or cannot reproduce this, because it might also possibly be a bug in my OS distribution, GNU Guix System. By the way, I'm using the latest version of xdg-utils, 1.1.3, probably released on 2018-05-10. In GNU Emacs 30.0.50 (build 1, x86_64-unknown-linux-gnu, Motif Version 2.3.8, cairo version 1.16.0) Windowing system distributor 'The X.Org Foundation', version 11.0.12101004 System Description: Guix System Configured using: 'configure CONFIG_SHELL=/gnu/store/rib9g2ig1xf3kclyl076w28parmncg4k-bash-minimal-5.1.16/bin/bash SHELL=/gnu/store/rib9g2ig1xf3kclyl076w28parmncg4k-bash-minimal-5.1.16/bin/bash --prefix=/gnu/store/whmdrrv8db90a238jgjy24hd13diljfl-emacs-next-motif-30.0.50-1.9d27b95 --enable-fast-install --build=x86_64-unknown-linux-gnu --with-x-toolkit=motif --with-modules --with-native-compilation=aot --disable-build-details' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER X11 XDBE XIM XPM MOTIF ZLIB [1] https://git.savannah.gnu.org/cgit/emacs.git/tree/etc/emacsclient.desktop [2] https://git.savannah.gnu.org/cgit/emacs.git/commit/etc/emacsclient.desktop?id=cbf220bc31c0a00c45b22c140eda7854d81d991b From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 10 01:18:13 2023 Received: (at 67736) by debbugs.gnu.org; 10 Dec 2023 06:18:13 +0000 Received: from localhost ([127.0.0.1]:49365 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rCD8m-0007Qk-Kr for submit@debbugs.gnu.org; Sun, 10 Dec 2023 01:18:13 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:43966) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rCD8l-0007QW-Ba for 67736@debbugs.gnu.org; Sun, 10 Dec 2023 01:18:12 -0500 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 1rCD8R-00023M-4q; Sun, 10 Dec 2023 01:17:51 -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=HMbcdNW+BKQ8J8ghvc4BaIgdF8A+hdNdG63SL1GlVsA=; b=X3pG1j8At2wL F42HiOgDnuS6+SKCvtzz57NCjLhYCdgS0S1SWl5O1xkdMAmO5lgi9rKKkFyIlkJxf0bmE8wgRr98Z Kpsl2gSo9uSDHCoUnRTUCtPfrcDwZ5OkPMj1SengqzV6sx8Kac4eZFuRJEBY2MxA0JcAlQyeRHNUr DvyPJFHD5btU4HOt3cidOtm/q2YD2cc2mtMOTux7DbcfwLZltALKvRIAVpZOSBZxykX+MUpCaB3Ho f8odoi1wT1JsWS1lkPh/BZqu6kNHe8C7RY3YY6DTAc1cp92LURV7/RsCJ9uNYr/rU3efZv8K0L22G PNi2bVY9LItS6wCmS0Ms3g==; Date: Sun, 10 Dec 2023 08:17:37 +0200 Message-Id: <83cyvewpha.fsf@gnu.org> From: Eli Zaretskii To: Mekeor Melire In-Reply-To: <87a5qiswvy.fsf@posteo.de> (message from Mekeor Melire on Sun, 10 Dec 2023 00:13:33 +0000) Subject: Re: bug#67736: 30.0.50; emacsclient.desktop fails with quoting-related error References: <87a5qiswvy.fsf@posteo.de> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 67736 Cc: 67736@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Mekeor Melire > Date: Sun, 10 Dec 2023 00:13:33 +0000 > > In GNU+Linux, in Xorg, with xdg-utils installed, and with > emacsclient.desktop[1] from Emacs repository installed, configure the > mapping from mime-types to applications by creating a file > ~/.config/mimeapps.list with contents: > > [Default Applications] > text/plain=emacsclient.desktop > > Create a plain-text file and open it with the XDG default application: > > echo hello > example.txt > xdg-open example.txt > > I expect Emacsclient to start and open the file. Instead, I get the > following error messages which point to quoting-related problems. > > $ xdg-open example.txt > egrep: warning: egrep is obsolescent; using grep -E > [: -c: line 1: unexpected EOF while looking for matching `"' > [: -c: line 2: syntax error: unexpected end of file > [: -c: line 1: unexpected EOF while looking for matching `"' > [: -c: line 2: syntax error: unexpected end of file > [: -c: line 1: unexpected EOF while looking for matching `"' > [: -c: line 2: syntax error: unexpected end of file > > Apparently, since the default application Emacsclient exits with > failure, xdg-open then proceeds by trying out other applications that > have an installed .desktop-file. Thus another program opens the file. Why does emacsclient exit with a failure in that case? When I try invoking emacsclient from the shell prompt, it exits with a zero exit status, not with a failure. > It seems like it is a problem introduced with bug#49195 / commit > cbf220bc31c0a00c45b22c140eda7854d81d991b [2]. All versions of the Exec= > line of emacsclient.desktop result in the same erroneous behavior for me > since this commit. I.e. the last version that works is just: > > Exec=emacsclient -c %F What is the command that is run with the current emacsclient.desktop file? From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 10 06:30:57 2023 Received: (at 67736) by debbugs.gnu.org; 10 Dec 2023 11:30:57 +0000 Received: from localhost ([127.0.0.1]:49614 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rCI1R-0000Lx-7u for submit@debbugs.gnu.org; Sun, 10 Dec 2023 06:30:57 -0500 Received: from mout01.posteo.de ([185.67.36.65]:48901) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rCI1P-0000Lj-4K for 67736@debbugs.gnu.org; Sun, 10 Dec 2023 06:30:56 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 2B9AB240027 for <67736@debbugs.gnu.org>; Sun, 10 Dec 2023 12:30:35 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1702207835; bh=odcSX7q07KaUbfEmb9lPxp9j3fWonQd3Jebv/MNHqz4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:From; b=US6bNqj+i1/X0fLUerfmknJrXQ2AGLqKCUoNEYlsQY4CL6Yg3OFPVPmz6ieYThjte P7MJIQGSAiPKIs6pZMIN1HK/1MwgveNWbq8B63UiwmHawYzzBHgXhKCdfM3HQ5bWKn LhkxtEaZT0O7zftGLXyB3ny6hD0kUnEuX3CviycyLnFk76XerbhctXYh+p1SqCN5RR QyO3L9NGhB1Gqo8k0wX2NNQVYb7KEpj1hJfBzeZ8jU3fZSoNICi8ov9ANHFtMXlJ76 64jucDYGLVEatVpLCzVGx/Un5RhmMkpZSwcbcrEJIpXMyuEDeqa1/t9fk8Kt18NgBs RFvUPiAjn4ZfA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Sp2k23z8Lz6tmv; Sun, 10 Dec 2023 12:30:34 +0100 (CET) From: Mekeor Melire To: 67736@debbugs.gnu.org Subject: Re: bug#67736: 30.0.50; emacsclient.desktop fails with quoting-related error Date: Sun, 10 Dec 2023 11:14:25 +0000 References: <87a5qiswvy.fsf@posteo.de> <83cyvewpha.fsf@gnu.org> In-reply-to: <83cyvewpha.fsf@gnu.org> Message-ID: <875y16s3i2.fsf@posteo.de> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 67736 Cc: Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) 2023-12-10 08:17 eliz@gnu.org: > Why does emacsclient exit with a failure in that case? When I try > invoking emacsclient from the shell prompt, it exits with a zero exit > status, not with a failure. Invoking emacsclient from shell prompt directly, works just fine for me too. Supposedly, it's not emacsclient that exists with failure but the sh command mentioned below. > What is the command that is run with the current emacsclient.desktop > file? Unfortunately, I don't know which command xdg-open tries to execute exactly. But the configuration (in Emacs' emacsclient.desktop) is this: Exec=sh -c "if [ -n \\"\\$*\\" ]; then exec emacsclient --alternate-editor= --display=\\"\\$DISPLAY\\" \\"\\$@\\"; else exec emacsclient --alternate-editor= --create-frame; fi" sh %F https://git.sv.gnu.org/cgit/emacs.git/tree/etc/emacsclient.desktop?h=cf11fdfd8e460d966ba279f00633ab378038de68#n6 Note that the Exec key of .desktop files has very complicated quoting rules: https://specifications.freedesktop.org/desktop-entry-spec/1.1/ar01s06.html By the way, I found a recent bug report on the Github website of the Telegram-Desktop repository that mentions the same problem that I'm experiencing: https://github.com/telegramdesktop/tdesktop/issues/27100 Actually, I have the feeling that this is a bug in xdg-utils. I will file a bug report there. In the mean time, should we work-around this bug by just using this or something similar?: Exec=emacsclient --alternate-editor= --create-frame %F From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 10 06:38:15 2023 Received: (at 67736) by debbugs.gnu.org; 10 Dec 2023 11:38:16 +0000 Received: from localhost ([127.0.0.1]:49621 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rCI8V-0000Wk-FB for submit@debbugs.gnu.org; Sun, 10 Dec 2023 06:38:15 -0500 Received: from mout01.posteo.de ([185.67.36.65]:44825) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rCI8S-0000WV-Pu for 67736@debbugs.gnu.org; Sun, 10 Dec 2023 06:38:13 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id CC03E240027 for <67736@debbugs.gnu.org>; Sun, 10 Dec 2023 12:37:52 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1702208272; bh=O4ZAtBMik0E2gq43zPO5CGRgJMDWB4QNtPv5QyDlSTk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:From; b=dWcx7MKKekWnPMsE/C+E3w9+A2aM1d6cL8Itm7RLU8yMYfwqtQGPrp0QOaAKS7Qjo +P5UGkQaBRXxfil/3NUfxUAvmaMXMZk8hcrsy457FdK5cNh+f9n3Kjm+EJP1rPJ3GW mU0B7kI+5lAEq/RoWWvOEGeKtA01IFTY0SY/0Or/715vFxGYuKyDq8pU3rTKaFv8HO d7bBPfFUEYkrj33QHqUc9OAIBd7cSNbSwYeWfHfha2s7qQWnsIZJ49Xw/7jgaEOl4p FEgRa+IQgvmcmKSr/beevXs5GrRqFTrtGzXba+w4P7TPu+MAfIpl46osEZn94YDsHy Yat1EAL+BoKOw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Sp2tS2XhLz6tvq; Sun, 10 Dec 2023 12:37:52 +0100 (CET) From: Mekeor Melire To: Mekeor Melire Subject: Re: bug#67736: 30.0.50; emacsclient.desktop fails with quoting-related error Date: Sun, 10 Dec 2023 11:28:37 +0000 References: <87a5qiswvy.fsf@posteo.de> <83cyvewpha.fsf@gnu.org> <875y16s3i2.fsf@posteo.de> In-reply-to: <875y16s3i2.fsf@posteo.de> Message-ID: <871qbus35s.fsf@posteo.de> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 67736 Cc: 67736@debbugs.gnu.org, Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) 2023-12-10 11:14 mekeor@posteo.de: > 2023-12-10 08:17 eliz@gnu.org: > Actually, I have the feeling that this is a bug in xdg-utils. I will > file a bug report there. Actually, there are already bug-reports on xdg-utils for this, also mentioning emacsclient.desktop explicitely: https://gitlab.freedesktop.org/xdg/xdg-utils/-/issues/236 https://gitlab.freedesktop.org/xdg/xdg-utils/-/issues/174 > In the mean time, should we work-around this bug by just using this or > something similar?: > > Exec=emacsclient --alternate-editor= --create-frame %F Should we close this very bug or should we implement a work-around? E.g we could stop using a complex, nested invokation of sh, and instead just execute emacsclient with some arguments, without any need for quoting, as I mentioned. Altenatively, we could ship an executable.sh which invokes emacsclient appropriately. [1] But the quoting of Exec= lines in .desktop-files is just flawed right now. [1] As suggested here: "The quicker fix will probably be having a script somewhere in the filesystem that handles that logic." https://gitlab.freedesktop.org/xdg/xdg-utils/-/issues/236#note_2169234 From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 10 06:55:22 2023 Received: (at 67736) by debbugs.gnu.org; 10 Dec 2023 11:55:22 +0000 Received: from localhost ([127.0.0.1]:49640 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rCIP4-0000vx-3t for submit@debbugs.gnu.org; Sun, 10 Dec 2023 06:55:22 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:57332) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rCIP0-0000vg-Vj for 67736@debbugs.gnu.org; Sun, 10 Dec 2023 06:55:20 -0500 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 1rCIOV-0007PC-Ev; Sun, 10 Dec 2023 06:54:57 -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=n8KPgS3Cs1CXt2LRUXbpkjJ7V2dKvXnAQARLigx084o=; b=sJvbeJKVygw/ fmzxG1OU1Jj98fvX8XIY+uuqxrlaOmpK1urcxCTrOU233+jBk88EmTXBFA5JUYbgKpCJ94JNi+mQg YcaYA4/KtM639MAjVQqZPlN5E4mQhf0LFR09n5hISmUI1rcpasWFAs+XX7luiu8EJHhwAG9yawgNq MjerRyoWrP04LaAP26hxvJDgIWvxywRC5WUAanNb4Fs+Ie1tDDcgWzVNxiEUkYNkRdWc2IwTenHf2 P3lw6M+dwN7FOGhatH508GN0qgmez7CrAYm0XPPDJ/yDx/uk+YLYD/ERVcm5HNWhD/TxJ7tXYoFiP IorhPGLsSyw1FmNTz90qWw==; Date: Sun, 10 Dec 2023 13:54:34 +0200 Message-Id: <83zfyiuvb9.fsf@gnu.org> From: Eli Zaretskii To: Mekeor Melire In-Reply-To: <875y16s3i2.fsf@posteo.de> (message from Mekeor Melire on Sun, 10 Dec 2023 11:14:25 +0000) Subject: Re: bug#67736: 30.0.50; emacsclient.desktop fails with quoting-related error References: <87a5qiswvy.fsf@posteo.de> <83cyvewpha.fsf@gnu.org> <875y16s3i2.fsf@posteo.de> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 67736 Cc: 67736@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Mekeor Melire > Cc: Eli Zaretskii > Date: Sun, 10 Dec 2023 11:14:25 +0000 > > 2023-12-10 08:17 eliz@gnu.org: > > > Why does emacsclient exit with a failure in that case? When I try > > invoking emacsclient from the shell prompt, it exits with a zero exit > > status, not with a failure. > > Invoking emacsclient from shell prompt directly, works just fine for me > too. Supposedly, it's not emacsclient that exists with failure but the > sh command mentioned below. And if you invoke that command from the shell, it does exit with a failure status? > https://github.com/telegramdesktop/tdesktop/issues/27100 > > Actually, I have the feeling that this is a bug in xdg-utils. I will > file a bug report there. Thanks, let's see how they respond. > In the mean time, should we work-around this bug by just using this or > something similar?: > > Exec=emacsclient --alternate-editor= --create-frame %F I have no idea what problems this could cause, so I'd prefer not to change anything until we understand more and hear from xdg-utils developers. From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 10 06:57:06 2023 Received: (at 67736) by debbugs.gnu.org; 10 Dec 2023 11:57:06 +0000 Received: from localhost ([127.0.0.1]:49652 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rCIQj-0000yz-Ok for submit@debbugs.gnu.org; Sun, 10 Dec 2023 06:57:06 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:48770) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rCIQh-0000yT-NL for 67736@debbugs.gnu.org; Sun, 10 Dec 2023 06:57:04 -0500 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 1rCIQO-0007rz-7v; Sun, 10 Dec 2023 06:56:44 -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=4iYxdSFVXiBSsx8+3iqdkiUA3mMNWA49hvxhOjzHnJU=; b=chWPSANIUgFa BUU0idT18SK0Db1ukKOCn5/fm0geUw5k1w4TM6dTH0HYTeUK/z/CKqX2OkSwIKOsaO3qctapb44uk fVdTFvBruQshYdC+UzstKc/S9iSW2XrTAbZHU+Ra92vYzrD+iEYvUMzDAk7qaXAtJXk+eSTL6F5wC pBstjOg28+XAUfz4/7A7GsESpeHhyE65NFECCoC/ShRxxLJB/G6ymGEsrZ0VVEUcYQc62ap8wcOtn 7nh+YAb3f0RpF0otoUctjmcd6mSce4FIssULMbjBaY36YkBf6j/NxA9U0LUHXzPYhCflClCe9J968 SDFkb2QECyNZRuXX+fF+Yg==; Date: Sun, 10 Dec 2023 13:56:30 +0200 Message-Id: <83y1e2uv81.fsf@gnu.org> From: Eli Zaretskii To: Mekeor Melire In-Reply-To: <871qbus35s.fsf@posteo.de> (message from Mekeor Melire on Sun, 10 Dec 2023 11:28:37 +0000) Subject: Re: bug#67736: 30.0.50; emacsclient.desktop fails with quoting-related error References: <87a5qiswvy.fsf@posteo.de> <83cyvewpha.fsf@gnu.org> <875y16s3i2.fsf@posteo.de> <871qbus35s.fsf@posteo.de> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 67736 Cc: mekeor@posteo.de, 67736@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Mekeor Melire > Cc: 67736@debbugs.gnu.org, Eli Zaretskii > Date: Sun, 10 Dec 2023 11:28:37 +0000 > > Actually, there are already bug-reports on xdg-utils for this, also > mentioning emacsclient.desktop explicitely: > > https://gitlab.freedesktop.org/xdg/xdg-utils/-/issues/236 > https://gitlab.freedesktop.org/xdg/xdg-utils/-/issues/174 > > > In the mean time, should we work-around this bug by just using this or > > something similar?: > > > > Exec=emacsclient --alternate-editor= --create-frame %F > > Should we close this very bug or should we implement a work-around? As I wrote earlier, I'd like to wait until we understand more about the various aspects of this issue. > E.g we could stop using a complex, nested invokation of sh, and instead > just execute emacsclient with some arguments, without any need for > quoting, as I mentioned. I don't think this is TRT. We have all that complexity for a reason. Please look at Git history of that file to see how we arrived at what we have now. From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 16 19:32:05 2023 Received: (at 67736) by debbugs.gnu.org; 17 Dec 2023 00:32:05 +0000 Received: from localhost ([127.0.0.1]:56368 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rEf4e-000680-Nk for submit@debbugs.gnu.org; Sat, 16 Dec 2023 19:32:05 -0500 Received: from mout02.posteo.de ([185.67.36.66]:38851) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rEf4V-00067D-U3 for 67736@debbugs.gnu.org; Sat, 16 Dec 2023 19:32:02 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id ED9D1240103 for <67736@debbugs.gnu.org>; Sun, 17 Dec 2023 01:31:48 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1702773109; bh=Ry0ZgykuKZtHwYB7iYKHtYnlwiNXGpLwvw01FKlkL5I=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version: Content-Transfer-Encoding:From; b=YJX3JJlKGq3aTtDpn2cvJ1WZUpngml6k4zz/S73P/NSB9MPOvoXRiMjPs6YdB/HSj 58S52TWw3RspIxbG7CN7FN0oTM1bGu9+FTsxROZ3f9nDpQGx7D95CheMeVdfFu5EyU an/0+vtXJOYi6JEQQ3VjjMEPChFuSAn6zTSLhxqXgR1KhRAHF4OoZKLUfVxUOsIsO6 1+YVApW4/tcytESldzo0ZYcPgSX9k5HlpYu0+xtgelFVtAu6Ecsabg8xDc3Lf4DF8B cjsKNxV5Rt0USC09xDyCcYM2lSnlP9PWRWSg6t0k8KIeIJLyg/hYv/5XVjMN3iBbpS MFfewUuKuvrGQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4St3mg2zZpz6ty7; Sun, 17 Dec 2023 01:31:47 +0100 (CET) From: Mekeor Melire To: Eli Zaretskii Subject: Re: bug#67736: 30.0.50; emacsclient.desktop fails with quoting-related error Date: Sun, 17 Dec 2023 00:14:10 +0000 References: <87a5qiswvy.fsf@posteo.de> <83cyvewpha.fsf@gnu.org> <875y16s3i2.fsf@posteo.de> <871qbus35s.fsf@posteo.de> <83y1e2uv81.fsf@gnu.org> In-reply-to: <83y1e2uv81.fsf@gnu.org> Message-ID: <87plz5ptbd.fsf@posteo.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 67736 Cc: 67736@debbugs.gnu.org, carlosjosepita@gmail.com, p.d.oliver@mavit.org.uk, ulm@gentoo.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) 2023-12-10 13:56 eliz@gnu.org: > We have all that complexity for a reason. Please look at Git history > of that file to see how we arrived at what we have now. Let's take a look at the commit-history of the Exec=3D line of the emacsclient.desktop file [1]. It was introduced in the following commit with a very simple and comprehensible Exec=3D line. Commit: 1a845a672dc73c8e98e6cb9bb734616e168e60ba Date: Sun Aug 9 15:57:51 2020 +0200 Author: Carlos Pita Message: Add file, use emacsd as StartupWMClass. Code: Exec=3Demacsclient -c %F Then, there were discussions at bug#49195, bug#49505 and emacs-devel-thread "GUI X-FreeDesktop integration" [2] which resulted in the following commit which changed the Exec=3D line and made it much more complex by invoking a shell: Commit: cbf220bc31c0a00c45b22c140eda7854d81d991b Date: Wed Jun 30 15:11:21 2021 +0200 Author: Peter Oliver Message: From .desktop files, reuse a frame or start a new Emacs as required. Automatically try to reuse an existing frame, open a new frame, or start a new Emacs daemon. Add actions for specific behaviours (bug#49195). Documentation: You may use the "Emacs (Client)" menu entry to connect to an Emacs server with emacsclient. The daemon starts if not already running. Code: Exec=3Dsh -c 'if [ -n "$*" ]; then exec emacsclient --alternate-editor=3D --display=3D"$DISPLAY" "$@"; else exec emacsclient --alternate-editor=3D --create-frame; fi' placeholder %F The commit-message, the committed documentation and the patch-submission-message (at bug#49195) explain that emacsclient.desktop will now start a daemon when not already running. This is achieved by passing --alternate-editor=3D. But all of these resources fail to mention the reason for the shell invocation. It can be reconstructed in a message [3] from Peter Oliver, in a thread on emacs-devel: I believe that the default behaviour when opening a file from a desktop=E2=80=99s file manager should be to open it in an existing GUI frame if one exists, or a new GUI frame if one does not. Clicking Emacs in a desktop=E2=80=99s application launcher should open a new GUI frame. The trouble is that, if Emacs is running as a daemon with no frames, `emacsclient /path/to/foo` will create a new TTY frame rather than a GUI frame. Should this behaviour be changed so that a GUI frame is preferred if $DISPLAY is set? While we=E2=80=99re here, should we report an error if there is no display and no TTY? I.e. the purpose of the shell invocation is to be able to use the shell-conditional if [ -n "$*" ] in order to check if no arguments (file-paths) have been passed to emacsclient.desktop (i.e. e.g. if the user double-clicked a file in a file-explorer for which emacsclient.desktop configured to be the default application); or otherwise if there were no arguments passed (i.e. e.g. if the user clicked on the emacsclient.desktop-icon in their application-launcher). In the first case ("Open one or more specified files in Emacsclient"), --desktop=3D$DESKTOP is passed as additional command-line parameter; whereas in the second case ("Open Emacsclient, but no file(s) in particular"), --create-frame is passed additionally. For me, personally, the emacsclient.desktop is unusable because of an error at an earlier stage. Namely, something goes wrong when XDG invokes the shell, due to the quoting/escaping syntax. The two last commits on the Exec=3D line tried to fix this already but it still does not work for me: Commit: 0a4b66f82752adeb808851a36eabd0554779b33c Author: Peter Oliver Date: Wed Jul 7 22:04:01 2021 +0100 Message: Valid quoting in .desktop files. Quote according to the rules in the Freedesktop.org Desktop Entry Specification. Code: Exec=3Dsh -c "if [ -n \\"\\$*\\" ]; then exec emacsclient --alternate-editor=3D --display=3D\\"\\$DISPLAY\\" \\"\\$@\\"; else exec emacsclient --alternate-editor=3D --create-frame; fi" placeholder %F Commit: d32091199ae5de590a83f1542a01d75fba000467 Author: Ulrich M=C3=BCller Date: Mon Dec 19 16:51:20 2022 +0100 Message: Use `sh` rather than `placeholder` as the command name of the shell wrapper. (Bug#60204) Code: Exec=3Dsh -c "if [ -n \\"\\$*\\" ]; then exec emacsclient --alternate-editor=3D --display=3D\\"\\$DISPLAY\\" \\"\\$@\\"; else exec emacsclient --alternate-editor=3D --create-frame; fi" sh %F The reason for our struggle with the escaping-rules of the Exec-line in .desktop-files are: (1.) They are very complex. [5] (2.) xdg-utils is buggy. [6] It does not implement its own escaping-specification correctly. Other software projects do not run into this bug because they do not have such uncommonly complex Exec-lines in their .desktop-files. And it sounds like it'll take the freedesktop.org-developers a long time to fix the bug, firstly because it'll involve a rewrite of that part of xdg-utils in another programming language (Python instead of Shell), and secondly because the project was pretty dead for a long time until it only recently gained some momentum in July 2023. Note that I don't know if the .desktop-file works fine on MacOS. But I doubt that it works for any GNU+Linux user because there haven't been any releases of xdg-utils in recent years, AFAIK. In this bug-report I do not want to raise the question which command-line flags/parameters (--create-frame, --display, --alternate-editor etc.) are passed to emacsclient by default. I'm reporting that the .desktop-file does not work for me and probably for none GNU+Linux-user at all. And because of the bug-, maintenance- and project-related situation of xdg-utils, which indicates that a bug-fix will take a long time, I'd like to propose to ditch the complex shell-invocation (which necessarily involves the buggy escaping) and instead use a simple and concise one-line, e.g.: Exec=3Demacsclient --alternate-editor=3D --create-frame %F (Or maybe use the recently added --reuse-frame flag instead of --create-frame.) Note that we would not loose the "Start an Emacs-Daemon if not started" logic which was the justification for the commit which introduced the shell-invocation (since we keep --alternate-editor=3D). We would only loose the "create a frame if triggered without file-arguments" logic which seems to be a rather personal taste anyway because the respective message had not gotten any responses from others. (See [3].) [1] You can easily do so yourself by calling `magit-log-trace-definition' when point is on the respective line. [2] Message-ID <20210514031825.zcgswqzuxrkktrgs@E15-2016.optimum.net>, https://yhetil.org/emacs-devel/20210514031825.zcgswqzuxrkktrgs@E15-201= 6.optimum.net/ [3] Message-ID <573eb311-e0f6-2216-4298-458ae8ab827b@froglet.home.mavit.or= g.uk>, https://yhetil.org/emacs-devel/573eb311-e0f6-2216-4298-458ae8ab827b@fr= oglet.home.mavit.org.uk/ [3] The shell invocation looks like: sh -c COMMAND_STRING COMMAND_NAME ARGUMENTS where: - `sh' refers to a POSIX-compliant shell. (Often linked to bash, dash or zsh.) According to POSIX, the parameter `-c' enables passing and executing commands, COMMAND_STRING. - As COMMAND_NAME, which specifies the "name of the shell, which is used in warning and error messages"[4], we pass `sh', which I find okay but `shell-spawning-emacsclient' seems more useful. - As ARGUMENTS, we have `%F' which, according to the freedesktop.org-documentation, represents the names of the files to be opened [4]: A list of files. Use for apps that can open several local files at once. Each file is passed as a separate argument to the executable program. [4] POSIX-Specification: . BASH-documentation: (info "(bash) Invoking Bash") or . Elaborative response on stack-exchange-network: . [5] https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s= 07.html [6] https://gitlab.freedesktop.org/xdg/xdg-utils/-/issues/236 and https://= gitlab.freedesktop.org/xdg/xdg-utils/-/issues/174 From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 17 09:24:40 2023 Received: (at 67736) by debbugs.gnu.org; 17 Dec 2023 14:24:40 +0000 Received: from localhost ([127.0.0.1]:56798 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rEs4O-0004C3-Bm for submit@debbugs.gnu.org; Sun, 17 Dec 2023 09:24:40 -0500 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]:52246) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rEs4L-0004Bo-GX for 67736@debbugs.gnu.org; Sun, 17 Dec 2023 09:24:38 -0500 Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-40c6a71e88cso27747725e9.0 for <67736@debbugs.gnu.org>; Sun, 17 Dec 2023 06:24:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mavit.org.uk; s=google; t=1702823070; x=1703427870; darn=debbugs.gnu.org; h=mime-version:references:message-id:in-reply-to:subject:cc:to:from :date:from:to:cc:subject:date:message-id:reply-to; bh=kl2fLnX5CV2EdCDrJSGCvLRS0kPPNSUlEHIOLUdG9v8=; b=myLuOuxfqrw5SLDsEyqzfOVghqqqs5QyKQyd9E8KrsmaBZzeMUfmChxb88S94/5ZJS lvGuG2eH/e1OLOTD1mlYKtZ7SNLVZ6zcCK+qRWGzC2zNdGfbutChYDQBbPDVOMUg5r0f zjrrCi+DrGkS2sOFro3cMuAxA1+tYGKlVHHQE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702823070; x=1703427870; h=mime-version:references:message-id:in-reply-to:subject:cc:to:from :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=kl2fLnX5CV2EdCDrJSGCvLRS0kPPNSUlEHIOLUdG9v8=; b=EUubyNHZ3LGyCEzCIFUFQMS2KaxvUHNStQHvdr8iRZdL++KvIfXkrDHfpHbX5DQsOs t/lCPQTtGRcul5edFipbmQ2xd9uvHn3R5xAGHCCddR7puKl1KxhYG6TTd5UTzLYRNZO/ xMj5f7rV8q+pEo7wDQB0BfCulksSs1Xvi1XMbNav47D/r6B+CJQ4mRn9SGTRXn8BX0cF VJeUZ4HFSw8EOXOCMIWd5dLBrK0k+8KgRVx4EolxspuBYk4MT/0HukAxYd5eIjkboOjY MupIP3BAVAGpYJ6CTXJn1uVorlxnyfDWyfcZLyYKzYW8xefAcM7d54mBA6gLj0/m1XM6 RLIw== X-Gm-Message-State: AOJu0YwDt7MNJ2dYXS5R3D2sebtt/jORwIe9v464EFFxGe6QfUEo68Hx Kslo9k9mlpnPeq1tojPeCQzVqA== X-Google-Smtp-Source: AGHT+IGqXFNdGr8Cuu+oYq3H4ib9Md6l0C8UMjijgKc4RVfEwTfvRWcW5wbnh+kKcf+ksKLNKlzHrg== X-Received: by 2002:a05:600c:3556:b0:405:3e9a:f1e3 with SMTP id i22-20020a05600c355600b004053e9af1e3mr8623505wmq.11.1702823070196; Sun, 17 Dec 2023 06:24:30 -0800 (PST) Received: from froglet.home.mavit.org.uk (dudl-14-b2-v4wan-165814-cust1925.vm31.cable.virginm.net. [82.34.135.134]) by smtp.gmail.com with ESMTPSA id h12-20020a05600c314c00b0040c45cabc34sm29164208wmo.17.2023.12.17.06.24.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Dec 2023 06:24:29 -0800 (PST) Received: from froglet.home.mavit.org.uk (localhost [127.0.0.1]) by froglet.home.mavit.org.uk (8.17.1/8.17.1) with ESMTPS id 3BHEOSNE021784 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Sun, 17 Dec 2023 14:24:28 GMT Received: from localhost (mavit@localhost) by froglet.home.mavit.org.uk (8.17.1/8.17.1/Submit) with ESMTP id 3BHEORxS021780; Sun, 17 Dec 2023 14:24:27 GMT X-Authentication-Warning: froglet.home.mavit.org.uk: mavit owned process doing -bs Date: Sun, 17 Dec 2023 14:24:27 +0000 (GMT) From: Peter Oliver To: Mekeor Melire Subject: Re: bug#67736: 30.0.50; emacsclient.desktop fails with quoting-related error In-Reply-To: <87plz5ptbd.fsf@posteo.de> Message-ID: <5f44b482-109e-f592-4e7a-8429e56bfa6e@mavit.org.uk> References: <87a5qiswvy.fsf@posteo.de> <83cyvewpha.fsf@gnu.org> <875y16s3i2.fsf@posteo.de> <871qbus35s.fsf@posteo.de> <83y1e2uv81.fsf@gnu.org> <87plz5ptbd.fsf@posteo.de> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="-1463811583-1585282608-1702823068=:4044" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 67736 Cc: 67736@debbugs.gnu.org, Eli Zaretskii , carlosjosepita@gmail.com, ulm@gentoo.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. ---1463811583-1585282608-1702823068=:4044 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8BIT Mekeor Melire wrote: > $ xdg-open example.txt > egrep: warning: egrep is obsolescent; using grep -E > [: -c: line 1: unexpected EOF while looking for matching `"' > [: -c: line 2: syntax error: unexpected end of file > [: -c: line 1: unexpected EOF while looking for matching `"' > [: -c: line 2: syntax error: unexpected end of file > [: -c: line 1: unexpected EOF while looking for matching `"' > [: -c: line 2: syntax error: unexpected end of file > > Does anyone else experience this problem? I don’t experience it on Fedora, but I notice that the Fedora version of xdg-utils carries an awful lot of patches (https://src.fedoraproject.org/rpms/xdg-utils/tree/f38). I agree that the quoting is too complex, and would be better eliminated. A wrapper script could achieve the same functionality. While I’m here, I’ll mention the other emacsclient.desktop issues that I’m aware of: - Startup notification doesn’t work when opening files in an existing Emacs: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=49504 - $DISPLAY is inappropriate for PGTK on Wayland, since it forces XWayland. - emacsclient.desktop provides a superset of the functionality of emacs.desktop, but can’t replace it because there isn’t agreement that use of a daemon is suitable default behaviour. -- Peter Oliver ---1463811583-1585282608-1702823068=:4044-- From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 17 10:35:35 2023 Received: (at 67736) by debbugs.gnu.org; 17 Dec 2023 15:35:35 +0000 Received: from localhost ([127.0.0.1]:58887 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rEtB0-0002l3-Ov for submit@debbugs.gnu.org; Sun, 17 Dec 2023 10:35:35 -0500 Received: from dev.gentoo.org ([2001:470:ea4a:1:5054:ff:fec7:86e4]:36941 helo=smtp.gentoo.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rEtAy-0002ki-GY for 67736@debbugs.gnu.org; Sun, 17 Dec 2023 10:35:33 -0500 From: Ulrich Mueller To: Peter Oliver Subject: Re: bug#67736: 30.0.50; emacsclient.desktop fails with quoting-related error In-Reply-To: <5f44b482-109e-f592-4e7a-8429e56bfa6e@mavit.org.uk> (Peter Oliver's message of "Sun, 17 Dec 2023 14:24:27 +0000 (GMT)") References: <87a5qiswvy.fsf@posteo.de> <83cyvewpha.fsf@gnu.org> <875y16s3i2.fsf@posteo.de> <871qbus35s.fsf@posteo.de> <83y1e2uv81.fsf@gnu.org> <87plz5ptbd.fsf@posteo.de> <5f44b482-109e-f592-4e7a-8429e56bfa6e@mavit.org.uk> Date: Sun, 17 Dec 2023 16:35:19 +0100 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 67736 Cc: Mekeor Melire , 67736@debbugs.gnu.org, Eli Zaretskii , carlosjosepita@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) >>>>> On Sun, 17 Dec 2023, Peter Oliver wrote: > Mekeor Melire wrote: >> $ xdg-open example.txt >> egrep: warning: egrep is obsolescent; using grep -E >> [: -c: line 1: unexpected EOF while looking for matching `"' >> [: -c: line 2: syntax error: unexpected end of file >> [: -c: line 1: unexpected EOF while looking for matching `"' >> [: -c: line 2: syntax error: unexpected end of file >> [: -c: line 1: unexpected EOF while looking for matching `"' >> [: -c: line 2: syntax error: unexpected end of file >> Does anyone else experience this problem? > I don=E2=80=99t experience it on Fedora, but I notice that the Fedora ver= sion > of xdg-utils carries an awful lot of patches > (https://src.fedoraproject.org/rpms/xdg-utils/tree/f38). I cannot reproduce the problem on Gentoo either. The Gentoo package uses a snapshot of xdg-utils from 2021 because the 1.1.3 release is very old: https://gitlab.freedesktop.org/xdg/xdg-utils/-/commits/1a58bc28f6844898532d= af9ee1bf6da7764955a9/ (Also, xdg-utils-1.2.0 seems to be on its way; upstream has released a 1.2.0-beta1 version.) > I agree that the quoting is too complex, and would be better > eliminated. I've double checked: The quoting in the desktop file is definitely according to the specification. IMHO it isn't particularly complex in emacsclient.desktop, at least compared to what we previously had in emacsclient-mail.desktop. > A wrapper script could achieve the same functionality. All previous committers have avoided a wrapper script, because inlining the shell command gets the work done. Plus, wouldn't it be better to integrate the functionality of any wrapper script in the emacsclient binary directly? [Restoring some of the quoted context] >> Commit: d32091199ae5de590a83f1542a01d75fba000467 >> Author: Ulrich M=C3=BCller >> Date: Mon Dec 19 16:51:20 2022 +0100 >> Message: >> Use `sh` rather than `placeholder` as the command name of the >> shell wrapper. (Bug#60204) >> Code: >> Exec=3Dsh -c "if [ -n \\"\\$*\\" ]; then exec emacsclient >> --alternate-editor=3D --display=3D\\"\\$DISPLAY\\" \\"\\$@\\"; >> else exec emacsclient --alternate-editor=3D --create-frame; fi" >> sh %F This commit didn't do anything significant for emacsclient.desktop, it only changed the command name (which is shown e.g. in "ps" output) from "placeholder" to "sh". From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 17 18:17:12 2023 Received: (at 67736) by debbugs.gnu.org; 17 Dec 2023 23:17:12 +0000 Received: from localhost ([127.0.0.1]:59153 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rF0Nj-0003YU-QP for submit@debbugs.gnu.org; Sun, 17 Dec 2023 18:17:12 -0500 Received: from mout02.posteo.de ([185.67.36.66]:43705) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rF0Ni-0003YH-1P for 67736@debbugs.gnu.org; Sun, 17 Dec 2023 18:17:11 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 67DE2240103 for <67736@debbugs.gnu.org>; Mon, 18 Dec 2023 00:17:02 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1702855022; bh=Ku/pywuOvO2ek+oStUo/GdzaiwDaQWUFqDb/NqJO0B0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:From; b=mcENGbM1iNSUsuaE2+DPBlGs902LvYjZLo5VnR9U6FlX1FQwfYufzm0h/kxad3wAC NqKICIWmujb8QW/Qs48l6TsfMHLipA7cS9xfOvWBFgxy1Z+jNjCZfzU7Sj/qX8gmJI LqLX+5d2Ia2BEB+rYOkmBhsUb4skNqfbMjHaWpaWcc89ib0NxyYxVrOW366zYLyBtJ /fefPW8Tr2KQOaOv4kUqBJGdW+NMe8T+mof5VXUgUsT25M1hoeRnHLuP3ajMeEj9rT aZ92ooe2DIVl52w/2Y3jJKOXEz+ap4qjaaYctStgbNN4S+3dWY8XX96XSX55Yx0+8t 35xV8DIAUS3WA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Stf3w4H3kz6tvk; Mon, 18 Dec 2023 00:17:00 +0100 (CET) From: Mekeor Melire To: 67736@debbugs.gnu.org Subject: Re: bug#67736: 30.0.50; emacsclient.desktop fails with quoting-related error Date: Sun, 17 Dec 2023 23:06:55 +0000 References: <87a5qiswvy.fsf@posteo.de> <83cyvewpha.fsf@gnu.org> <875y16s3i2.fsf@posteo.de> <871qbus35s.fsf@posteo.de> <83y1e2uv81.fsf@gnu.org> <87plz5ptbd.fsf@posteo.de> <5f44b482-109e-f592-4e7a-8429e56bfa6e@mavit.org.uk> In-reply-to: Message-ID: <87jzpc5ska.fsf@posteo.de> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 67736 Cc: Eli Zaretskii , Peter Oliver , carlosjosepita@gmail.com, Ulrich Mueller X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 2023-12-17 16:35 ulm@gentoo.org: > On Sun, 17 Dec 2023, Peter Oliver wrote: > > > I don=E2=80=99t experience it on Fedora, but I notice that the Fedora v= ersion > > of xdg-utils carries an awful lot of patches > > (https://src.fedoraproject.org/rpms/xdg-utils/tree/f38). > > I cannot reproduce the problem on Gentoo either. The Gentoo package uses > a snapshot of xdg-utils from 2021 because the 1.1.3 release is very old: > https://gitlab.freedesktop.org/xdg/xdg-utils/-/commits/1a58bc28f684489853= 2daf9ee1bf6da7764955a9/ Yes, many distros patch xdg-utils. On #emacs-IRC-channel I was even told that file-explorers like GNOME's Nautilus and LXDE's pcmanfm tinker with .desktop-files, e.g. they might ship their own emacsclient.desktop file. So, when testing, do not use graphical file-managers. Instead, use the xdg-open executable from xdg-utils package in a shell. Edit the file at ~/.config/mimeapps.list (or similar) yourself rather than letting some GUI do it. And check the content of your emacsclient.desktop since it might be altered by your distro. When sharing results, please also share which version your xdg-utils package has, and which patches had been applied on its source code before it was built. Personally, I use xdg-utils 1.1.3, the latest stable release, installed with Guix, which only includes some minor code-changes that make it find executables on Guix System. [1] My emacsclient.desktop is from Emacs master branch without changes. Gentoo does not only build xdg-utils from an unreleased commit, but also it applies some additional patches [2], one of which seems to alter the handling of Exec-entries. > (Also, xdg-utils-1.2.0 seems to be on its way; upstream has released a > 1.2.0-beta1 version.) Thanks for point this out. In reaction to your e-mail, I tried out the 1.2.0-beta1 version (using Guix and the package declaration that I attached to this e-mail). Unfortunately, I'm still running in the same error as before: [: -c: line 1: unexpected EOF while looking for matching `"' [: -c: line 2: syntax error: unexpected end of file > > I agree that the quoting is too complex, and would be better > > eliminated. > > I've double checked: The quoting in the desktop file is definitely > according to the specification. IMHO it isn't particularly complex in > emacsclient.desktop, at least compared to what we previously had in > emacsclient-mail.desktop. The problem is that xdg-utils does not adhere to its own specification. It seems like some distros patched it to be better at that though. I think a prior version of emacsclient-mail.desktop is bad reference for comparison. Compared to other .desktop-files in the FOSS-world, emacsclient.desktop has a very complicated, maybe the most complicated Exec-entry. I can't prove this by representative statistics but only refer to my own experience, and quote the reaction of the person, who by far made the most commits on xdg-utils recently, when seeing the emacsclient.desktop-files Exec-entry: "That is =E2=80=A6 one hell of an exec line." [3] > > A wrapper script could achieve the same functionality. > > All previous committers have avoided a wrapper script, because inlining > the shell command gets the work done. Which work does it get done though? The work is the "pass --create-frame when there are no file-arguments" logic. And as far as I know, there never was consensus for it. > Plus, wouldn't it be better to integrate the functionality of any > wrapper script in the emacsclient binary directly? If there was consensus on a functionality that needed to be handled in either a wrapper-script or in the emacsclient-binary itself, then yes. But I don't think there is such a consensus. Honestly, I don't know how to handle this tricky situation: freedesktop.org has specification for Exec entries in .desktop-files. xdg-utils itself does implement this specification correctly. Fixing the bug will probably take its developers a long time because they want to rewrite it (in Python). Meanwhile, xdg-utils is less/not buggy for most users because their distro patches it. Still, I know I'm not the only one who runs into the reported error which makes emacsclient.desktop unusable. Personally, I suggest to use, as Exec entry in emacsclient.desktop, a simple one-liner that does not involve a shell-invocation, because it will work for everyone. In the long run, we might consider to: (1.) Use a similarly simple one-liner as Exec entry, but also pass something like --xdg. (2.) Provide Emacs users a customizable Elisp variable that specifies the behavior of Emacsclient when passed --xdg. > >> Commit: d32091199ae5de590a83f1542a01d75fba000467 > >> Author: Ulrich M=C3=BCller > >> Date: Mon Dec 19 16:51:20 2022 +0100 > >> Message: > >> Use `sh` rather than `placeholder` as the command name of the > >> shell wrapper. (Bug#60204) > >> Code: > >> Exec=3Dsh -c "if [ -n \\"\\$*\\" ]; then exec emacsclient > >> --alternate-editor=3D --display=3D\\"\\$DISPLAY\\" \\"\\$@\\"; > >> else exec emacsclient --alternate-editor=3D --create-frame; fi" > >> sh %F > > This commit didn't do anything significant for emacsclient.desktop, You are right. Sorry for the wrong contextualization. [1] https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/freedeskt= op.scm?h=3D60c97924e9519361494aaf0686e28eb831a42315#n517 [2] One patch is mentioned here [4] and can be found here [5]. Another patch is located here [6] but does not seem to be significant with regards to Exec-behavior. [3] https://gitlab.freedesktop.org/xdg/xdg-utils/-/issues/236#note_2169234 [4] https://github.com/gentoo/gentoo/blob/b3c1b324d58c92ad8b19c67d4aed20ec= c5e5f021/x11-misc/xdg-utils/xdg-utils-1.1.3_p20210805-r1.ebuild#L13 [5] https://dev.gentoo.org/~sam/distfiles/x11-misc/xdg-utils/xdg-utils-1.1= .3_p20200220-no-which.patch.xz [6] https://github.com/gentoo/gentoo/blob/b3c1b324d58c92ad8b19c67d4aed20ec= c5e5f021/x11-misc/xdg-utils/files/xdg-utils-egrep.patch --=-=-= Content-Type: text/plain Content-Disposition: inline; filename=xdg-utils.scm (define-module (channel packages xdg-utils) #:use-module ((gnu packages freedesktop) #:prefix gnu:) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix gexp) #:use-module (guix git-download) #:use-module (guix modules) #:use-module (guix packages)) (define-public xdg-utils (let ( (commit "f8bc7454112899413a60996b7b5d9aebfa4e6864") (revision "1")) (package (inherit gnu:xdg-utils) (version (git-version "1.2.0.1" revision commit)) (source (origin (method git-fetch) (file-name (git-file-name (package-name gnu:xdg-utils) version)) (uri (git-reference (url "https://gitlab.freedesktop.org/xdg/xdg-utils.git") (commit commit))) (sha256 (base32 "1gw489c8lwy008wwa00qgcgf0hg4vclqxg1k74n0qh9s7kgqq8pr"))))))) --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 18 05:17:43 2023 Received: (at 67736) by debbugs.gnu.org; 18 Dec 2023 10:17:43 +0000 Received: from localhost ([127.0.0.1]:59489 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rFAgw-000194-RT for submit@debbugs.gnu.org; Mon, 18 Dec 2023 05:17:43 -0500 Received: from woodpecker.gentoo.org ([2001:470:ea4a:1:5054:ff:fec7:86e4]:58989 helo=smtp.gentoo.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rFAgt-00018X-PA for 67736@debbugs.gnu.org; Mon, 18 Dec 2023 05:17:40 -0500 From: Ulrich Mueller To: Mekeor Melire Subject: Re: bug#67736: 30.0.50; emacsclient.desktop fails with quoting-related error In-Reply-To: <87jzpc5ska.fsf@posteo.de> (Mekeor Melire's message of "Sun, 17 Dec 2023 23:06:55 +0000") References: <87a5qiswvy.fsf@posteo.de> <83cyvewpha.fsf@gnu.org> <875y16s3i2.fsf@posteo.de> <871qbus35s.fsf@posteo.de> <83y1e2uv81.fsf@gnu.org> <87plz5ptbd.fsf@posteo.de> <5f44b482-109e-f592-4e7a-8429e56bfa6e@mavit.org.uk> <87jzpc5ska.fsf@posteo.de> Date: Mon, 18 Dec 2023 11:17:25 +0100 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 67736 Cc: 67736@debbugs.gnu.org, Eli Zaretskii , Peter Oliver , carlosjosepita@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) >>>>> On Mon, 18 Dec 2023, Mekeor Melire wrote: > So, when testing, do not use graphical file-managers. Instead, use the > xdg-open executable from xdg-utils package in a shell. Edit the file at > ~/.config/mimeapps.list (or similar) yourself rather than letting some > GUI do it. And check the content of your emacsclient.desktop since it > might be altered by your distro. > When sharing results, please also share which version your xdg-utils > package has, and which patches had been applied on its source code > before it was built. Sure. My /usr/share/applications/emacsclient.desktop is identical to the one from Emacs master (as of today). Also, it is what is used for plain text files: $ xdg-mime query default text/plain emacsclient.desktop I've now also tested with xdg-utils-1.2.0-beta1 and with 1.1.3, manually installed from the tarball available at: https://gitlab.freedesktop.org/xdg/xdg-utils/-/tags/v1.1.3 I cannot reproduce the problem with either of them: $ xdg-open --version xdg-open 1.1.3 $ echo hello >foo.txt && xdg-open foo.txt Waiting for Emacs... This correctly visits the file in my running Emacs. However, I also see that xdg-open delegates handling of the file to exo-open from XFCE (and similar for GNOME, KDE, etc.). So maybe xdg-open sometimes doesn't parse the desktop file by itself? Which would explain why I don't see the problem. > [...] > The problem is that xdg-utils does not adhere to its own specification. > It seems like some distros patched it to be better at that though. > I think a prior version of emacsclient-mail.desktop is bad reference for > comparison. Compared to other .desktop-files in the FOSS-world, > emacsclient.desktop has a very complicated, maybe the most complicated > Exec-entry. I can't prove this by representative statistics but only > refer to my own experience, and quote the reaction of the person, who by > far made the most commits on xdg-utils recently, when seeing the > emacsclient.desktop-files Exec-entry: "That is =E2=80=A6 one hell of an e= xec > line." [3] The line conforms to the spec, so xdg-open should be able to handle it. Then again, the line is "one hell" only because (IMHO) their own specification sucks and requires complicated quoting plus multiple telnet-song-esque backslash-escaping. (Also I'm a little shocked by the reaction of the upstream person. It's their specification and their reference implementation, so why don't they have unit tests for all intricacies of the Exec line?) > Honestly, I don't know how to handle this tricky situation: > freedesktop.org has specification for Exec entries in .desktop-files. > xdg-utils itself does implement this specification correctly. Is a "not" missing there? Otherwise I don't understand the sentence. > Fixing the bug will probably take its developers a long time because > they want to rewrite it (in Python). Meanwhile, xdg-utils is less/not > buggy for most users because their distro patches it. *sigh* Standards exist for a reason, namely that developers can program against them, instead of second-guessing other implementations. I think we have established that the bug is in xdg-utils, so that's where it should be ultimately fixed. Not sure if it's worth having a short-term workaround using a wrapper script. From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 18 07:17:24 2023 Received: (at 67736-done) by debbugs.gnu.org; 18 Dec 2023 12:17:24 +0000 Received: from localhost ([127.0.0.1]:59566 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rFCYm-0002Cl-83 for submit@debbugs.gnu.org; Mon, 18 Dec 2023 07:17:24 -0500 Received: from mout01.posteo.de ([185.67.36.65]:48169) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rFCYj-0002CH-Su for 67736-done@debbugs.gnu.org; Mon, 18 Dec 2023 07:17:22 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 1E72B240027 for <67736-done@debbugs.gnu.org>; Mon, 18 Dec 2023 13:17:14 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1702901834; bh=FgjASy8/Y8rh6fCOoKg6sz7da8huk4/7G0mWq0bOCFc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:From; b=H8EtF8+ww42tmlu2EASvxtiFTMInymPvgUHJscSS0mODz3cZl7zlx6h/FQLIEZzMU AqEJK94pwR7++4pM9EpLRLX+d2eslKvX/ScOUXFpZ6muvnI2LMMpMD+vQV1N0Uki62 R+sJnqCjSA8xBThP4V84FhSjNcCL1m75HcBP/wgxApo6Ei+6NvQb83jCneHuDNRsYp qTEx3D3uxvQnF766gww+7fSBLyiuIgMPoxmlnxwsnMgJGwb2Z5pBpG+MoH11u3IS7K 8FqgYXvSrNlb8Htzs438nSldwnEE4VCirxSTmpJ24cVFPrEpV4WbVEtsAEwjBVx+TN I0kYU7eSvXONQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4StzN81Y5Pz6tn4; Mon, 18 Dec 2023 13:17:12 +0100 (CET) From: Mekeor Melire To: 67736-done@debbugs.gnu.org Subject: Re: bug#67736: 30.0.50; emacsclient.desktop fails with quoting-related error Date: Mon, 18 Dec 2023 12:14:01 +0000 References: <87a5qiswvy.fsf@posteo.de> <83cyvewpha.fsf@gnu.org> <875y16s3i2.fsf@posteo.de> <871qbus35s.fsf@posteo.de> <83y1e2uv81.fsf@gnu.org> <87plz5ptbd.fsf@posteo.de> <5f44b482-109e-f592-4e7a-8429e56bfa6e@mavit.org.uk> <87jzpc5ska.fsf@posteo.de> In-reply-to: Message-ID: <87frzz670d.fsf@posteo.de> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 67736-done Cc: Ulrich Mueller , Peter Oliver , carlosjosepita@gmail.com, Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) 2023-12-18 11:17 ulm@gentoo.org: > > Honestly, I don't know how to handle this tricky situation: > > freedesktop.org has specification for Exec entries in .desktop-files. > > xdg-utils itself does implement this specification correctly. > > Is a "not" missing there? Otherwise I don't understand the sentence. You are right, a "not" was missing. > Standards exist for a reason, namely that developers can program > against them, instead of second-guessing other implementations. > > I think we have established that the bug is in xdg-utils, so that's > where it should be ultimately fixed. Not sure if it's worth having a > short-term workaround using a wrapper script. You are right. Let's close this bug. It's an upstream-bug. From unknown Fri Jun 20 07:22:47 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 15 Jan 2024 12:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator