Thanks for the suggested improvement, Victor.

Charles, Max -- any thoughts on this before I edit it in?

"Victor A. Stoichita" <[email protected]> writes:

> The worg page says:
>> On GNU/Linux, Emacs 29.2+ configures emacsclient.desktop to handle Org
>> Protocol URL requests. If your GUI window environment can use this
>> file, no further setup is required. (NOTE: This is not true for some
>> distributions of xdg-tools as reported in the bug #74467 - 31.0.50;
>> org-protocol emacsclient.desktop change is not fully functional - GNU
>> bug report logs.)
>
> It is not clear what "some distributions of xdg-tools means" (and
> I failed to understand it from the bug report as well). I’m on
> Debian stable. 
>
> The worg page does not clearly say what to do in that case. I tried
> applying what was said below regarding Emacs < 30 (create the
> org-protocol.desktop file…), but that didn’t work either (perhaps
> because it has %u not %U ?).
>
> If I may suggest, the paragraph could read: 
>> On GNU/Linux, Emacs 29.2+ configures emacsclient.desktop to handle Org
>> Protocol URL requests. If your GUI window environment can use this
>> file, no further setup is required.
>> However on some distributions of xdg-tools (such as Debian Trixie ?),
>> a manual change in emacsclient.desktop is required. Because of bug
>> #74467 - 31.0.50; "org-protocol emacsclient.desktop change is not
>> fully functional", xdg-open might open an emacsclient frame, without
>> passing it the org-protocol arguments. A workaround for this is to
>> replace %F with %U on the Exec lines of emacsclient.desktop.

Can this sometimes create problems? The original bug report at
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=74467 described this
solution and said it "is not possible, as it allows 'xdg-open' to pass
local files as "file:/" URL's if it wants to." And the problem with
that, as I understand the discussion is that thread, because Emacs
doesn't currently handle "file:/" URLs correctly when passed that way.

I don't see any problem with opening files with emacsclient myself after
testing this, though. It may be that it's not a problem on my system
(Mint). Or that I have not tested correctly (test procedure: editing a
copy of emacsclient.desktop in ~/.local/share/applications, running
update-desktop-database there, and opening a local file with
emacsclient).

Regards,
Christian

Reply via email to