unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH v2 0/8] Improve tag change completion
@ 2013-10-23  0:21 Austin Clements
  2013-10-23  0:21 ` [PATCH v2 1/8] emacs: Fix misuse of `notmuch-tag' Austin Clements
                   ` (9 more replies)
  0 siblings, 10 replies; 12+ messages in thread
From: Austin Clements @ 2013-10-23  0:21 UTC (permalink / raw)
  To: notmuch

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)))

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2013-10-26  0:37 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-23  0:21 [PATCH v2 0/8] Improve tag change completion Austin Clements
2013-10-23  0:21 ` [PATCH v2 1/8] emacs: Fix misuse of `notmuch-tag' Austin Clements
2013-10-23  0:21 ` [PATCH v2 2/8] emacs: Take prompt and current tags in `notmuch-read-tag-changes' Austin Clements
2013-10-23  0:21 ` [PATCH v2 3/8] emacs: Use interactive specifications for tag changes in show Austin Clements
2013-10-23  0:21 ` [PATCH v2 4/8] emacs: Use interactive specifications for tag changes in search Austin Clements
2013-10-23  0:21 ` [PATCH v2 5/8] pick: Fix incorrect use of `notmuch-pick-tag' Austin Clements
2013-10-23  0:21 ` [PATCH v2 6/8] pick: Use list form of tag-changes in test Austin Clements
2013-10-23  0:22 ` [PATCH v2 7/8] pick: Use interactive specifications for tag changes Austin Clements
2013-10-23  0:22 ` [PATCH v2 8/8] emacs: Remove interactive behavior of `notmuch-tag' Austin Clements
2013-10-23 16:06 ` [PATCH v2 0/8] Improve tag change completion Mark Walters
2013-10-23 18:28   ` Tomi Ollila
2013-10-26  0:37 ` David Bremner

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).