From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [BUG] error with org-refile and ido-completion-help Date: Tue, 31 May 2016 21:44:15 +0200 Message-ID: <87shwyko6o.fsf@saiph.selenimh> References: <87eg8jb4wy.fsf@fastmail.fm> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33981) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b7paW-0007bl-Ia for emacs-orgmode@gnu.org; Tue, 31 May 2016 15:44:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b7paV-0000Yf-DF for emacs-orgmode@gnu.org; Tue, 31 May 2016 15:44:28 -0400 Received: from relay4-d.mail.gandi.net ([2001:4b98:c:538::196]:41511) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b7paV-0000YM-6X for emacs-orgmode@gnu.org; Tue, 31 May 2016 15:44:27 -0400 In-Reply-To: <87eg8jb4wy.fsf@fastmail.fm> (Matt Lundin's message of "Mon, 30 May 2016 16:40:45 -0500") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Matt Lundin Cc: Org Mode Hello, Matt Lundin 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 > | 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