mirror of
https://github.com/org-roam/org-roam
synced 2025-08-03 12:27:23 -05:00
(fix):org-roam-refile: Don't try to refile a node into itself (#1928)
This commit is contained in:
@ -827,6 +827,8 @@ If region is active, then use it instead of the node at point."
|
|||||||
(nbuf (or (find-buffer-visiting file)
|
(nbuf (or (find-buffer-visiting file)
|
||||||
(find-file-noselect file)))
|
(find-file-noselect file)))
|
||||||
level reversed)
|
level reversed)
|
||||||
|
(if (equal (org-roam-node-at-point) node)
|
||||||
|
(user-error "Target is the same as current node")
|
||||||
(if regionp
|
(if regionp
|
||||||
(progn
|
(progn
|
||||||
(org-kill-new (buffer-substring region-start region-end))
|
(org-kill-new (buffer-substring region-start region-end))
|
||||||
@ -868,7 +870,7 @@ If region is active, then use it instead of the node at point."
|
|||||||
(when (and org-capture-mode
|
(when (and org-capture-mode
|
||||||
(buffer-base-buffer (current-buffer)))
|
(buffer-base-buffer (current-buffer)))
|
||||||
(org-capture-kill))
|
(org-capture-kill))
|
||||||
(kill-buffer (current-buffer)))))
|
(kill-buffer (current-buffer))))))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun org-roam-extract-subtree ()
|
(defun org-roam-extract-subtree ()
|
||||||
|
Reference in New Issue
Block a user