GNU bug report logs - #79068
30.1; emacsclient.desktop: x-scheme-handler/org-protocol is inconsistent with %F

Previous Next

Package: emacs;

Reported by: Ulrich Müller <ulm <at> gentoo.org>

Date: Mon, 21 Jul 2025 08:42:02 UTC

Severity: normal

Merged with 74467

Found in versions 30.1, 31.0.50

To reply to this bug, email your comments to 79068 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#79068; Package emacs. (Mon, 21 Jul 2025 08:42:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ulrich Müller <ulm <at> gentoo.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 21 Jul 2025 08:42:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Ulrich Müller <ulm <at> gentoo.org>
To: bug-gnu-emacs <at> gnu.org
Cc: Ihor Radchenko <yantar92 <at> posteo.net>
Subject: 30.1; emacsclient.desktop: x-scheme-handler/org-protocol is
 inconsistent with %F
Date: Mon, 21 Jul 2025 10:41:28 +0200
emacsclient.desktop advertises x-scheme-handler/org-protocol as a
supported MIME types, but uses the %F field code (i.e. a list of files)
in its Exec key.

According to the Desktop Entry Specification, a non-file MIME type like
x-scheme-handler/* must not be paired with %F but with %U.

KDE warns about this at runtime (e.g. when trying to open a file in its
Dolphin file manager):

kf.kio.core: "/usr/share/applications/emacsclient.desktop" contains supported protocols but doesn't use %u or %U in its Exec line! This is inconsistent.


Unfortunately, I don't see a good way to fix this. Replacing %F with %U
might work for some applications, but the spec says about the %U field
code: "Local files may either be passed as file: URLs or as file path.",
and passing file:// to emacsclient won't generally work.

I've also tried adding both %F and %U but it is not valid either:

$ desktop-file-validate emacsclient.desktop 
emacsclient.desktop: error: value "sh -c "if [ -n \\"\\$*\\" ]; then exec emacsclient --alternate-editor= --display=\\"\\$DISPLAY\\" \\"\\$@\\"; else exec emacsclient --alternate-editor= --create-frame; fi" sh %F %U" for key "Exec" in group "Desktop Entry" may contain at most one "%f", "%u", "%F" or "%U" field code




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#79068; Package emacs. (Mon, 21 Jul 2025 12:31:06 GMT) Full text and rfc822 format available.

Message #8 received at 79068 <at> debbugs.gnu.org (full text, mbox):

From: Ulrich Müller <ulm <at> gentoo.org>
To: 79068 <at> debbugs.gnu.org
Cc: Ihor Radchenko <yantar92 <at> posteo.net>
Subject: Re: 30.1; emacsclient.desktop: x-scheme-handler/org-protocol is
 inconsistent with %F
Date: Mon, 21 Jul 2025 14:29:58 +0200
A possible solution would be to drop x-scheme-handler/org-protocol
from emacsclient.desktop, and split it off into its own desktop file:

---------- 8< ----------
[Desktop Entry]
Type=Application
Name=emacsclient (org-protocol)
NoDisplay=true
Comment=Tell a running Emacs to handle an org-protocol link
Icon=emacs
Exec=emacsclient %U
Terminal=false
MimeType=x-scheme-handler/org-protocol;
---------- >8 ----------

However, adding yet another desktop file looks like overkill.
(And considering Eli's reply in bug #79066 it won't be a viable option.)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#79068; Package emacs. (Mon, 21 Jul 2025 19:35:01 GMT) Full text and rfc822 format available.

Message #11 received at 79068 <at> debbugs.gnu.org (full text, mbox):

From: Ihor Radchenko <yantar92 <at> posteo.net>
To: Ulrich Müller <ulm <at> gentoo.org>
Cc: 79068 <at> debbugs.gnu.org
Subject: Re: 30.1; emacsclient.desktop: x-scheme-handler/org-protocol is
 inconsistent with %F
Date: Mon, 21 Jul 2025 19:34:31 +0000
Ulrich Müller <ulm <at> gentoo.org> writes:

> A possible solution would be to drop x-scheme-handler/org-protocol
> from emacsclient.desktop, and split it off into its own desktop file:
> ...
>
> However, adding yet another desktop file looks like overkill.
> (And considering Eli's reply in bug #79066 it won't be a viable option.)

Also see bug#74467.

-- 
Ihor Radchenko // yantar92,
Org mode maintainer,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>




Merged 74467 79068. Request was from Ulrich Müller <ulm <at> gentoo.org> to control <at> debbugs.gnu.org. (Mon, 21 Jul 2025 19:57:02 GMT) Full text and rfc822 format available.

This bug report was last modified 5 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.