From: Maxim Nikulin <email@example.com>
Subject: Re: Adding a goto-heading protocol to org-protocol
Date: Fri, 25 Jun 2021 21:55:57 +0700 [thread overview]
Message-ID: <firstname.lastname@example.org> (raw)
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.
> (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.
prev parent 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]
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 \
* 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).