[PATCH] emacs: initialize ido mode in notmuch-mua.el

Tomi Ollila tomi.ollila at iki.fi
Sat Jan 25 13:27:38 PST 2014


On Sat, Jan 25 2014, David Bremner <david at tethera.net> wrote:

> Mark Walters <markwalters1009 at gmail.com> writes:
>
>> ido-completing-read is used in notmuch-mua.el without any
>> initialization.  This should work but a bug (emacs bug #3247) in some
>> emacs 23 versions (including 23.2.1 from Debian stable) causes emacs
>> to get stuck in the mini-buffer. This tests to see if ido-mode has
>> been initialized and if not calls it. This avoids the bug for these
>> older versions of emacs.
>>
>> This is the only place that ido-completing-read is used so an alternative 
>> would be to replace ido-completing-read by completing-read but cworth 
>> expressed a preference for the ido version in 
>> id:"87wrhfvk6a.fsf at yoom.home.cworth.
>
> This patch was tagged wip, but then there was no progress ;).  It still
> applies cleanly, and doesn't seem to do any harm in emacs 23.4 nor
> emacs24.3. I don't have 23.2 at hand but I guess Tomi or Mark can
> confirm it actually fixes the bug there.
>
> I propose we either apply the patch or ::wontfix the bug.

How about doing it with defadvice with something like:

(from http://comments.gmane.org/gmane.emacs.bugs/27856 one can notice
this happening with emacs 23.3 -- David can check whether 23.4 if
affected)

(if (and (= emacs-major-version 23) (< emacs-minor-version 4))
  (defadvice ido-completing-read (before notmuch-ido-mode-init activate)
      (unless (ido-mode) (ido-mode t))
      (ad-disable-advice 'ido-completing-read 'before 'notmuch-ido-mode-init)))

>
> cheers,
>
> d


Tomi


More information about the notmuch mailing list