From: Ihor Radchenko <yantar92@gmail.com>
To: Tung Clive <clivetung@gmail.com>, emacs-orgmode@gnu.org
Subject: Re: Show full outline path when insert link
Date: Wed, 25 Mar 2020 00:25:20 +0800 [thread overview]
Message-ID: <87blold8jz.fsf@localhost> (raw)
In-Reply-To: <05F4553B-3252-4AF7-8B15-09437BB6B055@gmail.com>
Something like
(defun org-id-link-desk (link desk)
"Description function for id: link."
(let ((id (cadr (split-string link ":"))))
(org-with-point-at (org-id-find id 'marker)
(s-join "/" (org-get-outline-path 'with-self)))))
(org-link-set-parameters "id"
:desk #'org-id-link-desk)
Best,
Ihor
Tung Clive <clivetung@gmail.com> writes:
> Hi all,
>
> When I am trying to store a link to an outline like this:
> “
> * Headline 1
> ** Headline 2
> Point here.
> “
> How can I automatically make it’s description to be “Headline 1/Headline 2” instead of just “Headline 2”?
>
> Best,
> Clive
--
Ihor Radchenko,
PhD,
Center for Advancing Materials Performance from the Nanoscale (CAMP-nano)
State Key Laboratory for Mechanical Behavior of Materials, Xi'an Jiaotong University, Xi'an, China
Email: yantar92@gmail.com, ihor_radchenko@alumni.sutd.edu.sg
prev parent reply other threads:[~2020-03-24 16:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-24 13:43 Show full outline path when insert link Tung Clive
2020-03-24 16:25 ` Ihor Radchenko [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=87blold8jz.fsf@localhost \
--to=yantar92@gmail.com \
--cc=clivetung@gmail.com \
--cc=emacs-orgmode@gnu.org \
/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).