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

From: Björn Bidar <[email-masked]>
Date: Sun, 05 Jan 2025 20:20:40 +0200

Eli Zaretskii <[email-masked]> writes:

>> From: Björn Bidar <[email-masked]>
>> Cc: [email-masked],  [email-masked],  [email-masked]
>> Date: Sun, 05 Jan 2025 00:07:37 +0200
>> 
>> Eli Zaretskii <[email-masked]> writes:
>> 
>> >> >> > 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?
>> >
>> > Isn't that what we already do when we visit files given by file://
>> > URI?
>> 
>> No not for file argument when Emacs stars or in emacsclient. We append
>> /: and then call find_file_handler.
>
> I didn't mean this works OOTB.  Some changes are surely needed.  Ihor
> seemed to say that if this can be supported, there could be an
> alternative patch for fixing this issue, and I'd like to see that
> alternative patch to decide which one is simpler and/or more elegant.

I know you meant that. My point was to describe what is the problem.
I wanted to understand what's going on as I don't know so much about the
code which is below the Lisp code and how it interacts with the C-code.

Do I understand correctly that when Emacs starts it tries to find the
file-handler in C but the call to the handler is done in Lisp code?

It is very interesting to learn how Emacs works on this level,
especially when going down into (X)Emacs past. Anyways that is another
topic.