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 4FF98431FBF for ; Fri, 28 Nov 2014 23:53:49 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.699 X-Spam-Level: X-Spam-Status: No, score=-0.699 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_LOW=-0.7, UNPARSEABLE_RELAY=0.001] 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 PlTk86p7-tFH for ; Fri, 28 Nov 2014 23:53:36 -0800 (PST) Received: from mail-wi0-f173.google.com (mail-wi0-f173.google.com [209.85.212.173]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 6824D431FAE for ; Fri, 28 Nov 2014 23:53:34 -0800 (PST) Received: by mail-wi0-f173.google.com with SMTP id r20so20282508wiv.0 for ; Fri, 28 Nov 2014 23:53:33 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:to:subject:in-reply-to:references:user-agent :from:date:message-id:mime-version:content-type; bh=aHyD7ci8CJVuqQ/P36yGz1Vxkw8jXKN95bFUX4rEGBs=; b=ZKTeyKt9J4tFs75bIBHsDoHqADXHB9n51KU5sRlzugQC24pxcoAIS8DBacRyZDkLcF Tluz5wHNz1aw1zulfDuNAv7H2uO6FcGQ8fpnzdbL5i5GWQMoXqkWPMC+FparWkE20w4s YaScjIBg9BO4sghBjQMIORrcIc76OulAQVMzK/SvFdlp5YZEjEcG1HE+KLcO6p+wRi4H Ew8vF8N1e6kAofv7aGYQnBRoxoveOmycbR2CIIZ92olyCKAjj2L/WYhbY1+X5F80Jed4 s56ePRXsMcknhinRAcEPVfZoYt9bj8WP6ytvCUt1mINzZnQr1r1nOWSIH3ZrxPPTuCU6 +rqw== X-Gm-Message-State: ALoCoQl6d4/1Qkfb5BoI6lHht37VDi/d5Nj0ebNN5TZ58xd2Z1APnDmuSwACQCAKXhqvkCzGWyW9 X-Received: by 10.194.248.195 with SMTP id yo3mr30029629wjc.60.1417247613126; Fri, 28 Nov 2014 23:53:33 -0800 (PST) Received: from disaster-area.hh.sledj.net ([2a01:348:1a2:1:ea39:35ff:fe2c:a227]) by mx.google.com with ESMTPSA id j2sm18052059wjs.28.2014.11.28.23.53.31 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 28 Nov 2014 23:53:32 -0800 (PST) Received: from localhost (30000@localhost [local]); by localhost (OpenSMTPD) with ESMTPA id 9ab8c14c; Sat, 29 Nov 2014 07:53:30 +0000 (UTC) To: Charles Celerier , notmuch@notmuchmail.org Subject: Re: [PATCH] emacs: Added "is:" style completion to notmuch-read-query. In-Reply-To: <1417219835-92141-1-git-send-email-cceleri@cs.stanford.edu> References: <1417219835-92141-1-git-send-email-cceleri@cs.stanford.edu> User-Agent: Notmuch/0.18.2 (http://notmuchmail.org) Emacs/24.4.1 (x86_64-pc-linux-gnu) From: David Edmondson Date: Sat, 29 Nov 2014 07:53:30 +0000 Message-ID: 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, 29 Nov 2014 07:53:49 -0000 On Sat, Nov 29 2014, Charles Celerier wrote: > The notmuch-search-terms man page states that "tag:" is equivalent > to "is:". Completion for "is:" style searches is now supported > in the Emacs interface. > > Signed-off-by: Charles Celerier > --- > emacs/notmuch.el | 8 +++++--- > 1 file changed, 5 insertions(+), 3 deletions(-) > > diff --git a/emacs/notmuch.el b/emacs/notmuch.el > index 218486a..e4b77c7 100644 > --- a/emacs/notmuch.el > +++ b/emacs/notmuch.el > @@ -855,13 +855,15 @@ See `notmuch-tag' for information on the format of TAG-CHANGES." > "Read a notmuch-query from the minibuffer with completion. > > PROMPT is the string to prompt with." > + (setq all-tags > + (mapcar (lambda (tag) (notmuch-escape-boolean-term tag)) > + (process-lines notmuch-command "search" > "--output=tags" "*"))) Should use a `let' binding rather than `setq'. Otherwise, looks good. > (lexical-let > ((completions > (append (list "folder:" "path:" "thread:" "id:" "date:" "from:" "to:" > "subject:" "attachment:") > - (mapcar (lambda (tag) > - (concat "tag:" (notmuch-escape-boolean-term tag))) > - (process-lines notmuch-command "search" "--output=tags" "*"))))) > + (mapcar (lambda (tag) (concat "tag:" tag)) all-tags) > + (mapcar (lambda (tag) (concat "is:" tag)) all-tags)))) > (let ((keymap (copy-keymap minibuffer-local-map)) > (current-query (case major-mode > (notmuch-search-mode (notmuch-search-get-query)) > -- > 2.1.2 > > _______________________________________________ > notmuch mailing list > notmuch@notmuchmail.org > http://notmuchmail.org/mailman/listinfo/notmuch