From 0206d1445b12d64d8e2922b0c364fef082805c1f Mon Sep 17 00:00:00 2001 From: Todd Date: Fri, 16 Jan 2015 18:30:28 +1800 Subject: [PATCH] [PATCH v3 4/5] Update completions for Emacs and bash --- d2/8e9419e8f0fb5ac6f84f9a7b67b18f0ce61577 | 98 +++++++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 d2/8e9419e8f0fb5ac6f84f9a7b67b18f0ce61577 diff --git a/d2/8e9419e8f0fb5ac6f84f9a7b67b18f0ce61577 b/d2/8e9419e8f0fb5ac6f84f9a7b67b18f0ce61577 new file mode 100644 index 000000000..90dbb4998 --- /dev/null +++ b/d2/8e9419e8f0fb5ac6f84f9a7b67b18f0ce61577 @@ -0,0 +1,98 @@ +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 657DF429E26 + for ; Thu, 15 Jan 2015 16:31:09 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" +X-Spam-Flag: NO +X-Spam-Score: 2.438 +X-Spam-Level: ** +X-Spam-Status: No, score=2.438 tagged_above=-999 required=5 + tests=[DNS_FROM_AHBL_RHSBL=2.438] 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 LmeULekIb3W4 for ; + Thu, 15 Jan 2015 16:31:07 -0800 (PST) +Received: from s75.web-hosting.com (s75.web-hosting.com [198.187.31.9]) + (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 70B95431FDB + for ; Thu, 15 Jan 2015 16:31:05 -0800 (PST) +Received: from user-69-73-37-128.knology.net ([69.73.37.128]:60097 + helo=localhost.localdomain) + by server75.web-hosting.com with esmtpsa (UNKNOWN:AES128-SHA256:128) + (Exim 4.82) (envelope-from ) + id 1YBuoa-003S2e-Im; Thu, 15 Jan 2015 19:31:04 -0500 +From: Todd +To: notmuch@notmuchmail.org +Subject: [PATCH v3 4/5] Update completions for Emacs and bash +Date: Thu, 15 Jan 2015 18:30:28 -0600 +Message-Id: <1421368229-4360-4-git-send-email-todd@electricoding.com> +X-Mailer: git-send-email 1.9.1 +In-Reply-To: <1421368229-4360-1-git-send-email-todd@electricoding.com> +References: <1421368229-4360-1-git-send-email-todd@electricoding.com> +In-Reply-To: <1420849787-4401-1-git-send-email-todd@electricoding.com> +References: <1420849787-4401-1-git-send-email-todd@electricoding.com> +X-AntiAbuse: This header was added to track abuse, + please include it with any abuse report +X-AntiAbuse: Primary Hostname - server75.web-hosting.com +X-AntiAbuse: Original Domain - notmuchmail.org +X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] +X-AntiAbuse: Sender Address Domain - electricoding.com +X-Get-Message-Sender-Via: server75.web-hosting.com: authenticated_id: + todd@electricoding.com +X-Source: +X-Source-Args: +X-Source-Dir: +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: Fri, 16 Jan 2015 00:31:09 -0000 + +This adds completions for Emacs and bash, ZSH does not appear to have +completions for search terms. +--- + completion/notmuch-completion.bash | 2 +- + emacs/notmuch.el | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/completion/notmuch-completion.bash b/completion/notmuch-completion.bash +index d58dc8b..39320f8 100644 +--- a/completion/notmuch-completion.bash ++++ b/completion/notmuch-completion.bash +@@ -61,7 +61,7 @@ _notmuch_search_terms() + sed "s|^$path/||" | grep -v "\(^\|/\)\(cur\|new\|tmp\)$" ) ) + ;; + *) +- local search_terms="from: to: subject: attachment: tag: id: thread: folder: path: date:" ++ local search_terms="from: to: subject: attachment: mimetype: tag: id: thread: folder: path: date:" + compopt -o nospace + COMPREPLY=( $(compgen -W "${search_terms}" -- ${cur}) ) + ;; +diff --git a/emacs/notmuch.el b/emacs/notmuch.el +index 218486a..ab00454 100644 +--- a/emacs/notmuch.el ++++ b/emacs/notmuch.el +@@ -858,7 +858,7 @@ PROMPT is the string to prompt with." + (lexical-let + ((completions + (append (list "folder:" "path:" "thread:" "id:" "date:" "from:" "to:" +- "subject:" "attachment:") ++ "subject:" "attachment:" "mimetype:") + (mapcar (lambda (tag) + (concat "tag:" (notmuch-escape-boolean-term tag))) + (process-lines notmuch-command "search" "--output=tags" "*"))))) +-- +1.9.1 + -- 2.26.2