From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mirko Vukovic Subject: How to occasionally store link as file.org+headline Date: Fri, 14 Feb 2020 11:48:35 -0500 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000024f03a059e8bfc56" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:38962) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j2e9T-00009l-1M for emacs-orgmode@gnu.org; Fri, 14 Feb 2020 11:49:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j2e9S-0006sj-0t for emacs-orgmode@gnu.org; Fri, 14 Feb 2020 11:49:14 -0500 Received: from mail-lj1-x22b.google.com ([2a00:1450:4864:20::22b]:33562) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j2e9R-0006qF-MR for emacs-orgmode@gnu.org; Fri, 14 Feb 2020 11:49:13 -0500 Received: by mail-lj1-x22b.google.com with SMTP id y6so11483122lji.0 for ; Fri, 14 Feb 2020 08:49:13 -0800 (PST) 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: emacs-orgmode@gnu.org --00000000000024f03a059e8bfc56 Content-Type: text/plain; charset="UTF-8" Hello, For most of my links, I want to use the ID generated by orgmode i.e., (setq org-id-link-to-org-use-id t) But occasionally, for targets that are not part of my agenda files, I want to store a link of the type file:path.org::*headline I wrote the following function to accomplish that: (defun org-store-file+headline () "Store link as file + headline" (interactive) (let ((org-id-link-to-org-use-id nil)) (org-store-link nil t))) This function works (lightly tested). But is there a built-in way, such as using prefixes or arguments to org-store-link? I browsed the code for it, but that function is several hundred lines long, and I gave up. Thank you, Mirko --00000000000024f03a059e8bfc56 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello,

For most of my links, I want to = use the ID generated by orgmode
i.e., (s= etq org-id-link-to-org-use-id t)

But oc= casionally, for targets that are not part of my agenda files, I want to sto= re a link of the type file:path.org::*headline

I wrote the following function to accomplish t= hat:

(defun org-store-fil= e+headline ()
=C2=A0 "Store link as file + headline"
=C2=A0= (interactive)
=C2=A0 (let ((org-id-link-to-org-use-id nil))
=C2=A0 = =C2=A0 (org-store-link nil t)))


This fu= nction works (lightly tested).

But is there a buil= t-in way, such as using prefixes or arguments to o= rg-store-link? I browsed the code for it, but that function is sever= al hundred lines long, and I gave up.

Thank you,

Mirko

--00000000000024f03a059e8bfc56--