branch: externals/org commit bfe39626452b35d44e3d84f0c67d8c27f8e53f45 Author: Dan Milstein <milstein....@gmail.com> Commit: Ihor Radchenko <yanta...@posteo.net>
lisp/org-refile.el: Replace links with their descriptions consistently * lisp/org-refile.el (org-refile-get-targets): Replace links with their descriptions in refile targets when `org-refile-use-outline-path' is nil. This is to make things consistent with how the targets are displayed when the variable is non-nil. If an org refile target was a link, the refile interface would show all of: the link, the description and the surrounding brackets. That was quite difficult to read in the compressed space of the minibuffer. This change replaces the full link with just the description, which is easier to read. A similar change was discussed on the mailing list in 2008, and apparently accepted -- but somehow lost from the refile code: Link: https://list.orgmode.org/6cb4f483-0332-4f40-9cdf-99c90a9bd...@uva.nl/ TINYCHANGE --- lisp/org-refile.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/org-refile.el b/lisp/org-refile.el index e15ba41349..5caed50a63 100644 --- a/lisp/org-refile.el +++ b/lisp/org-refile.el @@ -372,7 +372,8 @@ When `org-refile-use-cache' is nil, just return POS." (let ((re (format org-complex-heading-regexp-format (regexp-quote heading))) (target - (if (not org-refile-use-outline-path) heading + (if (not org-refile-use-outline-path) + (org-link-display-format heading) (mapconcat #'identity (append