emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Matt Lundin <mdl@imapmail.org>
Cc: Org Mode <emacs-orgmode@gnu.org>
Subject: Re: [BUG] error with org-refile and ido-completion-help
Date: Tue, 31 May 2016 21:44:15 +0200	[thread overview]
Message-ID: <87shwyko6o.fsf@saiph.selenimh> (raw)
In-Reply-To: <87eg8jb4wy.fsf@fastmail.fm> (Matt Lundin's message of "Mon, 30 May 2016 16:40:45 -0500")

Hello,

Matt Lundin <mdl@imapmail.org> 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 <mail@nicolasgoaziou.fr>
> | 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	other threads:[~2016-05-31 19:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-30 21:40 [BUG] error with org-refile and ido-completion-help Matt Lundin
2016-05-31 19:44 ` Nicolas Goaziou [this message]
2016-05-31 21:49   ` Matt Lundin
2016-06-01 17:08     ` Matt Lundin
2016-06-01 17:32       ` Nicolas Goaziou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87shwyko6o.fsf@saiph.selenimh \
    --to=mail@nicolasgoaziou.fr \
    --cc=emacs-orgmode@gnu.org \
    --cc=mdl@imapmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).