emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] [BUG] error with org-refile and ido-completion-help


From: Nicolas Goaziou
Subject: Re: [O] [BUG] error with org-refile and ido-completion-help
Date: Tue, 31 May 2016 21:44:15 +0200

Hello,

Matt Lundin <address@hidden> writes:

> When calling org-refile with org-completion-use-ido set to t, pressing
> TAB in ido-mode results in an error. This is because ido-completion-help
> expects a list of strings. However, org-refile sends ido-completing-read
> a list of lists.
>
> To replicate:
>
> 1. /usr/bin/emacs -Q -l ~/.minimal.el
>
> (add-to-list 'load-path "~/org-mode/lisp")
> (add-to-list 'load-path "~/org-mode/contrib/lisp")
> (ido-mode)
> (setq org-completion-use-ido 1)
>
> Go to an org file with headlines:
>
> * One * Two * Three
>
> 2. Call org-refile on the first headline.
>
> 3. Press TAB within the ido minibuffer. (See the backtrace at the bottom
> of this post).
>
> A git bisect revealed that the change was introduced in 2015 with the
> following commit:
>
> ,----
> | commit 50ba0a5ed609f3600f2590f3ba22b8ab3ff3331c
> | Author: Nicolas Goaziou <address@hidden>
> | Date:   Sun Jun 7 00:38:58 2015 +0200
> | 
> |     Fix 1a7364177046b8a57ade0aeb9f52bacfc0b8b088
> |     
> |     * lisp/org.el (org-icompleting-read): Let `completing-read' or
> |       equivalent sort out type of completion.
> |     (org-olpath-completing-read): Revert partially
> |     1a7364177046b8a57ade0aeb9f52bacfc0b8b088.
> `----
>
> It looks like this commit removed some functionality from the now
> obsolete org-icompleting-read that made sure that the items in the
> completion list passed to the completing read function were strings.

Actually, this is a bug in "ido.el", since `ido-completing-read' is not
a drop-in replacement for `completing-read'.  The latter accepts lists
of strings, but also alist, obarrays and hash tables. The former accepts
only list of strings.

I suggest to report the bug to "ido.el" maintainers since they probably
want to preserve compatibility between the completion functions.

Regards,

-- 
Nicolas Goaziou



reply via email to

[Prev in Thread] Current Thread [Next in Thread]