Subject: Re: bug#74467: 31.0.50; org-protocol emacsclient.desktop change is not fully functional

From: Björn Bidar <[email-masked]>
Date: Thu, 02 Jan 2025 22:02:05 +0200

Eli Zaretskii <[email-masked]> writes:

>> Cc: [email-masked], [email-masked]
>> Date: Mon, 16 Dec 2024 22:01:56 +0200
>> From: Eli Zaretskii <[email-masked]>
>> 
>> > From: Ihor Radchenko <[email-masked]>
>> > Cc: Alexey Lebedeff <[email-masked]>, [email-masked]
>> > Date: Mon, 16 Dec 2024 19:34:01 +0000
>> > 
>> > Eli Zaretskii <[email-masked]> writes:
>> > 
>> > >> One solution would be introducing separate  .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.
>> 
>> Thanks.  Let's see if someone objects.
>> 
>> > Note that an alternative could be handling file:// URIs by Emacs. Your call.
>> 
>> I thought we already did?
>
> Ping!  Since we already know how to handle file:// UTIs, what would
> the solution using that look like?

Would it work to add a file-handler for uris to call?
Further change so that if the file argument does start with '^.*://'  to
not append '/:'.

With these changes Emacs can handle any url forwarded to Emacs. We might
also want signal an error if the uri send to Emacs was not handled by
browse-url.