[PATCH v4 11/12] emacs: s/tags/tag-changes/ for arguments of tagging functions
authorDmitry Kurochkin <dmitry.kurochkin@gmail.com>
Tue, 31 Jan 2012 04:54:25 +0000 (08:54 +0400)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:43:46 +0000 (09:43 -0800)
a3/00f400a2c25ef61c4c439844b984abb9fffc6d [new file with mode: 0644]

diff --git a/a3/00f400a2c25ef61c4c439844b984abb9fffc6d b/a3/00f400a2c25ef61c4c439844b984abb9fffc6d
new file mode 100644 (file)
index 0000000..3c40e72
--- /dev/null
@@ -0,0 +1,161 @@
+Return-Path: <dmitry.kurochkin@gmail.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 D62DA41ED96\r
+       for <notmuch@notmuchmail.org>; Mon, 30 Jan 2012 20:56:46 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.799\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5\r
+       tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+       FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] 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 BYvojLrcVwUG for <notmuch@notmuchmail.org>;\r
+       Mon, 30 Jan 2012 20:56:44 -0800 (PST)\r
+Received: from mail-bk0-f53.google.com (mail-bk0-f53.google.com\r
+       [209.85.214.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id A2FAF414B91\r
+       for <notmuch@notmuchmail.org>; Mon, 30 Jan 2012 20:56:06 -0800 (PST)\r
+Received: by mail-bk0-f53.google.com with SMTP id 11so2152468bke.26\r
+       for <notmuch@notmuchmail.org>; Mon, 30 Jan 2012 20:56:06 -0800 (PST)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;\r
+       h=from:to:subject:date:message-id:x-mailer:in-reply-to:references;\r
+       bh=VApMV7kzz+Ak6NA+mwWA7ZOcN9TXp+t5i2+AAhoGtVg=;\r
+       b=gJVnJiAvhNhkSTVWtqLZVo3lUZfPOD7Fum5QS0h6BWbAaGvN49bWDb/+ESlJy+Xnn1\r
+       NTOKC+e9lCICVMUvWLtxFAvsV7DQoip+eLluYOCa6Jn7QrRSOzRZ8ZligtRTfU/4lyX1\r
+       YJNy+iTNudKfbAhMEnGN04Rp+BhuTyrEd0jR4=\r
+Received: by 10.205.120.132 with SMTP id fy4mr10091368bkc.23.1327985766306;\r
+       Mon, 30 Jan 2012 20:56:06 -0800 (PST)\r
+Received: from localhost ([91.144.186.21]) by mx.google.com with ESMTPS id\r
+       fg16sm42427534bkb.16.2012.01.30.20.56.05\r
+       (version=TLSv1/SSLv3 cipher=OTHER);\r
+       Mon, 30 Jan 2012 20:56:05 -0800 (PST)\r
+From: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH v4 11/12] emacs: s/tags/tag-changes/ for arguments of tagging\r
+       functions\r
+Date: Tue, 31 Jan 2012 08:54:25 +0400\r
+Message-Id: <1327985666-29191-12-git-send-email-dmitry.kurochkin@gmail.com>\r
+X-Mailer: git-send-email 1.7.9\r
+In-Reply-To: <1327985666-29191-1-git-send-email-dmitry.kurochkin@gmail.com>\r
+References: <1327901644-15799-1-git-send-email-dmitry.kurochkin@gmail.com>\r
+       <1327985666-29191-1-git-send-email-dmitry.kurochkin@gmail.com>\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: Tue, 31 Jan 2012 04:56:47 -0000\r
+\r
+This makes the argument names more consistent and clear.  The\r
+following functions changed: `notmuch-tag',\r
+`notmuch-search-tag-thread', `notmuch-search-tag-region' and\r
+`notmuch-search-tag-all'.\r
+---\r
+ emacs/notmuch.el |   33 +++++++++++++++++----------------\r
+ 1 files changed, 17 insertions(+), 16 deletions(-)\r
+\r
+diff --git a/emacs/notmuch.el b/emacs/notmuch.el\r
+index c464c3c..fa62019 100644\r
+--- a/emacs/notmuch.el\r
++++ b/emacs/notmuch.el\r
+@@ -543,25 +543,26 @@ and will also appear in a buffer named \"*Notmuch errors*\"."\r
+           (error (buffer-substring beg end))\r
+           ))))))\r
\r
+-(defun notmuch-tag (query &rest tags)\r
+-  "Add/remove tags in TAGS to messages matching QUERY.\r
++(defun notmuch-tag (query &rest tag-changes)\r
++  "Add/remove tags in TAG-CHANGES to messages matching QUERY.\r
\r
+-TAGS should be a list of strings of the form \"+TAG\" or \"-TAG\" and\r
+-QUERY should be a string containing the search-query.\r
++TAG-CHANGES should be a list of strings of the form \"+tag\" or\r
++\"-tag\" and QUERY should be a string containing the\r
++search-query.\r
\r
+ Note: Other code should always use this function alter tags of\r
+ messages instead of running (notmuch-call-notmuch-process \"tag\" ..)\r
+ directly, so that hooks specified in notmuch-before-tag-hook and\r
+ notmuch-after-tag-hook will be run."\r
+   ;; Perform some validation\r
+-  (mapc (lambda (tag)\r
+-        (unless (string-match-p "^[-+]\\S-+$" tag)\r
++  (mapc (lambda (tag-change)\r
++        (unless (string-match-p "^[-+]\\S-+$" tag-change)\r
+           (error "Tag must be of the form `+this_tag' or `-that_tag'")))\r
+-      tags)\r
+-  (unless (null tags)\r
++      tag-changes)\r
++  (unless (null tag-changes)\r
+     (run-hooks 'notmuch-before-tag-hook)\r
+     (apply 'notmuch-call-notmuch-process "tag"\r
+-         (append tags (list "--" query)))\r
++         (append tag-changes (list "--" query)))\r
+     (run-hooks 'notmuch-after-tag-hook)))\r
\r
+ (defcustom notmuch-before-tag-hook nil\r
+@@ -621,26 +622,26 @@ the messages that were tagged"\r
+       (forward-line 1))\r
+       output)))\r
\r
+-(defun notmuch-search-tag-thread (&rest tags)\r
++(defun notmuch-search-tag-thread (&rest tag-changes)\r
+   "Change tags for the currently selected thread.\r
\r
+ See `notmuch-search-tag-region' for details."\r
+-  (apply 'notmuch-search-tag-region (point) (point) tags))\r
++  (apply 'notmuch-search-tag-region (point) (point) tag-changes))\r
\r
+-(defun notmuch-search-tag-region (beg end &rest tags)\r
++(defun notmuch-search-tag-region (beg end &rest tag-changes)\r
+   "Change tags for threads in the given region.\r
\r
+ TAGS is a list of tag operations for `notmuch-tag'.  The tags are\r
+ added or removed for all threads in the region from BEG to END."\r
+   (let ((search-string (notmuch-search-find-thread-id-region-search beg end)))\r
+-    (apply 'notmuch-tag search-string tags)\r
++    (apply 'notmuch-tag search-string tag-changes)\r
+     (save-excursion\r
+       (let ((last-line (line-number-at-pos end))\r
+           (max-line (- (line-number-at-pos (point-max)) 2)))\r
+       (goto-char beg)\r
+       (while (<= (line-number-at-pos) (min last-line max-line))\r
+         (notmuch-search-set-tags\r
+-         (notmuch-update-tags (notmuch-search-get-tags) tags))\r
++         (notmuch-update-tags (notmuch-search-get-tags) tag-changes))\r
+         (forward-line))))))\r
\r
+ (defun notmuch-search-tag (&optional initial-input)\r
+@@ -892,7 +893,7 @@ non-authors is found, assume that all of the authors match."\r
+             (goto-char found-target)))\r
+       (delete-process proc))))\r
\r
+-(defun notmuch-search-tag-all (&rest actions)\r
++(defun notmuch-search-tag-all (&rest tag-changes)\r
+   "Add/remove tags from all matching messages.\r
\r
+ This command adds or removes tags from all messages matching the\r
+@@ -904,7 +905,7 @@ Each character of the tag name may consist of alphanumeric\r
+ characters as well as `_.+-'.\r
+ "\r
+   (interactive (notmuch-read-tag-changes))\r
+-  (apply 'notmuch-tag notmuch-search-query-string actions))\r
++  (apply 'notmuch-tag notmuch-search-query-string tag-changes))\r
\r
+ (defun notmuch-search-buffer-title (query)\r
+   "Returns the title for a buffer with notmuch search results."\r
+-- \r
+1.7.9\r
+\r