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#67736: 30.0.50; emacsclient.desktop fails with quoting-related error Date: Sun, 10 Dec 2023 08:17:37 +0200 Message-ID: <83cyvewpha.fsf@gnu.org> References: <87a5qiswvy.fsf@posteo.de> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34251"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 67736@debbugs.gnu.org To: Mekeor Melire Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Dec 10 07:19:10 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 1rCD9h-0008hz-SH for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 10 Dec 2023 07:19:09 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rCD9P-0006A9-S4; Sun, 10 Dec 2023 01:18:51 -0500 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 1rCD9M-00069x-UU for bug-gnu-emacs@gnu.org; Sun, 10 Dec 2023 01:18:49 -0500 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 1rCD9M-0002if-LL for bug-gnu-emacs@gnu.org; Sun, 10 Dec 2023 01:18:48 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rCD9a-0007Rx-6v for bug-gnu-emacs@gnu.org; Sun, 10 Dec 2023 01:19:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 10 Dec 2023 06:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67736 X-GNU-PR-Package: emacs Original-Received: via spool by 67736-submit@debbugs.gnu.org id=B67736.170218909328570 (code B ref 67736); Sun, 10 Dec 2023 06:19:02 +0000 Original-Received: (at 67736) by debbugs.gnu.org; 10 Dec 2023 06:18:13 +0000 Original-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 Original-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 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 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==; In-Reply-To: <87a5qiswvy.fsf@posteo.de> (message from Mekeor Melire on Sun, 10 Dec 2023 00:13:33 +0000) 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:275898 Archived-At: > 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?