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 <clivet...@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: yanta...@gmail.com, ihor_radche...@alumni.sutd.edu.sg

Reply via email to