From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anders Johansson Subject: Re: Bug? org-set-tags never uses ido Date: Tue, 04 Mar 2014 23:22:58 +0100 Message-ID: <53165242.2060704@gmail.com> References: <527287AB.10707@gmail.com> <87d2mknbwh.fsf@ericabrahamsen.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53866) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WKxjz-0000AB-BN for emacs-orgmode@gnu.org; Tue, 04 Mar 2014 17:23:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WKxjs-0007PW-0F for emacs-orgmode@gnu.org; Tue, 04 Mar 2014 17:23:11 -0500 Received: from velox.its.uu.se ([130.238.7.74]:46049) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WKxjr-0007PI-Ly for emacs-orgmode@gnu.org; Tue, 04 Mar 2014 17:23:03 -0500 In-Reply-To: <87d2mknbwh.fsf@ericabrahamsen.net> 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Eric Abrahamsen , emacs-orgmode@gnu.org Looking at this again I realize that the reason for this behavior is that we want completion of possibly several tags. This is what the "org-tags-completion-function" does when supplied as the second argument of "completing-read". As "ido-completing-read" and "org-iswitchb-completing-read" doesn't support this, they are not used. I don't know if there would be a way of getting both ido and multiple input. As it is now though, it's pretty meaningless to have that call to org-icompleting-read there as it never gets activated. It could as well be: (completing-read "Tags: " 'org-tags-completion-function nil nil current 'org-tags-history))))) Cheers, Anders Johansson 2013-11-01 02:33, Eric Abrahamsen skrev: > Anders Johansson writes: > >> Greetings, >> I want to use ido everywhere and wanted to know why this doesn't seem >> to work for setting org-mode tags (it never has for me). >> >> Using edebug to step through the call to org-icompleting-read which >> org-set-tags does I can see that it never gets to using ido since the >> last condition below is false: >> org.el:10147-10150 (package repository version 20131028): >> (if (and org-completion-use-ido >> (fboundp 'ido-completing-read) >> (boundp 'ido-mode) ido-mode >> (listp (second args))) >> >> This is not strange, since org-icompleting-read is called like this in >> org-set-tags: >> >> org.el:14519-14521 >> (org-icompleting-read "Tags: " >> 'org-tags-completion-function >> nil nil current 'org-tags-history)))))) > Hmm, shouldn't that 'org-tags-completion-function be replaced with > org-last-tags-completion-table? A quick test shows that works, and from > glancing at the code it seems like org-last-tags-completion-table should > hold the proper assortment of tags... > > E > >> ido apparently needs a list of possible completions, not a single symbol. >> >> I don't understand much more of this really. >> Is it a bug? Have I misunderstood something? >> >> Greetings, >> Anders Johansson >