(feat): cache all link-types (#1009)

Co-authored-by: Jethro Kuan <jethrokuan95@gmail.com>
This commit is contained in:
odomanov
2020-08-10 14:59:02 +07:00
committed by GitHub
parent 9753ee451f
commit 0318983cac
3 changed files with 65 additions and 61 deletions

View File

@ -340,11 +340,12 @@ the capture)."
(when region
(delete-region (car region) (cdr region)))
(let ((path (org-roam-capture--get :file-path))
(type (org-roam-capture--get :link-type))
(desc (org-roam-capture--get :link-description)))
(if (eq (point) (marker-position mkr))
(insert (org-roam--format-link path desc))
(insert (org-roam--format-link path desc type))
(org-with-point-at mkr
(insert (org-roam--format-link path desc))))))))))
(insert (org-roam--format-link path desc type))))))))))
(when region
(set-marker beg nil)
(set-marker end nil))