GNU bug report logs - #74467
31.0.50; org-protocol emacsclient.desktop change is not fully functional

Previous Next

Package: emacs;

Reported by: Alexey Lebedeff <binarin <at> binarin.info>

Date: Fri, 22 Nov 2024 03:57:02 UTC

Severity: normal

Merged with 79068

Found in versions 30.1, 31.0.50

Full log


View this message in rfc822 format

From: Ulrich Müller <ulm <at> gentoo.org>
To: Ihor Radchenko <yantar92 <at> posteo.net>
Cc: 74467 <at> debbugs.gnu.org
Subject: bug#74467: 30.1; emacsclient.desktop: x-scheme-handler/org-protocol is inconsistent with %F
Date: Tue, 22 Jul 2025 10:24:46 +0200
>>>>> On Mon, 21 Jul 2025, Ihor Radchenko wrote:

> 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.

Sorry for the duplicate bug. Continuing in #74467.

Looking at the last comments:

>> I'm not sure I understand the proposal.  One problem with having the
>> uri handler active at all times is that it subtly changes how local
>> files whose names just happen to start with "http://" (rare, but
>> still legitimate) are handled.

> My proposal is to add the url-file-handler as ur-file-handler by
> default and change url-handler-mode to add the url's to the URI
> handler. That would make so that file URI's a handled always and the
> existing behavior of url-handler-mode is kept.

> Have encountered files starting with a URI prefix such as http?
> I haven't had that so far. I workaround would be to always first check
> if a file with such a prefix exist in the url-file-handler before
> trying to process the URL/URI.

Such heuristic methods tend to be brittle. IMHO it would be much cleaner
if emacsclient continued to interpret its arguments as plain filenames
by default.

Instead, add an option --uri that would interpret them as URIs in a
well-defined manner. This could then be used in the desktop file
together with the %U field code.

Alternatively (or in addition), emacsclient could have a more general
option like --desktop-file that would do the right thing in that
context:
- process arguments as URIs
- when called without arguments, create a new frame (instead of
  signalling an error)

There's also no good reason for that horrible shell wrapper in the
desktop file; it should just do
"Exec=emacsclient [options]... desktop-file %U"
and leave the rest to emacsclient itself.




This bug report was last modified 59 days ago.

Previous Next


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