unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Jameson Rollins <jrollins@finestructure.net>
To: Notmuch Mail <notmuch@notmuchmail.org>
Subject: [PATCH] remove message archiving from show-advance-and-archive
Date: Wed, 9 Jun 2010 10:49:43 -0400	[thread overview]
Message-ID: <87zkz4xnf4.fsf@servo.finestructure.net> (raw)

[-- Attachment #1: Type: text/plain, Size: 4293 bytes --]

The function to advance through threads with the space bar is useful.
However, the current implementation also archives messages.  The idea
of archiving a message should not be intertwined with the processes of
advancing through messages to read them.  Archiving in general should
be a separate operation that one does explicitly.  This patch just
renames the advance function "notmuch-show-advance", and removes the
archiving of a thread when the end of the thread is reached.
---
 emacs/notmuch-show.el |   27 +++++++++++----------------
 1 files changed, 11 insertions(+), 16 deletions(-)

diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index f872cdf..b0c1f63 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -579,7 +579,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)
@@ -601,7 +601,7 @@ 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
+\\[notmuch-show-advance]. 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).
@@ -611,7 +611,7 @@ 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]).
+\\[notmuch-show-advance]).
 
 You can add or remove arbitary tags from the current message with
 '\\[notmuch-show-add-tag]' or '\\[notmuch-show-remove-tag]'.
@@ -780,8 +780,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 threads.
 
 This command is intended to be one of the simplest ways to
 process a thread of email. It does the following:
@@ -793,10 +793,9 @@ 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."
+last message is already read. Also kill this buffer, and display
+the next thread from the search from which this thread was
+originally shown."
   (interactive)
   (let ((end-of-this-message (notmuch-show-message-bottom)))
     (cond
@@ -814,14 +813,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
@@ -831,7 +826,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.1

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

             reply	other threads:[~2010-06-09 14:59 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-09 14:49 Jameson Rollins [this message]
2010-06-09 15:12 ` [PATCH] remove message archiving from show-advance-and-archive David Edmondson
2010-06-09 15:25   ` Jameson Rollins
2010-06-09 15:36     ` David Edmondson
2010-06-09 15:55       ` Jameson Rollins
2010-06-09 17:18         ` David Edmondson
2010-06-09 17:29           ` Jameson Rollins
2010-06-09 17:47             ` David Edmondson
2010-06-09 17:54         ` Carl Worth
2010-06-09 19:07           ` servilio
2010-06-09 19:11           ` Jameson Rollins
2010-06-09 17:50 ` Carl Worth
2010-06-09 18:20   ` Dirk Hohndel
2010-06-09 19:12     ` servilio
2010-06-09 19:20     ` Jameson Rollins
2010-06-09 19:33       ` Carl Worth
2010-06-15  9:25     ` Sebastian Spaeth
2010-06-09 19:04   ` servilio
2010-06-09 19:18   ` Jameson Rollins
2010-06-09 19:55   ` Michal Sojka
2010-06-15  9:21   ` Sebastian Spaeth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zkz4xnf4.fsf@servo.finestructure.net \
    --to=jrollins@finestructure.net \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).