mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2025-01-08 15:35:16 +00:00
org.el (org-refile): Fix C-u 3 C-c C-w
* org.el (org-refile): Fix calling with a numeric prefix argument of 3 to refile and keep.
This commit is contained in:
parent
3a233aa6d9
commit
49da67d351
@ -11520,7 +11520,9 @@ prefix argument (`C-u C-u C-u C-c C-w')."
|
|||||||
(interactive "P")
|
(interactive "P")
|
||||||
(if (member goto '(0 (64)))
|
(if (member goto '(0 (64)))
|
||||||
(org-refile-cache-clear)
|
(org-refile-cache-clear)
|
||||||
(let* ((actionmsg (or msg "Refile"))
|
(let* ((actionmsg (cond (msg msg)
|
||||||
|
((equal goto 3) "Refile (and keep)")
|
||||||
|
(t "Refile")))
|
||||||
(cbuf (current-buffer))
|
(cbuf (current-buffer))
|
||||||
(regionp (org-region-active-p))
|
(regionp (org-region-active-p))
|
||||||
(region-start (and regionp (region-beginning)))
|
(region-start (and regionp (region-beginning)))
|
||||||
@ -11555,13 +11557,13 @@ prefix argument (`C-u C-u C-u C-c C-w')."
|
|||||||
(setq it (or rfloc
|
(setq it (or rfloc
|
||||||
(let (heading-text)
|
(let (heading-text)
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(unless goto
|
(unless (and goto (listp goto))
|
||||||
(org-back-to-heading t)
|
(org-back-to-heading t)
|
||||||
(setq heading-text
|
(setq heading-text
|
||||||
(nth 4 (org-heading-components))))
|
(nth 4 (org-heading-components))))
|
||||||
|
|
||||||
(org-refile-get-location
|
(org-refile-get-location
|
||||||
(cond (goto "Goto")
|
(cond ((and goto (listp goto)) "Goto")
|
||||||
(regionp (concat actionmsg " region to"))
|
(regionp (concat actionmsg " region to"))
|
||||||
(t (concat actionmsg " subtree \""
|
(t (concat actionmsg " subtree \""
|
||||||
heading-text "\" to")))
|
heading-text "\" to")))
|
||||||
|
Loading…
Reference in New Issue
Block a user