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