"snoozing" with notmuch?
[notmuch-archives.git] / de / 9ac315e677257ec73383fed1adb5486894cb6f
1 Return-Path: <jrollins@finestructure.net>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id 73B6040DDEB\r
6         for <notmuch@notmuchmail.org>; Fri, 12 Nov 2010 08:00:48 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -1.9\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5\r
12         tests=[BAYES_00=-1.9] autolearn=ham\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id yJNJgWsAlSvg for <notmuch@notmuchmail.org>;\r
16         Fri, 12 Nov 2010 08:00:38 -0800 (PST)\r
17 Received: from tarap.cc.columbia.edu (tarap.cc.columbia.edu [128.59.29.7])\r
18         by olra.theworths.org (Postfix) with ESMTP id 152F640DDE4\r
19         for <notmuch@notmuchmail.org>; Fri, 12 Nov 2010 08:00:38 -0800 (PST)\r
20 Received: from servo.finestructure.net (cpe-74-66-82-137.nyc.res.rr.com\r
21         [74.66.82.137])\r
22         (user=jgr2110 author=jrollins@finestructure.net mech=PLAIN bits=0)\r
23         by tarap.cc.columbia.edu (8.14.4/8.14.3) with ESMTP id oACG0YDV026154\r
24         (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT)\r
25         for <notmuch@notmuchmail.org>; Fri, 12 Nov 2010 11:00:37 -0500 (EST)\r
26 Received: from jrollins by servo.finestructure.net with local (Exim 4.72)\r
27         (envelope-from <jrollins@finestructure.net>) id 1PGw3G-0007qJ-Bz\r
28         for notmuch@notmuchmail.org; Fri, 12 Nov 2010 11:00:34 -0500\r
29 From: Jameson Rollins <jrollins@finestructure.net>\r
30 To: Notmuch Mail <notmuch@notmuchmail.org>\r
31 Subject: [PATCH] emacs: remove thread archiving from show-advance function\r
32 Date: Fri, 12 Nov 2010 10:57:53 -0500\r
33 Message-ID: <87eiaqwmzh.fsf@servo.finestructure.net>\r
34 MIME-Version: 1.0\r
35 Content-Type: text/plain; charset=us-ascii\r
36 X-No-Spam-Score: Local\r
37 X-Scanned-By: MIMEDefang 2.68 on 128.59.29.7\r
38 X-BeenThere: notmuch@notmuchmail.org\r
39 X-Mailman-Version: 2.1.13\r
40 Precedence: list\r
41 List-Id: "Use and development of the notmuch mail system."\r
42         <notmuch.notmuchmail.org>\r
43 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
44         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
45 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
46 List-Post: <mailto:notmuch@notmuchmail.org>\r
47 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
48 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
49         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
50 X-List-Received-Date: Fri, 12 Nov 2010 16:00:48 -0000\r
51 \r
52 I believe it's important to have a function to scroll through open\r
53 messages in the currently viewed thread, and ' ' is the most logical\r
54 keybinding for that.  However, the current function is far too\r
55 agressive in automatically archiving the thread and moving to the next thread\r
56 when getting to the end of the current thread.  This patch changes this\r
57 function to just stop when it gets to the end of the thread, thereby\r
58 giving the user a chance to act on the thread how they wish.\r
59 ---\r
60  emacs/notmuch-show.el |   32 ++++++++++----------------------\r
61  1 files changed, 10 insertions(+), 22 deletions(-)\r
62 \r
63 diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
64 index d8773e6..b89b685 100644\r
65 --- a/emacs/notmuch-show.el\r
66 +++ b/emacs/notmuch-show.el\r
67 @@ -597,7 +597,7 @@ function is used. "\r
68         (define-key map "n" 'notmuch-show-next-open-message)\r
69         (define-key map "p" 'notmuch-show-previous-open-message)\r
70         (define-key map (kbd "DEL") 'notmuch-show-rewind)\r
71 -       (define-key map " " 'notmuch-show-advance-and-archive)\r
72 +       (define-key map " " 'notmuch-show-advance)\r
73         (define-key map (kbd "M-RET") 'notmuch-show-open-or-close-all)\r
74         (define-key map (kbd "RET") 'notmuch-show-toggle-message)\r
75         map)\r
76 @@ -617,14 +617,12 @@ pressing RET after positioning the cursor on a hidden part, (for\r
77  which \\[notmuch-show-next-button] and \\[notmuch-show-previous-button] are helpful).\r
78  \r
79  Reading the thread sequentially is well-supported by pressing\r
80 -\\[notmuch-show-advance-and-archive]. This will scroll the current message (if necessary), advance\r
81 -to the next message, or advance to the next thread (if already on\r
82 -the last message of a thread).\r
83 +\\[notmuch-show-advance]. This will scroll the current message (if necessary), advance\r
84 +to the next message.\r
85  \r
86  Other commands are available to read or manipulate the thread\r
87  more selectively, (such as '\\[notmuch-show-next-message]' and '\\[notmuch-show-previous-message]' to advance to messages\r
88 -without removing any tags, and '\\[notmuch-show-archive-thread]' to archive an entire thread\r
89 -without scrolling through with \\[notmuch-show-advance-and-archive]).\r
90 +without removing any tags, and '\\[notmuch-show-archive-thread]' to archive an entire thread.\r
91  \r
92  You can add or remove arbitary tags from the current message with\r
93  '\\[notmuch-show-add-tag]' or '\\[notmuch-show-remove-tag]'.\r
94 @@ -809,8 +807,8 @@ All currently available key bindings:\r
95  \r
96  ;; Commands typically bound to keys.\r
97  \r
98 -(defun notmuch-show-advance-and-archive ()\r
99 -  "Advance through thread and archive.\r
100 +(defun notmuch-show-advance ()\r
101 +  "Advance through thread.\r
102  \r
103  This command is intended to be one of the simplest ways to\r
104  process a thread of email. It does the following:\r
105 @@ -819,13 +817,7 @@ If the current message in the thread is not yet fully visible,\r
106  scroll by a near screenful to read more of the message.\r
107  \r
108  Otherwise, (the end of the current message is already within the\r
109 -current window), advance to the next open message.\r
110 -\r
111 -Finally, if there is no further message to advance to, and this\r
112 -last message is already read, then archive the entire current\r
113 -thread, (remove the \"inbox\" tag from each message). Also kill\r
114 -this buffer, and display the next thread from the search from\r
115 -which this thread was originally shown."\r
116 +current window), advance to the next open message."\r
117    (interactive)\r
118    (let ((end-of-this-message (notmuch-show-message-bottom)))\r
119      (cond\r
120 @@ -843,14 +835,10 @@ which this thread was originally shown."\r
121  \r
122       ((not (= end-of-this-message (point-max)))\r
123        ;; This is not the last message - move to the next visible one.\r
124 -      (notmuch-show-next-open-message))\r
125 -\r
126 -     (t\r
127 -      ;; This is the last message - archive the thread.\r
128 -      (notmuch-show-archive-thread)))))\r
129 +      (notmuch-show-next-open-message)))))\r
130  \r
131  (defun notmuch-show-rewind ()\r
132 -  "Backup through the thread, (reverse scrolling compared to \\[notmuch-show-advance-and-archive]).\r
133 +  "Backup through the thread, (reverse scrolling compared to \\[notmuch-show-advance]).\r
134  \r
135  Specifically, if the beginning of the previous email is fewer\r
136  than `window-height' lines from the current point, move to it\r
137 @@ -860,7 +848,7 @@ Otherwise, just scroll down a screenful of the current message.\r
138  \r
139  This command does not modify any message tags, (it does not undo\r
140  any effects from previous calls to\r
141 -`notmuch-show-advance-and-archive'."\r
142 +`notmuch-show-advance'."\r
143    (interactive)\r
144    (let ((start-of-message (notmuch-show-message-top))\r
145         (start-of-window (window-start)))\r
146 -- \r
147 1.7.2.3\r
148 \r