From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ihor Radchenko Subject: Re: Show full outline path when insert link Date: Wed, 25 Mar 2020 00:25:20 +0800 Message-ID: <87blold8jz.fsf@localhost> References: <05F4553B-3252-4AF7-8B15-09437BB6B055@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:48403) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jGmQ9-0005HE-V2 for emacs-orgmode@gnu.org; Tue, 24 Mar 2020 12:28:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jGmQ8-0006yy-Qb for emacs-orgmode@gnu.org; Tue, 24 Mar 2020 12:28:53 -0400 Received: from mail-pj1-x102d.google.com ([2607:f8b0:4864:20::102d]:40479) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jGmQ8-0006yf-LY for emacs-orgmode@gnu.org; Tue, 24 Mar 2020 12:28:52 -0400 Received: by mail-pj1-x102d.google.com with SMTP id kx8so1679602pjb.5 for ; Tue, 24 Mar 2020 09:28:52 -0700 (PDT) In-Reply-To: <05F4553B-3252-4AF7-8B15-09437BB6B055@gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane-mx.org@gnu.org Sender: "Emacs-orgmode" To: Tung Clive , emacs-orgmode@gnu.org 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 writes: > Hi all, > > When I am trying to store a link to an outline like this: > =E2=80=9C > * Headline 1 > ** Headline 2 > Point here. > =E2=80=9C > How can I automatically make it=E2=80=99s description to be =E2=80=9CHead= line 1/Headline 2=E2=80=9D instead of just =E2=80=9CHeadline 2=E2=80=9D? > > Best, > Clive --=20 Ihor Radchenko, PhD, Center for Advancing Materials Performance from the Nanoscale (CAMP-nano) State Key Laboratory for Mechanical Behavior of Materials, Xi'an Jiaotong U= niversity, Xi'an, China Email: yantar92@gmail.com, ihor_radchenko@alumni.sutd.edu.sg