From d7599e3f275c096cd7335c92fd6da942be97a0e9 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Mon, 22 May 2017 08:24:56 +0200 Subject: [PATCH] Preserve targets order according to rules * lisp/org.el (org-refile-get-targets): Keep targets grouped according to `org-refile-targets' value. --- lisp/org.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/org.el b/lisp/org.el index b61b47c82..8cd8cc8ba 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -11825,7 +11825,7 @@ order.") (org-refile-cache-put tgs (buffer-file-name) descre)) (setq targets (append tgs targets)))))) (message "Getting targets...done") - (nreverse (delete-dups targets)))) + (delete-dups (nreverse targets)))) (defun org-protect-slash (s) (replace-regexp-in-string "/" "\\/" s nil t))