1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-11-25 07:27:57 +00:00

lisp/org-refile.el (org-refile-get-location): Small refactoring

* lisp/org-refile.el (org-refile-get-location): Small refactoring.
This commit is contained in:
Bastien 2020-02-13 11:44:10 +01:00
parent 855f5fda76
commit 937ac9b777

View File

@ -782,18 +782,14 @@ this function appends the default value from
(setq old-hist org-refile-history)
(setq answ (funcall cfunc prompt tbl nil (not new-nodes)
nil 'org-refile-history
(or cdef (concat (car org-refile-history)
(when (and org-refile-use-outline-path)
"/")))))
(or cdef (concat (car org-refile-history) extra))))
(if (setq pa (org-refile--get-location answ tbl))
(let* ((last-refile-loc (car org-refile-history))
(last-refile-loc-path
(concat last-refile-loc
(when (and org-refile-use-outline-path) "/"))))
(last-refile-loc-path (concat last-refile-loc extra)))
(org-refile-check-position pa)
(when (or (not org-refile-history)
(not (eq old-hist org-refile-history))
(not (equal (car pa) last-refile-loc)))
(not (equal (car pa) last-refile-loc-path)))
(setq org-refile-history
(cons (car pa) (if (assoc last-refile-loc tbl)
org-refile-history