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 174FB431FB6 for ; Wed, 22 Feb 2012 00:47:50 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0.201 X-Spam-Level: X-Spam-Status: No, score=0.201 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] 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 mWa3zlmXZu3i for ; Wed, 22 Feb 2012 00:47:49 -0800 (PST) Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com [209.85.212.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 5C7A5431FAE for ; Wed, 22 Feb 2012 00:47:49 -0800 (PST) Received: by wibhi8 with SMTP id hi8so4863183wib.26 for ; Wed, 22 Feb 2012 00:47:48 -0800 (PST) Received-SPF: pass (google.com: domain of markwalters1009@gmail.com designates 10.216.139.147 as permitted sender) client-ip=10.216.139.147; Authentication-Results: mr.google.com; spf=pass (google.com: domain of markwalters1009@gmail.com designates 10.216.139.147 as permitted sender) smtp.mail=markwalters1009@gmail.com; dkim=pass header.i=markwalters1009@gmail.com Received: from mr.google.com ([10.216.139.147]) by 10.216.139.147 with SMTP id c19mr8700195wej.11.1329900468054 (num_hops = 1); Wed, 22 Feb 2012 00:47:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=lwAHsnS6wOXMaLbCgs+BGP+Snl8mcyVBK/MB1Cc/zU4=; b=niJTtOZaTy9uV4acg6WJn4ZdcGrpfmjvnTrv2QcMMR2oNRXqpj/It0TKcwWH3dJZq6 LCInFTKeu8N2dbEmWUugsqg36tjvgaUy9tcF8ELwStr9MR1uY7jUvNNuuoea0wO6aqtU UGEHaxyXpohbRObjhrSFibPF6wbTmVoi71V/s= Received: by 10.216.139.147 with SMTP id c19mr7215622wej.11.1329900468005; Wed, 22 Feb 2012 00:47:48 -0800 (PST) Received: from localhost (94-192-233-223.zone6.bethere.co.uk. [94.192.233.223]) by mx.google.com with ESMTPS id n5sm68141576wiw.7.2012.02.22.00.47.46 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 22 Feb 2012 00:47:47 -0800 (PST) From: Mark Walters To: notmuch@notmuchmail.org Subject: [PATCH] emacs: initialize ido mode in notmuch-mua.el Date: Wed, 22 Feb 2012 08:48:49 +0000 Message-Id: <1329900529-16295-1-git-send-email-markwalters1009@gmail.com> X-Mailer: git-send-email 1.7.2.3 In-Reply-To: <87y5sipcjn.fsf@qmul.ac.uk> References: <87y5sipcjn.fsf@qmul.ac.uk> 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: Wed, 22 Feb 2012 08:47:50 -0000 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.org" --- emacs/notmuch-mua.el | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el index 4be7c13..9fe75db 100644 --- a/emacs/notmuch-mua.el +++ b/emacs/notmuch-mua.el @@ -194,6 +194,8 @@ the From: header is already filled in by notmuch." addresses (cons (notmuch-user-primary-email) (notmuch-user-other-email)) one-name-only t)) ;; Now prompt the user, either for an email address only or for a full identity. + (unless ido-mode + (ido-mode t)) (if one-name-only (let ((address (ido-completing-read (concat "Sender address for " name ": ") addresses -- 1.7.2.3