Compare commits

..

2 Commits

Author SHA1 Message Date
4428db4f82
Apply minor cosmetics 2022-03-30 08:44:15 +02:00
cfc11ec807
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.
2022-03-30 08:42:06 +02:00
2 changed files with 12 additions and 4 deletions

View File

@ -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
@ -908,7 +909,7 @@
(org-link-set-parameters "onenote" :follow #'db/org-onenote-open)
(org-link-set-parameters "outlook" :follow #'db/org-outlook-open))
;; Skip some org mode regions to be skipped by ispell
;; Mark some org mode regions to be skipped by ispell
(add-hook 'org-mode-hook #'endless/org-ispell)
;; Link type for RFCs
@ -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

View File

@ -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