From 8da7b2537c2758cf33b624f31e4495fc6eddc053 Mon Sep 17 00:00:00 2001 From: Jani Nikula Date: Thu, 15 Jan 2015 19:17:18 +0200 Subject: [PATCH] Re: [PATCH v2 4/5] Update completions for Emacs and bash --- e0/a4b34acc55aef70414fac453863b08ee3b362a | 117 ++++++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100644 e0/a4b34acc55aef70414fac453863b08ee3b362a diff --git a/e0/a4b34acc55aef70414fac453863b08ee3b362a b/e0/a4b34acc55aef70414fac453863b08ee3b362a new file mode 100644 index 000000000..d51b55126 --- /dev/null +++ b/e0/a4b34acc55aef70414fac453863b08ee3b362a @@ -0,0 +1,117 @@ +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 3539C431FD8 + for ; Thu, 15 Jan 2015 09:17:12 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 1.738 +X-Spam-Level: * +X-Spam-Status: No, score=1.738 tagged_above=-999 required=5 + tests=[DNS_FROM_AHBL_RHSBL=2.438, 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 O9vuDxVl-mlt for ; + Thu, 15 Jan 2015 09:17:09 -0800 (PST) +Received: from mail-wg0-f50.google.com (mail-wg0-f50.google.com + [74.125.82.50]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client + certificate requested) by olra.theworths.org (Postfix) with ESMTPS id + C715A431FBC for ; Thu, 15 Jan 2015 09:17:08 -0800 + (PST) +Received: by mail-wg0-f50.google.com with SMTP id a1so16184175wgh.9 + for ; Thu, 15 Jan 2015 09:17:06 -0800 (PST) +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=1e100.net; s=20130820; + h=x-gm-message-state:from:to:subject:in-reply-to:references + :user-agent:date:message-id:mime-version:content-type; + bh=tTAV9Oa6LSNzkm9k/Ln5GJh4wWRR+VVGRekXndcHL7U=; + b=dEKoozkHOqHi06skVJw5bJr+Xoeu8i7oyz4MZB0gLqqfSTd6kaTSKXHFAIVoiJbITM + kaSL+gGYk8zuWcohOQqJAqLts3jND/Mikn/ENmxANViB4nFjksQmwKiS5ZwMylFWxYRd + i5l6LFpgKkTeMC4GB512baZvTik4ve18Az34zBxDMA4RzskNwg0vWBOOeJKpNTq6rK2+ + DzU+xCjKldE90oyXGcqFcoTLirW5xOms9Fc8525dWgXhl2FwCavHgrAAdB9UDVBsxEO3 + GblWPOjcfEzgfF5dLNEOJReTTnkrt0k86XgxcUTKRaf8j0UELjql25tt1sHDQoFygDDG + zptQ== +X-Gm-Message-State: + ALoCoQnCyLfKAl/h65GDcwK2BV/QcbwBl4P24laOIq7Ayphm0aI4ngq5Y1VAHhAE75juCfZm3CDH +X-Received: by 10.180.75.176 with SMTP id d16mr20840711wiw.77.1421342226476; + Thu, 15 Jan 2015 09:17:06 -0800 (PST) +Received: from localhost (mobile-internet-bcee14-89.dhcp.inet.fi. + [188.238.20.89]) + by mx.google.com with ESMTPSA id gl5sm3358468wib.0.2015.01.15.09.17.05 + (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); + Thu, 15 Jan 2015 09:17:05 -0800 (PST) +From: Jani Nikula +To: Todd , notmuch@notmuchmail.org +Subject: Re: [PATCH v2 4/5] Update completions for Emacs and bash +In-Reply-To: <1421193628-2699-5-git-send-email-todd@electricoding.com> +References: <1421193628-2699-1-git-send-email-todd@electricoding.com> + <1421193628-2699-5-git-send-email-todd@electricoding.com> +User-Agent: Notmuch/0.19+19~g9060a1f (http://notmuchmail.org) Emacs/24.4.1 + (x86_64-pc-linux-gnu) +Date: Thu, 15 Jan 2015 19:17:18 +0200 +Message-ID: <874mrs9d5t.fsf@nikula.org> +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: Thu, 15 Jan 2015 17:17:12 -0000 + +On Wed, 14 Jan 2015, Todd wrote: +> 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..05b5969 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: contenttype: tag: id: thread: folder: path: date:" + +Should be mimetype. + +BR, +Jani. + +> 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 +> +> _______________________________________________ +> notmuch mailing list +> notmuch@notmuchmail.org +> http://notmuchmail.org/mailman/listinfo/notmuch -- 2.26.2