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