[PATCH] emacs: remove thread archiving from show-advance function

2010-11-12 Thread David Edmondson
On Fri, 12 Nov 2010 10:57:53 -0500, Jameson Rollins  wrote:
> I believe it's important to have a function to scroll through open
> messages in the currently viewed thread, and ' ' is the most logical
> keybinding for that.  However, the current function is far too
> agressive in automatically archiving the thread and moving to the next
> thread when getting to the end of the current thread.  This patch
> changes this function to just stop when it gets to the end of the
> thread, thereby giving the user a chance to act on the thread how they
> wish.

Whether space moves to the next thread should be configurable, I
think. Similarly whether or not it archives the thread. I'm not worried
about which is the default behaviour.

dme.
-- 
David Edmondson, http://dme.org


[PATCH] emacs: remove thread archiving from show-advance function

2010-11-12 Thread Jameson Rollins
On Fri, 12 Nov 2010 17:12:18 +, David Edmondson  wrote:
> Whether space moves to the next thread should be configurable, I
> think. Similarly whether or not it archives the thread. I'm not worried
> about which is the default behaviour.

Hey, David.  I thought about that, but decided I'd go ahead and submit
this patch to see what kind of reaction it got.  I'm a little surprised
that anyone would actually like the current behavior, but to each their
own!  I'll look into making it a config option when I get the chance.

jamie.
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: 



[PATCH] emacs: remove thread archiving from show-advance function

2010-11-12 Thread Jameson Rollins
I believe it's important to have a function to scroll through open
messages in the currently viewed thread, and ' ' is the most logical
keybinding for that.  However, the current function is far too
agressive in automatically archiving the thread and moving to the next thread
when getting to the end of the current thread.  This patch changes this
function to just stop when it gets to the end of the thread, thereby
giving the user a chance to act on the thread how they wish.
---
 emacs/notmuch-show.el |   32 ++--
 1 files changed, 10 insertions(+), 22 deletions(-)

diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index d8773e6..b89b685 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -597,7 +597,7 @@ function is used. "
(define-key map "n" 'notmuch-show-next-open-message)
(define-key map "p" 'notmuch-show-previous-open-message)
(define-key map (kbd "DEL") 'notmuch-show-rewind)
-   (define-key map " " 'notmuch-show-advance-and-archive)
+   (define-key map " " 'notmuch-show-advance)
(define-key map (kbd "M-RET") 'notmuch-show-open-or-close-all)
(define-key map (kbd "RET") 'notmuch-show-toggle-message)
map)
@@ -617,14 +617,12 @@ pressing RET after positioning the cursor on a hidden 
part, (for
 which \\[notmuch-show-next-button] and \\[notmuch-show-previous-button] are 
helpful).

 Reading the thread sequentially is well-supported by pressing
-\\[notmuch-show-advance-and-archive]. This will scroll the current message (if 
necessary), advance
-to the next message, or advance to the next thread (if already on
-the last message of a thread).
+\\[notmuch-show-advance]. This will scroll the current message (if necessary), 
advance
+to the next message.

 Other commands are available to read or manipulate the thread
 more selectively, (such as '\\[notmuch-show-next-message]' and 
'\\[notmuch-show-previous-message]' to advance to messages
-without removing any tags, and '\\[notmuch-show-archive-thread]' to archive an 
entire thread
-without scrolling through with \\[notmuch-show-advance-and-archive]).
+without removing any tags, and '\\[notmuch-show-archive-thread]' to archive an 
entire thread.

 You can add or remove arbitary tags from the current message with
 '\\[notmuch-show-add-tag]' or '\\[notmuch-show-remove-tag]'.
@@ -809,8 +807,8 @@ All currently available key bindings:

 ;; Commands typically bound to keys.

-(defun notmuch-show-advance-and-archive ()
-  "Advance through thread and archive.
+(defun notmuch-show-advance ()
+  "Advance through thread.

 This command is intended to be one of the simplest ways to
 process a thread of email. It does the following:
@@ -819,13 +817,7 @@ If the current message in the thread is not yet fully 
visible,
 scroll by a near screenful to read more of the message.

 Otherwise, (the end of the current message is already within the
-current window), advance to the next open message.
-
-Finally, if there is no further message to advance to, and this
-last message is already read, then archive the entire current
-thread, (remove the \"inbox\" tag from each message). Also kill
-this buffer, and display the next thread from the search from
-which this thread was originally shown."
+current window), advance to the next open message."
   (interactive)
   (let ((end-of-this-message (notmuch-show-message-bottom)))
 (cond
@@ -843,14 +835,10 @@ which this thread was originally shown."

  ((not (= end-of-this-message (point-max)))
   ;; This is not the last message - move to the next visible one.
-  (notmuch-show-next-open-message))
-
- (t
-  ;; This is the last message - archive the thread.
-  (notmuch-show-archive-thread)
+  (notmuch-show-next-open-message)

 (defun notmuch-show-rewind ()
-  "Backup through the thread, (reverse scrolling compared to 
\\[notmuch-show-advance-and-archive]).
+  "Backup through the thread, (reverse scrolling compared to 
\\[notmuch-show-advance]).

 Specifically, if the beginning of the previous email is fewer
 than `window-height' lines from the current point, move to it
@@ -860,7 +848,7 @@ Otherwise, just scroll down a screenful of the current 
message.

 This command does not modify any message tags, (it does not undo
 any effects from previous calls to
-`notmuch-show-advance-and-archive'."
+`notmuch-show-advance'."
   (interactive)
   (let ((start-of-message (notmuch-show-message-top))
(start-of-window (window-start)))
-- 
1.7.2.3



[PATCH] emacs: remove thread archiving from show-advance function

2010-11-12 Thread Jameson Rollins
I believe it's important to have a function to scroll through open
messages in the currently viewed thread, and ' ' is the most logical
keybinding for that.  However, the current function is far too
agressive in automatically archiving the thread and moving to the next thread
when getting to the end of the current thread.  This patch changes this
function to just stop when it gets to the end of the thread, thereby
giving the user a chance to act on the thread how they wish.
---
 emacs/notmuch-show.el |   32 ++--
 1 files changed, 10 insertions(+), 22 deletions(-)

diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index d8773e6..b89b685 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -597,7 +597,7 @@ function is used. 
(define-key map n 'notmuch-show-next-open-message)
(define-key map p 'notmuch-show-previous-open-message)
(define-key map (kbd DEL) 'notmuch-show-rewind)
-   (define-key map   'notmuch-show-advance-and-archive)
+   (define-key map   'notmuch-show-advance)
(define-key map (kbd M-RET) 'notmuch-show-open-or-close-all)
(define-key map (kbd RET) 'notmuch-show-toggle-message)
map)
@@ -617,14 +617,12 @@ pressing RET after positioning the cursor on a hidden 
part, (for
 which \\[notmuch-show-next-button] and \\[notmuch-show-previous-button] are 
helpful).
 
 Reading the thread sequentially is well-supported by pressing
-\\[notmuch-show-advance-and-archive]. This will scroll the current message (if 
necessary), advance
-to the next message, or advance to the next thread (if already on
-the last message of a thread).
+\\[notmuch-show-advance]. This will scroll the current message (if necessary), 
advance
+to the next message.
 
 Other commands are available to read or manipulate the thread
 more selectively, (such as '\\[notmuch-show-next-message]' and 
'\\[notmuch-show-previous-message]' to advance to messages
-without removing any tags, and '\\[notmuch-show-archive-thread]' to archive an 
entire thread
-without scrolling through with \\[notmuch-show-advance-and-archive]).
+without removing any tags, and '\\[notmuch-show-archive-thread]' to archive an 
entire thread.
 
 You can add or remove arbitary tags from the current message with
 '\\[notmuch-show-add-tag]' or '\\[notmuch-show-remove-tag]'.
@@ -809,8 +807,8 @@ All currently available key bindings:
 
 ;; Commands typically bound to keys.
 
-(defun notmuch-show-advance-and-archive ()
-  Advance through thread and archive.
+(defun notmuch-show-advance ()
+  Advance through thread.
 
 This command is intended to be one of the simplest ways to
 process a thread of email. It does the following:
@@ -819,13 +817,7 @@ If the current message in the thread is not yet fully 
visible,
 scroll by a near screenful to read more of the message.
 
 Otherwise, (the end of the current message is already within the
-current window), advance to the next open message.
-
-Finally, if there is no further message to advance to, and this
-last message is already read, then archive the entire current
-thread, (remove the \inbox\ tag from each message). Also kill
-this buffer, and display the next thread from the search from
-which this thread was originally shown.
+current window), advance to the next open message.
   (interactive)
   (let ((end-of-this-message (notmuch-show-message-bottom)))
 (cond
@@ -843,14 +835,10 @@ which this thread was originally shown.
 
  ((not (= end-of-this-message (point-max)))
   ;; This is not the last message - move to the next visible one.
-  (notmuch-show-next-open-message))
-
- (t
-  ;; This is the last message - archive the thread.
-  (notmuch-show-archive-thread)
+  (notmuch-show-next-open-message)
 
 (defun notmuch-show-rewind ()
-  Backup through the thread, (reverse scrolling compared to 
\\[notmuch-show-advance-and-archive]).
+  Backup through the thread, (reverse scrolling compared to 
\\[notmuch-show-advance]).
 
 Specifically, if the beginning of the previous email is fewer
 than `window-height' lines from the current point, move to it
@@ -860,7 +848,7 @@ Otherwise, just scroll down a screenful of the current 
message.
 
 This command does not modify any message tags, (it does not undo
 any effects from previous calls to
-`notmuch-show-advance-and-archive'.
+`notmuch-show-advance'.
   (interactive)
   (let ((start-of-message (notmuch-show-message-top))
(start-of-window (window-start)))
-- 
1.7.2.3

___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: [PATCH] emacs: remove thread archiving from show-advance function

2010-11-12 Thread David Edmondson
On Fri, 12 Nov 2010 10:57:53 -0500, Jameson Rollins 
jroll...@finestructure.net wrote:
 I believe it's important to have a function to scroll through open
 messages in the currently viewed thread, and ' ' is the most logical
 keybinding for that.  However, the current function is far too
 agressive in automatically archiving the thread and moving to the next
 thread when getting to the end of the current thread.  This patch
 changes this function to just stop when it gets to the end of the
 thread, thereby giving the user a chance to act on the thread how they
 wish.

Whether space moves to the next thread should be configurable, I
think. Similarly whether or not it archives the thread. I'm not worried
about which is the default behaviour.

dme.
-- 
David Edmondson, http://dme.org
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: [PATCH] emacs: remove thread archiving from show-advance function

2010-11-12 Thread Jameson Rollins
On Fri, 12 Nov 2010 17:12:18 +, David Edmondson d...@dme.org wrote:
 Whether space moves to the next thread should be configurable, I
 think. Similarly whether or not it archives the thread. I'm not worried
 about which is the default behaviour.

Hey, David.  I thought about that, but decided I'd go ahead and submit
this patch to see what kind of reaction it got.  I'm a little surprised
that anyone would actually like the current behavior, but to each their
own!  I'll look into making it a config option when I get the chance.

jamie.


pgpFJcH1m4MGd.pgp
Description: PGP signature
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch