mirror of
https://github.com/org-roam/org-roam
synced 2025-08-01 12:17:21 -05:00
fix(org-roam-db-map-links): goto-char added to point-min (#1969)
* fix(org-roam-db-map-links): goto-char added to point-min * fix(org-roam-db-map-links): unnecessary point move removed There's no need to move the point to the beginning of the buffer to get the context of the link at point. See minimal working example below. ,---- | (with-temp-buffer | (org-mode) | (insert "[[a]]") | (goto-char (point-min)) | (pp (org-element-context))) `---- ,---- | (link | (:type "fuzzy" :path "a" :format bracket :raw-link "a" :application nil :search-option nil :begin 1 :end 6 :contents-begin nil :contents-end nil :post-blank 0 :parent | (paragraph | (:begin 1 :end 6 :contents-begin 1 :contents-end 6 :post-blank 0 :post-affiliated 1 :parent nil)))) `---- ,---- | (with-temp-buffer | (org-mode) | (insert "[[a]]") | (pp (org-element-context))) `---- ,---- | (link | (:type "fuzzy" :path "a" :format bracket :raw-link "a" :application nil :search-option nil :begin 1 :end 6 :contents-begin nil :contents-end nil :post-blank 0 :parent | (paragraph | (:begin 1 :end 6 :contents-begin 1 :contents-end 6 :post-blank 0 :post-affiliated 1 :parent nil)))) `----
This commit is contained in:
@ -375,7 +375,6 @@ If UPDATE-P is non-nil, first remove the file in the database."
|
||||
(with-temp-buffer
|
||||
(delay-mode-hooks (org-mode))
|
||||
(insert link)
|
||||
(point-min)
|
||||
(setq link (org-element-context)))))
|
||||
(when link
|
||||
(dolist (fn fns)
|
||||
|
Reference in New Issue
Block a user