emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* How to occasionally store link as file.org+headline
@ 2020-02-14 16:48 Mirko Vukovic
  2020-02-19  0:28 ` Matthew Lundin
  0 siblings, 1 reply; 2+ messages in thread
From: Mirko Vukovic @ 2020-02-14 16:48 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 683 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 1077 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-02-19  0:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-14 16:48 How to occasionally store link as file.org+headline Mirko Vukovic
2020-02-19  0:28 ` Matthew Lundin

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).