Keep Org links after insertion by default
When inserting links multiple times, it's annoying to have to go back to the original place the link points to and reinsert it into the stored link list. Using a universal argument to toggle `org-link-keep-stored-after-insertion` is also not an option, as I keep forgetting to use it. Instead, by default keep all links after insertion. To be able to handle the growing list of links, we now provide a function `db/org-clear-stored-links` to set the list of stored links to the empty list.master
parent
7713f379eb
commit
cfc11ec807
3
init.el
3
init.el
|
@ -744,6 +744,7 @@
|
|||
db/org-onenote-open
|
||||
db/org-outlook-open
|
||||
db/org-rfc-open
|
||||
db/org-clear-stored-links
|
||||
db/org-cleanup-continuous-clocks
|
||||
db/find-csv-in-org
|
||||
db/org-mark-current-default-task
|
||||
|
@ -952,7 +953,7 @@
|
|||
org-dblock-write:org-ql))
|
||||
|
||||
(use-package ol
|
||||
:init (setq org-link-keep-stored-after-insertion nil)
|
||||
:init (setq org-link-keep-stored-after-insertion t)
|
||||
:commands (org-store-link))
|
||||
|
||||
(use-package org-id
|
||||
|
|
|
@ -524,6 +524,13 @@ open RFC in HTML format in the default browser."
|
|||
(warn "`db/rfc-cache-path' not defined or not an absolute writable path, opening RFC in browser.")
|
||||
(browse-url (concat "https://tools.ietf.org/html/rfc" number)))))
|
||||
|
||||
(defun db/org-clear-stored-links ()
|
||||
"Clear list of stored links by setting `org-stored-links' to NIL.
|
||||
This might be handy when links are kept by setting
|
||||
`org-link-keep-stored-after-insertion' to T, but too many links
|
||||
have accumulated over time."
|
||||
(interactive)
|
||||
(setq org-stored-links nil))
|
||||
|
||||
|
||||
;;; Org Utilities
|
||||
|
|
Loading…
Reference in New Issue