emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Maxim Nikulin <manikulin@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: Adding a goto-heading protocol to org-protocol
Date: Fri, 25 Jun 2021 21:55:57 +0700	[thread overview]
Message-ID: <sb4qpv$9m2$1@ciao.gmane.io> (raw)
In-Reply-To: <CADbSrJzXiAmsQfSfHaY=VOZEZAxQqE4XJnESVVsbcKUtijwfmA@mail.gmail.com>

On 23/06/2021 13:34, Allen Li wrote:
> The idea is to add a new protocol that looks like 
> "org-protocol://goto-heading?id=UUID-HERE" that jumps to the specified 
> Org heading in Emacs.  The implementation is really simple:

It may be convenient in some cases. I prefer custom_id properties 
however since it provides some hint what is the link target. I am 
unsure, but maybe if you post complete recipe for customization and a 
bit more verbose description of use cases, more people will try it and 
will suggest possible improvements. In my opinion, currently conscious 
choices require more effort that actual code.

> ;;;###autoload
> (defun goto-heading (arg)
>    "Org protocol handler for navigating to Org headings.
> ARG is a property list."
>    (org-id-goto (plist-get arg :id))

- It seems `org-id-goto' does not call `org-mark-ring-push' (unlike 
`org-id-open' that is non-interactive). As a result it is impossible tu 
jump back using C-&.
- Should that heading be opened in current window or in other one?
- Likely other variants of specifying targets will be requested soon. Is 
it necessary to support file+custom_id, file+heading text, file+line 
number? If so, files should be filtered somehow to prevent security 
issues when attempt of opening of specific file (executable, image, 
etc.) can cause unexpected actions.
- Maybe even subprotocol name is not the best one.

      reply	other threads:[~2021-06-25 14:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-23  6:34 Adding a goto-heading protocol to org-protocol Allen Li
2021-06-25 14:55 ` Maxim 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:

  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='sb4qpv$9m2$1@ciao.gmane.io' \
    --to=manikulin@gmail.com \
    --cc=emacs-orgmode@gnu.org \


* 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


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).