From: Leo Ufimtsev <lufimtse@redhat.com>
To: Christoph LANGE <math.semantic.web@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Function that jumps to an entry with a certain CUSTOM_ID
Date: Mon, 6 Apr 2015 14:16:49 -0400 (EDT) [thread overview]
Message-ID: <1318130309.8160498.1428344209549.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <551ACD1D.6020501@gmail.com>
+1
* Non-technical feedback ::
- Thank you so much for sharing. I've been looking for something like this for a while.
- I hope it'll make it into org-mode some way or another, it seems like a valuable addition.
- imho the HELM integration is essential.
Leo Ufimtsev | Software Engineer @ Eclipse Team
----- Original Message -----
From: "Christoph LANGE" <math.semantic.web@gmail.com>
To: emacs-orgmode@gnu.org
Sent: Tuesday, March 31, 2015 12:36:45 PM
Subject: [O] Function that jumps to an entry with a certain CUSTOM_ID
Hi all,
the following function has served me well for a few years, so I thought
I'd share it. I would even be happy to contribute it to the codebase of
org-mode (core or contrib); however in this case someone would have to
point me to a fool-proof guide for how to do this. I know that for
contributing code I will have to sign some FSF copyright forms, and I
know how to use git, but I don't know the exact org-mode specific steps
of doing so.
--- %< --- %< --- %< --- %< --- %< --- %< --- %< --- %< --- %< --- %< ---
(defun org-jump-to-id ()
"Asks for an identifier and searches for the first entry in the
current file that has this identifier as a CUSTOM_ID property."
(interactive)
(let* ((property "CUSTOM_ID")
(custom-id (org-icompleting-read "CUSTOM_ID of entry: "
(mapcar 'list
(org-property-values property)))))
(org-link-search (concat "#" custom-id))))
(define-key org-mode-map (kbd "\C-cj") 'org-jump-to-id)
--- %< --- %< --- %< --- %< --- %< --- %< --- %< --- %< --- %< --- %< ---
This implementation works efficiently in a 4 MB org file with 100 IDs.
Together with ido or helm I find it a very user-friendly way of jumping
to frequently used headlines.
I noticed that org-babel-ref-goto-headline-id does something similar, so
maybe some code could be shared among the two functions.
Cheers,
Christoph
--
Dr. Christoph Lange, Enterprise Information Systems Department
Applied Computer Science @ University of Bonn; Fraunhofer IAIS
http://langec.wordpress.com/about, Skype duke4701
→ Semantic Publishing Challenge: Assessing the Quality of Scientific Output
ESWC, 31 May–4 June 2014, Portorož, Slovenia.
https://tinyurl.com/SPChallenge15
Submission deadline 27 March (abstracts: 20 March)
prev parent reply other threads:[~2015-04-06 18:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-31 16:36 Function that jumps to an entry with a certain CUSTOM_ID Christoph LANGE
2015-03-31 19:55 ` Nicolas Goaziou
2015-03-31 20:59 ` Christoph Lange
2015-04-01 20:21 ` Nicolas Goaziou
2015-04-06 18:16 ` Leo Ufimtsev [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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1318130309.8160498.1428344209549.JavaMail.zimbra@redhat.com \
--to=lufimtse@redhat.com \
--cc=emacs-orgmode@gnu.org \
--cc=math.semantic.web@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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.