From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ihor Radchenko Newsgroups: gmane.emacs.bugs Subject: bug#74467: 31.0.50; org-protocol emacsclient.desktop change is not fully functional Date: Sun, 05 Jan 2025 18:36:45 +0000 Message-ID: <87r05hnm4i.fsf@localhost> References: <86seriksak.fsf@gnu.org> <87ed27cthy.fsf@localhost> <86cyhrpfbf.fsf@gnu.org> <864j2ot4w1.fsf@gnu.org> <86r05id8f5.fsf@gnu.org> <86o70lahmt.fsf@gnu.org> <87sepxprl1.fsf@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21731"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 74467@debbugs.gnu.org, Eli Zaretskii , binarin@binarin.info To: =?UTF-8?Q?Bj=C3=B6rn?= Bidar Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jan 05 19:35:19 2025 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 1tUVT4-0005T6-Fr for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 05 Jan 2025 19:35:18 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tUVSs-0006rQ-BY; Sun, 05 Jan 2025 13:35:07 -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 1tUVSp-0006rB-Gx for bug-gnu-emacs@gnu.org; Sun, 05 Jan 2025 13:35:04 -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 1tUVSp-0007lO-7i for bug-gnu-emacs@gnu.org; Sun, 05 Jan 2025 13:35:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=kdy6j4JUO5VX8fQocbk9goS2qzcQdTXJoEBQOq9LYbM=; b=Oek7H/8Gtr/4+pzs4DKpqF0y/A7vcl3gklqS5gkmriz5BiaPy7yuKR5CJk4b1I/fBTqShTHBNaGR/qspR8/Uw3XJ/QVKiZPAzBKue16bHY6N0Z0bQwKZflEtZ74mTa9U1fcvYpuqGSgqd13ZOi3NhzAf04GGuR8zOuYkmWIdQ6SkPQFaiq4M+/FSSJlR5DNesTpT6hxHNP0/xB3BcNTUAgfO+DB2+KpV1faLH7ZrZK3PN+OjrFZrRzaMesqx1J3zYAHP5rItMwttdLa0ociAxe8yZ/Gh25wSs+7KfrLk9BBpdD9NLt0U2tDKYkt6csL54nhjyubwHSjTO3gkvOMGsw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tUVSo-00021A-2a for bug-gnu-emacs@gnu.org; Sun, 05 Jan 2025 13:35:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Ihor Radchenko Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 05 Jan 2025 18:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74467 X-GNU-PR-Package: emacs Original-Received: via spool by 74467-submit@debbugs.gnu.org id=B74467.17361020787710 (code B ref 74467); Sun, 05 Jan 2025 18:35:02 +0000 Original-Received: (at 74467) by debbugs.gnu.org; 5 Jan 2025 18:34:38 +0000 Original-Received: from localhost ([127.0.0.1]:35180 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tUVSP-00020H-H4 for submit@debbugs.gnu.org; Sun, 05 Jan 2025 13:34:38 -0500 Original-Received: from mout01.posteo.de ([185.67.36.65]:57523) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tUVSM-0001zy-Ei for 74467@debbugs.gnu.org; Sun, 05 Jan 2025 13:34:36 -0500 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id BADEC240027 for <74467@debbugs.gnu.org>; Sun, 5 Jan 2025 19:34:27 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1736102067; bh=N+Sx+YX35seCgkG7cUz8TF0yieda7Vk1GElVJ6EhVCs=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: Content-Transfer-Encoding:From; b=h/GBUZpQPOELW2MDBKUqmZ3fAGK7A9VrybdxyyZZpj1e37e/mY8Nm75wfkbTaj3b8 jLHuQLhnMHdCi2ss4Iwq6GVznLghc1aRPsDFuuQw9Ir3osq4CDSpgDDfr/JCa0n25d WwRqE/Wluv2w+i2uunxf+OMVgpmWEkUApR33AQrPiRXCmANJmgRWaD89LP8ww0SkQO MRAcDGsZp2wFvMFyKLOk+ZDcadx6rFbzYaXcDqkRHsAiaEXTsmDX31EN8PLYFFoPd6 /JZXy77/FuxfTEx3hZOakm6u9aticLbIYNYvJji6Cw8LMnh0A1g5xVKm9INTHu+sCO 0LdWVWOmP8wuA== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4YR5ZB2rLmz9rxQ; Sun, 5 Jan 2025 19:34:26 +0100 (CET) In-Reply-To: <87wmf9t9hm.fsf@> 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:298589 Archived-At: Bj=C3=B6rn Bidar writes: >> -Exec=3Dsh -c "if [ -n \\"\\$*\\" ]; then exec emacsclient --alternate-e= ditor=3D --display=3D\\"\\$DISPLAY\\" \\"\\$@\\"; else exec emacsclient --a= lternate-editor=3D --create-frame; fi" sh %F >> +Exec=3Dsh -c "if [ -n \\"\\$*\\" ]; then exec emacsclient --alternate-e= ditor=3D --display=3D\\"\\$DISPLAY\\" \\"\\$@\\"; else exec emacsclient --a= lternate-editor=3D --create-frame; fi" sh %U > > Do we need the shell code here? if DISPLAY is defined emacsclient could > shurely forward it to Emacs. I think that reasons why sh is there have nothing to do with the issue at hand. > Shellcode is part of the issue. How so? The first message in this thread described exactly why the old version stopped working: On 2023-10-03 there was a change introduced in xdg-utils https://cgit.freedesktop.org/xdg/xdg-utils/commit/?id=3Db9d3ecf8180c57d= bb5ca47253898ba0553e81c60 to more strictly follow xdg specification, and only pass URL-like arguments to programs that explicitly requested this by using '%u' or '%U' parameters. After the above change, %F in our .desktop file prevents xdg-open from using it for opening URIs. Any URIs, not just org-protocol and co. So, %U should fix it, except that it will also signal to xdg-open that Emacs can handle file:// URI as well; so we need to make sure that file:// URIs can be opened just fine. --=20 Ihor Radchenko // yantar92, Org mode maintainer, Learn more about Org mode at . Support Org development at , or support my work at