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

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

Date: Sat, 25 Jan 2014 21:20:26 -0400

To: Tomi Ollila, Mark Walters, notmuch@notmuchmail.org

Cc:

From: David Bremner


Tomi Ollila <tomi.ollila@iki.fi> writes:

>
> 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)

It's fixed in 23.4

>
> (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)))

Advice always seems over complex to me, but maybe I'm just
prejudiced/ignorant.

Can you decode/reverse-engineer the fix in 

    http://permalink.gmane.org/gmane.emacs.bugs/41957

?

Maybe the advice or whatever should call 

   (ido-init-completion-maps)
   (add-hook 'minibuffer-setup-hook 'ido-minibuffer-setup)
   (add-hook 'choose-completion-string-functions
      'ido-choose-completion-string))

Although that looks worryingly permanent.



d

Thread: