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: Mon, 16 Dec 2024 19:34:01 +0000 Message-ID: <87ed27cthy.fsf@localhost> References: <86seriksak.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16141"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 74467@debbugs.gnu.org, Alexey Lebedeff To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Dec 16 20:33:41 2024 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 1tNGqa-000428-2n for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 16 Dec 2024 20:33:40 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tNGq1-0008Sg-Tz; Mon, 16 Dec 2024 14:33:06 -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 1tNGpy-0008SU-BM for bug-gnu-emacs@gnu.org; Mon, 16 Dec 2024 14:33:02 -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 1tNGpy-0005w6-2k for bug-gnu-emacs@gnu.org; Mon, 16 Dec 2024 14:33:02 -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=NDIkptEP8iysV+d0iCiX9D3MZypCD9cZXUKwHDukO9A=; b=e5CBX2mmosQt/QB4WRH7JUjqitBDOdsprRdUfekFE1esRfDdXqa+H5GzsXJdxznI+kyHdVtjyCHsaAJjlORYsvqyvGwXtSHbNahHNzfdAHMvNy6ZQLnv4aestqRxLc8yWnZwD2Y56/wpQWqZAPcOsE/LzXRCVSZRLtfcqoS1WUYw0mEuf7aNHw47S20euVAm1wVCfzAb2+pMKKLZv5xY4IbwDBXW7y6sIKatILx7gi7XZmRb/LDv7GYT2r/4ZJZwFxn+SkKbxdKALoLNpSXXjvTN491VTlODZ1qK8h5Npg4Bov7EPghipEVit1flekT+RIEHKrVBGm5KmvivObsdRQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tNGpx-0004uI-Ss for bug-gnu-emacs@gnu.org; Mon, 16 Dec 2024 14:33:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Ihor Radchenko Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 16 Dec 2024 19:33:01 +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.173437756718820 (code B ref 74467); Mon, 16 Dec 2024 19:33:01 +0000 Original-Received: (at 74467) by debbugs.gnu.org; 16 Dec 2024 19:32:47 +0000 Original-Received: from localhost ([127.0.0.1]:56293 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tNGpj-0004tU-5r for submit@debbugs.gnu.org; Mon, 16 Dec 2024 14:32:47 -0500 Original-Received: from mout01.posteo.de ([185.67.36.65]:59337) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tNGpg-0004t6-71 for 74467@debbugs.gnu.org; Mon, 16 Dec 2024 14:32:45 -0500 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id DA373240028 for <74467@debbugs.gnu.org>; Mon, 16 Dec 2024 20:32:34 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1734377554; bh=eX+OgFg9hQAPkVNlSnAvMJKfInIR5SPxlLhpQ9qELxY=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=mf8tn1vlpmNMOj42xtrQUwn+Sm/sTSPJHbOuZG3cxYR9pnRy7v9Kc6mbyQARjm5km lxQgoY6VDVyyJSsMhwTwvBJmnloeAHqT/zkusfHAunnWaT4Zdtc9v1WXUuOITnYzfK Vilat06qTEtY5btzdE/ZNoVsLGIhkb7r2BAHt90L8f+xwBHqitEErrhUSoMztf/Meg CL8TwsrZwekAACdUP7ze21GiGnESJHeeBpxcoHnM0j7TILjBQ82+OtUafn1Y6NH8Qb +tnsd5VwJkrQctfFBSzBxJpKNvkL7PB/3MW1Gy7fkj/fGn/bpfAx/p0GZTXzWzuOha aDSqw1OFP/vBg== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4YBqpS71xtz9rxL; Mon, 16 Dec 2024 20:32:32 +0100 (CET) In-Reply-To: <86seriksak.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:297221 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Eli Zaretskii writes: >> One solution would be introducing separate=C2=A0 .desktop file >> (i.e. 'etc/emacsclient-org-protocol.desktop'), analoguous to the already >> existing 'etc/emacsclient-mail.desktop' (which uses '%u'). > > Ihor, could you please look into this? I am attaching an *untested* patch that implements a new .desktop file. Note that an alternative could be handling file:// URIs by Emacs. Your call. > (Each time such issues pop up, I regret again that we agreed to > include these *.desktop files in our source tree, sigh.) We are obliged to cooperate with other parts of GNU toolchain, don't we? --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-etc-emacsclient.desktop-Fix-handling-org-protocol-UR.patch >From 1b5148c8a7fe995adcfae302e48a87a039eed8a8 Mon Sep 17 00:00:00 2001 Message-ID: <1b5148c8a7fe995adcfae302e48a87a039eed8a8.1734377491.git.yantar92@posteo.net> From: Ihor Radchenko Date: Mon, 16 Dec 2024 20:28:28 +0100 Subject: [PATCH] etc/emacsclient.desktop: Fix handling org-protocol URIs (bug#74467) * etc/emacsclient-org-protocol.desktop: New file registering x-scheme-handler/org-protocol URI handler. This has to be a separate file because new versions of xdg-utils demand using %u or %U in order to open URIs. * etc/emacsclient.desktop: Remove x-scheme-handler/org-protocol from MimeType. It does not have any effect in the newer xdg-utils. --- etc/emacsclient-org-protocol.desktop | 13 +++++++++++++ etc/emacsclient.desktop | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 etc/emacsclient-org-protocol.desktop diff --git a/etc/emacsclient-org-protocol.desktop b/etc/emacsclient-org-protocol.desktop new file mode 100644 index 00000000000..92cde0e7130 --- /dev/null +++ b/etc/emacsclient-org-protocol.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Name=Emacs (Client) +GenericName=Text Editor +Comment=Handle Org protocol URI +MimeType=x-scheme-handler/org-protocol; +Exec=sh -c "exec emacsclient --alternate-editor= --create-frame" sh %u +Icon=emacs +Type=Application +Terminal=false +Categories=Development;TextEditor; +StartupNotify=true +StartupWMClass=Emacs +Keywords=emacsclient;org-protocol \ No newline at end of file diff --git a/etc/emacsclient.desktop b/etc/emacsclient.desktop index 4395d3b02bc..a9f840c7033 100644 --- a/etc/emacsclient.desktop +++ b/etc/emacsclient.desktop @@ -2,7 +2,7 @@ Name=Emacs (Client) GenericName=Text Editor Comment=Edit text -MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++;x-scheme-handler/org-protocol; +MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++; Exec=sh -c "if [ -n \\"\\$*\\" ]; then exec emacsclient --alternate-editor= --display=\\"\\$DISPLAY\\" \\"\\$@\\"; else exec emacsclient --alternate-editor= --create-frame; fi" sh %F Icon=emacs Type=Application -- 2.47.1 --=-=-= Content-Type: text/plain -- Ihor Radchenko // yantar92, Org mode maintainer, Learn more about Org mode at . Support Org development at , or support my work at --=-=-=--