emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Max Nikulin <manikulin@gmail.com>
To: Kai Ma <justksqsf@gmail.com>, emacs-orgmode@gnu.org
Subject: Re: Find-file using org-protocol
Date: Wed, 15 Mar 2023 21:09:02 +0700	[thread overview]
Message-ID: <b8b81c73-deba-c314-87db-d23b121a557c@gmail.com> (raw)
In-Reply-To: <CFBCD904-3D30-4320-9F79-092C587B4AD0@gmail.com>

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
https://debbugs.gnu.org/57752
#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	other threads:[~2023-03-15 14:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-15  3:41 Find-file using org-protocol Kai Ma
2023-03-15 14:09 ` Max Nikulin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b8b81c73-deba-c314-87db-d23b121a557c@gmail.com \
    --to=manikulin@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=justksqsf@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).