branch: master commit 9470e76e1af2f9a600f715eb99d84e8c8645fd7a Author: Oleh Krehel <ohwoeo...@gmail.com> Commit: Oleh Krehel <ohwoeo...@gmail.com>
Avoid sorting org refile candidates * ivy.el (ivy-read): Update. --- ivy.el | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ivy.el b/ivy.el index 55a6152..97cdb41 100644 --- a/ivy.el +++ b/ivy.el @@ -465,9 +465,10 @@ When SORT is t, refer to `ivy-sort-functions-alist' for sorting." (when (and (setq sort-fn (cdr sort-fn)) (not (eq collection 'read-file-name-internal))) (setq coll (cl-sort coll sort-fn))) - (if (and (setq sort-fn (cdr (assoc t ivy-sort-functions-alist))) - (<= (length coll) ivy-sort-max-size)) - (setq coll (cl-sort (copy-sequence coll) sort-fn))))) + (unless (eq history 'org-refile-history) + (if (and (setq sort-fn (cdr (assoc t ivy-sort-functions-alist))) + (<= (length coll) ivy-sort-max-size)) + (setq coll (cl-sort (copy-sequence coll) sort-fn)))))) (when preselect (unless (or require-match (member preselect coll))