Pārlūkot izejas kodu

Move point when inserting link to other Org mode item

This is the natural flow, as usually one continues writing after the link, not
before it.
master
Daniel pirms 7 mēnešiem
vecāks
revīzija
1916eb6736
Šim parakstam datu bāzē netika atrasta zināma atslēga GPG atslēgas ID: 1C7071A75BB72D64
  1. 7
      site-lisp/db-org.el

7
site-lisp/db-org.el

@ -734,10 +734,9 @@ 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)))
(save-mark-and-excursion
(org-with-point-at pom
(org-store-link nil t))
(insert (apply #'format "[[%s][%s]]" (cl-first org-stored-links))))))
(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.

Notiek ielāde…
Atcelt
Saglabāt