[PATCH v4 4/5] Update completions for Emacs and bash
authorTodd <todd@electricoding.com>
Thu, 22 Jan 2015 23:43:39 +0000 (17:43 +1800)
committerW. Trevor King <wking@tremily.us>
Sat, 20 Aug 2016 21:47:44 +0000 (14:47 -0700)
79/4717b771f7d4050b4cacdc228ee19a59fb486a [new file with mode: 0644]

diff --git a/79/4717b771f7d4050b4cacdc228ee19a59fb486a b/79/4717b771f7d4050b4cacdc228ee19a59fb486a
new file mode 100644 (file)
index 0000000..5350524
--- /dev/null
@@ -0,0 +1,98 @@
+Return-Path: <todd@electricoding.com>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 7B6A0431FBC\r
+       for <notmuch@notmuchmail.org>; Thu, 22 Jan 2015 15:44:32 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References"\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 2.438\r
+X-Spam-Level: **\r
+X-Spam-Status: No, score=2.438 tagged_above=-999 required=5\r
+       tests=[DNS_FROM_AHBL_RHSBL=2.438] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id oFv81ubvqqVU for <notmuch@notmuchmail.org>;\r
+       Thu, 22 Jan 2015 15:44:28 -0800 (PST)\r
+Received: from s75.web-hosting.com (s75.web-hosting.com [198.187.31.9])\r
+       (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 964FF431FCF\r
+       for <notmuch@notmuchmail.org>; Thu, 22 Jan 2015 15:44:24 -0800 (PST)\r
+Received: from user-69-73-37-128.knology.net ([69.73.37.128]:32799\r
+       helo=localhost.localdomain)\r
+       by server75.web-hosting.com with esmtpsa (UNKNOWN:AES128-SHA256:128)\r
+       (Exim 4.82) (envelope-from <todd@electricoding.com>)\r
+       id 1YERQF-0036iE-Pa; Thu, 22 Jan 2015 18:44:23 -0500\r
+From: Todd <todd@electricoding.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH v4 4/5] Update completions for Emacs and bash\r
+Date: Thu, 22 Jan 2015 17:43:39 -0600\r
+Message-Id: <1421970220-9019-5-git-send-email-todd@electricoding.com>\r
+X-Mailer: git-send-email 1.9.1\r
+In-Reply-To: <1421970220-9019-1-git-send-email-todd@electricoding.com>\r
+References: <1421970220-9019-1-git-send-email-todd@electricoding.com>\r
+In-Reply-To: <1420849787-4401-1-git-send-email-todd@electricoding.com>\r
+References: <1420849787-4401-1-git-send-email-todd@electricoding.com>\r
+X-AntiAbuse: This header was added to track abuse,\r
+       please include it with any abuse report\r
+X-AntiAbuse: Primary Hostname - server75.web-hosting.com\r
+X-AntiAbuse: Original Domain - notmuchmail.org\r
+X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]\r
+X-AntiAbuse: Sender Address Domain - electricoding.com\r
+X-Get-Message-Sender-Via: server75.web-hosting.com: authenticated_id:\r
+       todd@electricoding.com\r
+X-Source: \r
+X-Source-Args: \r
+X-Source-Dir: \r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Thu, 22 Jan 2015 23:44:32 -0000\r
+\r
+This adds completions for both Emacs and bash. ZSH does not appear to\r
+have completions for search terms.\r
+---\r
+ completion/notmuch-completion.bash | 2 +-\r
+ emacs/notmuch.el                   | 2 +-\r
+ 2 files changed, 2 insertions(+), 2 deletions(-)\r
+\r
+diff --git a/completion/notmuch-completion.bash b/completion/notmuch-completion.bash\r
+index d58dc8b..39320f8 100644\r
+--- a/completion/notmuch-completion.bash\r
++++ b/completion/notmuch-completion.bash\r
+@@ -61,7 +61,7 @@ _notmuch_search_terms()\r
+               sed "s|^$path/||" | grep -v "\(^\|/\)\(cur\|new\|tmp\)$" ) )\r
+           ;;\r
+       *)\r
+-          local search_terms="from: to: subject: attachment: tag: id: thread: folder: path: date:"\r
++          local search_terms="from: to: subject: attachment: mimetype: tag: id: thread: folder: path: date:"\r
+           compopt -o nospace\r
+           COMPREPLY=( $(compgen -W "${search_terms}" -- ${cur}) )\r
+           ;;\r
+diff --git a/emacs/notmuch.el b/emacs/notmuch.el\r
+index 218486a..ab00454 100644\r
+--- a/emacs/notmuch.el\r
++++ b/emacs/notmuch.el\r
+@@ -858,7 +858,7 @@ PROMPT is the string to prompt with."\r
+   (lexical-let\r
+       ((completions\r
+       (append (list "folder:" "path:" "thread:" "id:" "date:" "from:" "to:"\r
+-                    "subject:" "attachment:")\r
++                    "subject:" "attachment:" "mimetype:")\r
+               (mapcar (lambda (tag)\r
+                         (concat "tag:" (notmuch-escape-boolean-term tag)))\r
+                       (process-lines notmuch-command "search" "--output=tags" "*")))))\r
+-- \r
+1.9.1\r
+\r