[PATCH 0/4] rename pick to tree
authorMark Walters <markwalters1009@gmail.com>
Sat, 26 Oct 2013 21:21:17 +0000 (22:21 +0100)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:57:40 +0000 (09:57 -0800)
fe/7aaa4d294f8783f10386e41f7f1fcad3fb5a95 [new file with mode: 0644]

diff --git a/fe/7aaa4d294f8783f10386e41f7f1fcad3fb5a95 b/fe/7aaa4d294f8783f10386e41f7f1fcad3fb5a95
new file mode 100644 (file)
index 0000000..a11a28a
--- /dev/null
@@ -0,0 +1,249 @@
+Return-Path: <markwalters1009@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 3E891429E4B\r
+       for <notmuch@notmuchmail.org>; Sat, 26 Oct 2013 14:21:34 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0.201\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0.201 tagged_above=-999 required=5\r
+       tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+       FREEMAIL_ENVFROM_END_DIGIT=1, FREEMAIL_FROM=0.001,\r
+       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 u6gwptU8FOSQ for <notmuch@notmuchmail.org>;\r
+       Sat, 26 Oct 2013 14:21:29 -0700 (PDT)\r
+Received: from mail-we0-f181.google.com (mail-we0-f181.google.com\r
+       [74.125.82.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id BB9AB431FD9\r
+       for <notmuch@notmuchmail.org>; Sat, 26 Oct 2013 14:21:28 -0700 (PDT)\r
+Received: by mail-we0-f181.google.com with SMTP id t60so5026713wes.26\r
+       for <notmuch@notmuchmail.org>; Sat, 26 Oct 2013 14:21:26 -0700 (PDT)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
+       h=from:to:cc:subject:date:message-id;\r
+       bh=HalF1E570J+1KP2HLLZ77AGio8twkCY6LBlbp4v0ztk=;\r
+       b=EEsndohtdY/94JxrKWaLXlNRynabFa9jhpRhMg9VvibwDU7f1u7SYemUpsht4Ya5d5\r
+       h0wFAE3OXs/P3VfE8k4nxTQ3mQ7RXDBoh0HDdS/CrjwYAyOn3mGtWtYDTEvy/04zH15s\r
+       y5Dvy0hdMJK5d5bkL3dqkme3ocVfin3MLO6My3LUbKbA5NxCBmcL02fht6hwP38I1QSx\r
+       K/lrkpSrF8RVO5Kpz/24+tzek0NoIJrnisLOAPIgLSKJGGalXdMNkoYUjj1KLKWf/PWk\r
+       50j1BNi6TeI8umH9l361nmjNhJtzITWHIL32u6r7WZbH/taUvQCAXzvEOE8zJwJ/z6cu\r
+       bApg==\r
+X-Received: by 10.180.108.131 with SMTP id hk3mr3484846wib.10.1382822486120;\r
+       Sat, 26 Oct 2013 14:21:26 -0700 (PDT)\r
+Received: from localhost (93-97-24-31.zone5.bethere.co.uk. [93.97.24.31])\r
+       by mx.google.com with ESMTPSA id b7sm19635183wiz.8.2013.10.26.14.21.25\r
+       for <multiple recipients>\r
+       (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
+       Sat, 26 Oct 2013 14:21:25 -0700 (PDT)\r
+From: Mark Walters <markwalters1009@gmail.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 0/4] rename pick to tree\r
+Date: Sat, 26 Oct 2013 22:21:17 +0100\r
+Message-Id: <1382822481-26659-1-git-send-email-markwalters1009@gmail.com>\r
+X-Mailer: git-send-email 1.7.9.1\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: Sat, 26 Oct 2013 21:21:34 -0000\r
+\r
+After some discussion on irc it was decided to rename "pick" to\r
+"tree".  This series implements this change. Obviously the patch is\r
+rather large. I have split it as best as I can: the first moves all of\r
+the lisp from the "pick" namespace to the "tree" namespace, the second\r
+does the user facing part of the tests (ie what is printed when the\r
+test is run), the third updates the auxillary test files (expected\r
+outputs) and the final one moves the test itself.\r
+\r
+I haven't updated the documentation or moved the notmuch-pick\r
+directory as that will all be moot once pick moves into mainline.\r
+\r
+For the main lisp change I piped the pick.el file through sed\r
+'s/pick/tree/g'. Then I hand editted the result. The diff from the\r
+hand editting is below as that may give the best clue as to any actual\r
+changes. (The main one is to use "tree view" rather than just "tree"\r
+in docstrings etc.)\r
+\r
+For any users this will mean they need to update their require\r
+'notmuch-pick to require 'notmuch-tree.\r
+\r
+\r
+Best wishes\r
+\r
+Mark\r
+\r
+\r
+\r
+Mark Walters (4):\r
+  contrib: pick: move lisp names from pick to tree\r
+  pick: Change the test names and print out for pick tests\r
+  pick: rename test outputs from pick to tree\r
+  pick: rename test emacs-pick to emacs-tree\r
+\r
+ contrib/notmuch-pick/notmuch-pick.el               |  668 ++++++++++----------\r
+ contrib/notmuch-pick/run-tests.sh                  |    4 +-\r
+ contrib/notmuch-pick/test/emacs-pick               |  210 ------\r
+ contrib/notmuch-pick/test/emacs-tree               |  210 ++++++\r
+ .../pick.expected-output/notmuch-pick-show-window  |   40 --\r
+ .../notmuch-pick-single-thread                     |    6 -\r
+ .../pick.expected-output/notmuch-pick-tag-inbox    |   53 --\r
+ .../notmuch-pick-tag-inbox-tagged                  |   53 --\r
+ .../notmuch-pick-tag-inbox-thread-tagged           |   53 --\r
+ .../tree.expected-output/notmuch-tree-show-window  |   40 ++\r
+ .../notmuch-tree-single-thread                     |    6 +\r
+ .../tree.expected-output/notmuch-tree-tag-inbox    |   53 ++\r
+ .../notmuch-tree-tag-inbox-tagged                  |   53 ++\r
+ .../notmuch-tree-tag-inbox-thread-tagged           |   53 ++\r
+ 14 files changed, 751 insertions(+), 751 deletions(-)\r
+ delete mode 100755 contrib/notmuch-pick/test/emacs-pick\r
+ create mode 100755 contrib/notmuch-pick/test/emacs-tree\r
+ delete mode 100644 contrib/notmuch-pick/test/pick.expected-output/notmuch-pick-show-window\r
+ delete mode 100644 contrib/notmuch-pick/test/pick.expected-output/notmuch-pick-single-thread\r
+ delete mode 100644 contrib/notmuch-pick/test/pick.expected-output/notmuch-pick-tag-inbox\r
+ delete mode 100644 contrib/notmuch-pick/test/pick.expected-output/notmuch-pick-tag-inbox-tagged\r
+ delete mode 100644 contrib/notmuch-pick/test/pick.expected-output/notmuch-pick-tag-inbox-thread-tagged\r
+ create mode 100644 contrib/notmuch-pick/test/tree.expected-output/notmuch-tree-show-window\r
+ create mode 100644 contrib/notmuch-pick/test/tree.expected-output/notmuch-tree-single-thread\r
+ create mode 100644 contrib/notmuch-pick/test/tree.expected-output/notmuch-tree-tag-inbox\r
+ create mode 100644 contrib/notmuch-pick/test/tree.expected-output/notmuch-tree-tag-inbox-tagged\r
+ create mode 100644 contrib/notmuch-pick/test/tree.expected-output/notmuch-tree-tag-inbox-thread-tagged\r
+\r
+>From 338fd0c981ef9ed4d5b4f7880b1e21826f7d182c Mon Sep 17 00:00:00 2001\r
+From: Mark Walters <markwalters1009@gmail.com>\r
+Date: Sat, 26 Oct 2013 13:48:04 +0100\r
+Subject: [PATCH] by hand\r
+\r
+---\r
+ contrib/notmuch-pick/notmuch-pick.el |   34 +++++++++++++++++-----------------\r
+ 1 files changed, 17 insertions(+), 17 deletions(-)\r
+\r
+diff --git a/contrib/notmuch-pick/notmuch-pick.el b/contrib/notmuch-pick/notmuch-pick.el\r
+index aaadad4..3b0cc0e 100644\r
+--- a/contrib/notmuch-pick/notmuch-pick.el\r
++++ b/contrib/notmuch-pick/notmuch-pick.el\r
+@@ -60,7 +60,7 @@\r
+     ("authors" . "%-20s")\r
+     ((("tree" . "%s")("subject" . "%s")) ." %-54s ")\r
+     ("tags" . "(%s)"))\r
+-  "Result formatting for Pick. Supported fields are: date,\r
++  "Result formatting for Tree view. Supported fields are: date,\r
+         authors, subject, tree, tags.  Tree means the thread tree\r
+         box graphics. The field may also be a list in which case\r
+         the formatting rules are applied recursively and then the\r
+@@ -175,8 +175,8 @@ Note the author string should not contain\r
+   "The window of the message pane.\r
\r
+ It is set in both the tree buffer and the child show buffer. It\r
+-is used to try and close the message pane when quitting tree or\r
+-the child show buffer.")\r
++is used to try and close the message pane when quitting tree view\r
++or the child show buffer.")\r
+ (make-variable-buffer-local 'notmuch-tree-message-window)\r
+ (put 'notmuch-tree-message-window 'permanent-local t)\r
\r
+@@ -252,7 +252,7 @@ FUNC."\r
+     (define-key map "R" (notmuch-tree-close-message-pane-and #'notmuch-show-reply))\r
+     (define-key map "V" (notmuch-tree-close-message-pane-and #'notmuch-show-view-raw-message))\r
\r
+-    ;; The main tree bindings\r
++    ;; The main tree view bindings\r
+     (define-key map (kbd "RET") 'notmuch-tree-show-message)\r
+     (define-key map [mouse-1] 'notmuch-tree-show-message)\r
+     (define-key map "x" 'notmuch-tree-quit)\r
+@@ -287,7 +287,7 @@ Some useful entries are:\r
+ ;; XXX This should really be a lib function but we are trying to\r
+ ;; reduce impact on the code base.\r
+ (defun notmuch-show-get-prop (prop &optional props)\r
+-  "This is a tree overridden version of notmuch-show-get-prop\r
++  "This is a tree view overridden version of notmuch-show-get-prop\r
\r
+ It gets property PROP from PROPS or, if PROPS is nil, the current\r
+ message in either tree or show. This means that several functions\r
+@@ -391,10 +391,10 @@ Does NOT change the database."\r
+    (list (notmuch-read-tag-changes (notmuch-tree-get-tags) "Tag message" "-")))\r
+   (notmuch-tree-tag tag-changes))\r
\r
+-;; The next two functions close the message window before searching or\r
+-;; treeing but they do so after the user has entered the query (in\r
+-;; case the user was basing the query on something in the message\r
+-;; window).\r
++;; The next two functions close the message window before calling\r
++;; notmuch-search or notmuch-tree but they do so after the user has\r
++;; entered the query (in case the user was basing the query on\r
++;; something in the message window).\r
\r
+ (defun notmuch-tree-to-search ()\r
+   "Run \"notmuch search\" with the given `query' and display results."\r
+@@ -404,9 +404,9 @@ Does NOT change the database."\r
+     (notmuch-search query)))\r
\r
+ (defun notmuch-tree-to-tree ()\r
+-  "Run a query and display results in experimental notmuch-tree mode"\r
++  "Run a query and display results in Tree view"\r
+   (interactive)\r
+-  (let ((query (notmuch-read-query "Notmuch tree: ")))\r
++  (let ((query (notmuch-read-query "Notmuch tree view search: ")))\r
+     (notmuch-tree-close-message-window)\r
+     (notmuch-tree query)))\r
\r
+@@ -856,7 +856,7 @@ Complete list of currently available key bindings:\r
+                     (atbob (bobp)))\r
+                 (goto-char (point-max))\r
+                 (if (eq status 'signal)\r
+-                    (insert "Incomplete search results (tree process was killed).\n"))\r
++                    (insert "Incomplete search results (tree view process was killed).\n"))\r
+                 (when (eq status 'exit)\r
+                   (insert "End of search results.")\r
+                   (unless (= exit-status 0)\r
+@@ -864,7 +864,7 @@ Complete list of currently available key bindings:\r
+                   (insert "\n")))))))))\r
\r
+ (defun notmuch-tree-process-filter (proc string)\r
+-  "Process and filter the output of \"notmuch show\" (for tree)"\r
++  "Process and filter the output of \"notmuch show\" for tree view"\r
+   (let ((results-buf (process-buffer proc))\r
+         (parse-buf (process-get proc 'parse-buf))\r
+         (inhibit-read-only t)\r
+@@ -880,7 +880,7 @@ Complete list of currently available key bindings:\r
+                                        results-buf)))))\r
\r
+ (defun notmuch-tree-worker (basic-query &optional query-context target open-target)\r
+-  "Insert the actual tree search in the current buffer.\r
++  "Insert the tree view of the search in the current buffer.\r
\r
+ This is is a helper function for notmuch-tree. The arguments are\r
+ the same as for the function notmuch-tree."\r
+@@ -921,13 +921,13 @@ The arguments are:\r
+       is QUERY and QUERY-CONTEXT unless that does not match any messages\r
+       in which case we fall back to just QUERY.\r
+   TARGET: A message ID (with the id: prefix) that will be made\r
+-      current if it appears in the tree results.\r
+-  BUFFER-NAME: the name of the buffer to show the tree tree. If\r
++      current if it appears in the tree view results.\r
++  BUFFER-NAME: the name of the buffer to display the tree view. If\r
+       it is nil \"*notmuch-tree\" followed by QUERY is used.\r
+   OPEN-TARGET: If TRUE open the target message in the message pane."\r
+   (interactive)\r
+   (if (null query)\r
+-      (setq query (notmuch-read-query "Notmuch tree: ")))\r
++      (setq query (notmuch-read-query "Notmuch tree view search: ")))\r
+   (let ((buffer (get-buffer-create (generate-new-buffer-name\r
+                                   (or buffer-name\r
+                                       (concat "*notmuch-tree-" query "*")))))\r
+-- \r
+1.7.9.1\r
+\r
+\r
+\r