[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Find-file using org-protocol

From: Max Nikulin
Subject: Re: Find-file using org-protocol
Date: Wed, 15 Mar 2023 21:09:02 +0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1

On 15/03/2023 10:41, Kai Ma wrote:

I’m using org-protocol to open local files in an Emacs client.  Yes,
this is weird, but it is required for some Electron apps, because they
do not allow calling arbitrary commands.
It works, but there’s a minor annoyance: the buffer it opens is not
associated with the client.  And killing the client won’t kill the
buffer it creates.

Do you really need org-protocol for this purpose? I would suggest direct call of your function using --eval similar to `message-mailto` in https://git.savannah.gnu.org/cgit/emacs.git/tree/etc/emacsclient-mail.desktop

I admit that it is tricky to safely pass an argument to emacsclient, see
#57752 28.1.91; emacsclient-mail.desktop doesn't work for me.

However instead of long Exec entry in the desktop file I would use a script with *single* %u argument. The reason is a Firefox bug that may cause lost of everything besides the command and the URI.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]