From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Mekeor Melire Newsgroups: gmane.emacs.bugs Subject: bug#67736: 30.0.50; emacsclient.desktop fails with quoting-related error Date: Sun, 10 Dec 2023 11:14:25 +0000 Message-ID: <875y16s3i2.fsf@posteo.de> References: <87a5qiswvy.fsf@posteo.de> <83cyvewpha.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="645"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii To: 67736@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Dec 10 12:31:13 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 1rCI1h-000AYn-IU for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 10 Dec 2023 12:31:13 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rCI1X-0007MQ-TR; Sun, 10 Dec 2023 06:31:04 -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 1rCI1I-0007Lm-5m for bug-gnu-emacs@gnu.org; Sun, 10 Dec 2023 06:30:48 -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 1rCI1H-00080g-M8 for bug-gnu-emacs@gnu.org; Sun, 10 Dec 2023 06:30:47 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rCI1V-0000MF-OF for bug-gnu-emacs@gnu.org; Sun, 10 Dec 2023 06:31:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Mekeor Melire Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 10 Dec 2023 11:31:01 +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.17022078571365 (code B ref 67736); Sun, 10 Dec 2023 11:31:01 +0000 Original-Received: (at 67736) by debbugs.gnu.org; 10 Dec 2023 11:30:57 +0000 Original-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 Original-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 Original-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== Original-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) In-reply-to: <83cyvewpha.fsf@gnu.org> 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:275913 Archived-At: 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