(feat): use org-link-display-format in org-roam-insert (#1356)

So that, like org-store-link, the computed description does not
contain the links that were captured.
This commit is contained in:
Samuel Loury
2020-12-25 06:43:41 +01:00
committed by GitHub
parent 48e195dd82
commit 65c0f0dc8c

View File

@ -1623,7 +1623,7 @@ If DESCRIPTION is provided, use this as the link label. See
(_ (when (region-active-p)
(setq beg (set-marker (make-marker) (region-beginning)))
(setq end (set-marker (make-marker) (region-end)))
(setq region-text (buffer-substring-no-properties beg end))))
(setq region-text (org-link-display-format (buffer-substring-no-properties beg end)))))
(completions (--> (or completions
(org-roam--get-title-path-completions))
(if filter-fn