From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 8D12A6DE035A for ; Tue, 27 Sep 2016 04:31:43 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.007 X-Spam-Level: X-Spam-Status: No, score=-0.007 tagged_above=-999 required=5 tests=[AWL=0.004, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id y-xBhSihuX8x for ; Tue, 27 Sep 2016 04:31:41 -0700 (PDT) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by arlo.cworth.org (Postfix) with ESMTPS id 9BBB56DE01CE for ; Tue, 27 Sep 2016 04:31:40 -0700 (PDT) Received: from remotemail by fethera.tethera.net with local (Exim 4.84_2) (envelope-from ) id 1boqbc-0004gH-32; Tue, 27 Sep 2016 07:31:24 -0400 Received: (nullmailer pid 30768 invoked by uid 1000); Tue, 27 Sep 2016 11:31:33 -0000 From: David Bremner To: Mark Walters , notmuch@notmuchmail.org Subject: Re: [PATCH] emacs: add mimetype completions to searches In-Reply-To: <1474968416-3572-1-git-send-email-markwalters1009@gmail.com> References: <1474968416-3572-1-git-send-email-markwalters1009@gmail.com> Date: Tue, 27 Sep 2016 08:31:33 -0300 Message-ID: <87ponpk296.fsf@zancas.localnet> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.22 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: Tue, 27 Sep 2016 11:31:43 -0000 Mark Walters writes: > --- > > When doing the patch for commit > f94921520778ae4005500f5d1b943e2d4ddd3b2a emacs: show: let the user > override the mime-type of an attachment, I discovered how to do > mimetype completion (in particular where to get a list of mimetypes), > so we may as well add this completion for searches too. > > Best wishes > > Mark Did you mean to have an empty commit message? > emacs/notmuch.el | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/emacs/notmuch.el b/emacs/notmuch.el > index 8e14692..29afd45 100644 > --- a/emacs/notmuch.el > +++ b/emacs/notmuch.el > @@ -891,9 +891,10 @@ PROMPT is the string to prompt with." > (process-lines notmuch-command "search" "--output=tags" "*"))) > (completions > (append (list "folder:" "path:" "thread:" "id:" "date:" "from:" "to:" > - "subject:" "attachment:" "mimetype:") > + "subject:" "attachment:") > (mapcar (lambda (tag) (concat "tag:" tag)) all-tags) > - (mapcar (lambda (tag) (concat "is:" tag)) all-tags)))) > + (mapcar (lambda (tag) (concat "is:" tag)) all-tags) > + (mapcar (lambda (mimetype) (concat "mimetype:" mimetype)) (mailcap-mime-types))))) > (let ((keymap (copy-keymap minibuffer-local-map)) > (current-query (case major-mode > (notmuch-search-mode (notmuch-search-get-query)) I don't seem to have the variable mailcap-mime-types in this emacs session, with notmuch loaded.