Compare commits

..

No commits in common. "8f4fa01304614faedf4cc0bb589a34435c3d3efd" and "6a590da9cbb26a03e8fc1f650ce3b9f396711716" have entirely different histories.

1 changed files with 7 additions and 5 deletions

View File

@ -734,9 +734,10 @@ Use `org-store-link' to save link to `org-stored-links'."
(unless (derived-mode-p 'org-mode)
(user-error "Not in Org Mode"))
(let ((pom (db/org--get-location arg)))
(org-with-point-at pom
(org-store-link nil t))
(insert (apply #'format "[[%s][%s]]" (cl-first org-stored-links)))))
(save-mark-and-excursion
(org-with-point-at pom
(org-store-link nil t))
(insert (apply #'format "[[%s][%s]]" (cl-first org-stored-links))))))
(defun db/org-add-link-to-current-clock ()
"Insert link to currently clocked-in item at point.
@ -748,8 +749,9 @@ in an Org Mode buffer or when the clock is not active."
(user-error "Not in Org Mode, aborting"))
(unless org-clock-marker
(user-error "No clocked-in task, aborting"))
(org-with-point-at org-clock-marker
(org-store-link nil t))
(save-mark-and-excursion
(org-with-point-at org-clock-marker
(org-store-link nil t)))
(pcase-let ((`(,location ,description) (cl-first org-stored-links)))
(org-insert-link nil location description)))