Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 23740431FBD for ; Sat, 25 Jan 2014 13:27:56 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id oxzFRsY9auLy for ; Sat, 25 Jan 2014 13:27:48 -0800 (PST) Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) by olra.theworths.org (Postfix) with ESMTP id 8C61E431FBC for ; Sat, 25 Jan 2014 13:27:48 -0800 (PST) Received: from guru.guru-group.fi (localhost [IPv6:::1]) by guru.guru-group.fi (Postfix) with ESMTP id 109801000B3; Sat, 25 Jan 2014 23:27:39 +0200 (EET) From: Tomi Ollila To: David Bremner , Mark Walters , notmuch@notmuchmail.org Subject: Re: [PATCH] emacs: initialize ido mode in notmuch-mua.el In-Reply-To: <87bnyzoqq9.fsf@zancas.localnet> References: <87y5sipcjn.fsf@qmul.ac.uk> <1329900529-16295-1-git-send-email-markwalters1009@gmail.com> <87bnyzoqq9.fsf@zancas.localnet> User-Agent: Notmuch/0.17+41~g8e7fabf (http://notmuchmail.org) Emacs/24.3.1 (x86_64-unknown-linux-gnu) X-Face: HhBM'cA~ MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Jan 2014 21:27:56 -0000 On Sat, Jan 25 2014, David Bremner wrote: > Mark Walters 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@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