From: Tomi Ollila Date: Wed, 23 Oct 2013 18:28:27 +0000 (+0300) Subject: Re: [PATCH v2 0/8] Improve tag change completion X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=de40e9059bd92ceb736ab2d841dd8a607b6b9540;p=notmuch-archives.git Re: [PATCH v2 0/8] Improve tag change completion --- diff --git a/52/c9ce653843d3aa4d4d7ee80e12b0616454cc8a b/52/c9ce653843d3aa4d4d7ee80e12b0616454cc8a new file mode 100644 index 000000000..28d8daa8b --- /dev/null +++ b/52/c9ce653843d3aa4d4d7ee80e12b0616454cc8a @@ -0,0 +1,127 @@ +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 203D4431FC7 + for ; Wed, 23 Oct 2013 11:28:45 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0 +X-Spam-Level: +X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] + 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 hsG3898Ahk5s for ; + Wed, 23 Oct 2013 11:28:35 -0700 (PDT) +Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) + by olra.theworths.org (Postfix) with ESMTP id ABB26431FBC + for ; Wed, 23 Oct 2013 11:28:35 -0700 (PDT) +Received: from guru.guru-group.fi (localhost [IPv6:::1]) + by guru.guru-group.fi (Postfix) with ESMTP id E9976100217; + Wed, 23 Oct 2013 21:28:27 +0300 (EEST) +From: Tomi Ollila +To: Austin Clements , notmuch@notmuchmail.org +Subject: Re: [PATCH v2 0/8] Improve tag change completion +In-Reply-To: <87k3h40y64.fsf@qmul.ac.uk> +References: <1382487721-31776-1-git-send-email-amdragon@mit.edu> + <87k3h40y64.fsf@qmul.ac.uk> +User-Agent: Notmuch/0.16+115~g11c2ff5 (http://notmuchmail.org) Emacs/24.3.1 + (x86_64-unknown-linux-gnu) +X-Face: HhBM'cA~ +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: Wed, 23 Oct 2013 18:28:45 -0000 + +On Wed, Oct 23 2013, Mark Walters wrote: + +> In might of id:20131023154404.GE20337@mit.edu I am now happy with this +> series. LGTM +1 + +Looks Good To Me, too - and worked in my test tagging operations as +announced +1 + +Tomi + +> +> Best wishes +> +> Mark +> +> +> On Wed, 23 Oct 2013, Austin Clements wrote: +>> This is v2 of id:1382471457-26056-1-git-send-email-amdragon@mit.edu. +>> It improves some documentation strings, fixes one bug, and elimintes +>> some redundant code. The diff from v1 is below. +>> +>> diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el +>> index ef77839..f66d669 100644 +>> --- a/emacs/notmuch-show.el +>> +++ b/emacs/notmuch-show.el +>> @@ -1800,7 +1800,6 @@ See `notmuch-tag' for information on the format of TAG-CHANGES." +>> (list (let (tags) +>> (notmuch-show-mapc +>> (lambda () (setq tags (append (notmuch-show-get-tags) tags)))) +>> - (delete-dups tags) +>> (notmuch-read-tag-changes tags "Tag thread")))) +>> (notmuch-tag (notmuch-show-get-messages-ids-search) tag-changes) +>> (notmuch-show-mapc +>> diff --git a/emacs/notmuch-tag.el b/emacs/notmuch-tag.el +>> index feee17c..7b21006 100644 +>> --- a/emacs/notmuch-tag.el +>> +++ b/emacs/notmuch-tag.el +>> @@ -189,6 +189,9 @@ the messages that were tagged" +>> `notmuch-read-tag-changes' function.") +>> +>> (defun notmuch-tag-completions (&rest search-terms) +>> + "Return a list of tags for messages matching SEARCH-TERMS. +>> + +>> +Returns all tags if no search terms are given." +>> (if (null search-terms) +>> (setq search-terms (list "*"))) +>> (split-string +>> @@ -199,7 +202,7 @@ the messages that were tagged" +>> "\n+" t)) +>> +>> (defun notmuch-select-tag-with-completion (prompt &rest search-terms) +>> - (let ((tag-list (notmuch-tag-completions search-terms))) +>> + (let ((tag-list (apply #'notmuch-tag-completions search-terms))) +>> (completing-read prompt tag-list nil nil nil 'notmuch-select-tag-history))) +>> +>> (defun notmuch-read-tag-changes (current-tags &optional prompt initial-input) +>> diff --git a/emacs/notmuch.el b/emacs/notmuch.el +>> index 5492e1b..53e9826 100644 +>> --- a/emacs/notmuch.el +>> +++ b/emacs/notmuch.el +>> @@ -584,7 +584,10 @@ Returns (TAG-CHANGES REGION-BEGIN REGION-END)." +>> "Change tags for the currently selected thread or region. +>> +>> See `notmuch-tag' for information on the format of TAG-CHANGES. +>> -If BEG or END are nil, applies to the thread at point." +>> +When called interactively, this uses the region if the region is +>> +active. When called directly, BEG and END provide the region. +>> +If these are nil or not provided, this applies to the thread at +>> +point." +>> (interactive (notmuch-search-interactive-tag-changes)) +>> (unless (and beg end) (setq beg (point) end (point))) +>> (let ((search-string (notmuch-search-find-thread-id-region-search beg end))) +> _______________________________________________ +> notmuch mailing list +> notmuch@notmuchmail.org +> http://notmuchmail.org/mailman/listinfo/notmuch