From: David Bremner Date: Sun, 26 Jan 2014 01:20:26 +0000 (+2000) Subject: Re: [PATCH] emacs: initialize ido mode in notmuch-mua.el X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=39d17127cda8af62a0021479169cc96c89e436f1;p=notmuch-archives.git Re: [PATCH] emacs: initialize ido mode in notmuch-mua.el --- diff --git a/1e/38f8fb3cb8f73655857f966cdf314052524b6e b/1e/38f8fb3cb8f73655857f966cdf314052524b6e new file mode 100644 index 000000000..fca082f82 --- /dev/null +++ b/1e/38f8fb3cb8f73655857f966cdf314052524b6e @@ -0,0 +1,92 @@ +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 3482B431FBD + for ; Sat, 25 Jan 2014 17:20:41 -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 QqjlILesnT9T for ; + Sat, 25 Jan 2014 17:20:35 -0800 (PST) +Received: from yantan.tethera.net (yantan.tethera.net [199.188.72.155]) + (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id B6E15431FBC + for ; Sat, 25 Jan 2014 17:20:35 -0800 (PST) +Received: from remotemail by yantan.tethera.net with local (Exim 4.80) + (envelope-from ) + id 1W7EOk-0005Lw-0J; Sat, 25 Jan 2014 21:20:30 -0400 +Received: (nullmailer pid 29273 invoked by uid 1000); Sun, 26 Jan 2014 + 01:20:26 -0000 +From: David Bremner +To: Tomi Ollila , Mark Walters + , notmuch@notmuchmail.org +Subject: Re: [PATCH] emacs: initialize ido mode in notmuch-mua.el +In-Reply-To: +References: <87y5sipcjn.fsf@qmul.ac.uk> + <1329900529-16295-1-git-send-email-markwalters1009@gmail.com> + <87bnyzoqq9.fsf@zancas.localnet> +User-Agent: Notmuch/0.17+42~gb867564 (http://notmuchmail.org) Emacs/24.3.1 + (x86_64-pc-linux-gnu) +Date: Sat, 25 Jan 2014 21:20:26 -0400 +Message-ID: <87y523mtd1.fsf@zancas.localnet> +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: Sun, 26 Jan 2014 01:20:41 -0000 + +Tomi Ollila 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