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 65B6C4196F0 for ; Wed, 9 Jun 2010 07:59:13 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -2.02 X-Spam-Level: X-Spam-Status: No, score=-2.02 tagged_above=-999 required=5 tests=[BAYES_05=-0.5, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_SORBS_WEB=0.77, T_MIME_NO_TEXT=0.01] autolearn=ham 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 jGWZNNdiw3zh for ; Wed, 9 Jun 2010 07:59:01 -0700 (PDT) Received: from brinza.cc.columbia.edu (brinza.cc.columbia.edu [128.59.29.8]) by olra.theworths.org (Postfix) with ESMTP id B7840431FC1 for ; Wed, 9 Jun 2010 07:59:01 -0700 (PDT) Received: from servo.finestructure.net (NYUFGA-GUESTS-01.NATPOOL.NYU.EDU [192.76.177.124]) (user=jgr2110 author=jrollins@finestructure.net mech=PLAIN bits=0) by brinza.cc.columbia.edu (8.14.3/8.14.3) with ESMTP id o59EwxZg001720 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT) for ; Wed, 9 Jun 2010 10:59:00 -0400 (EDT) Received: from jrollins by servo.finestructure.net with local (Exim 4.71) (envelope-from ) id 1OMMk7-0006nL-C5 for notmuch@notmuchmail.org; Wed, 09 Jun 2010 10:58:59 -0400 From: Jameson Rollins To: Notmuch Mail Subject: [PATCH] remove message archiving from show-advance-and-archive Date: Wed, 9 Jun 2010 10:49:43 -0400 Message-ID: <87zkz4xnf4.fsf@servo.finestructure.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-No-Spam-Score: Local X-Scanned-By: MIMEDefang 2.68 on 128.59.29.8 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: Wed, 09 Jun 2010 14:59:13 -0000 --=-=-= Content-Transfer-Encoding: quoted-printable 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. =2D-- 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 =2D-- 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) =2D (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). =20 Reading the thread sequentially is well-supported by pressing =2D\\[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-messag= e]' 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 =2D\\[notmuch-show-advance-and-archive]). +\\[notmuch-show-advance]). =20 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: =20 ;; Commands typically bound to keys. =20 =2D(defun notmuch-show-advance-and-archive () =2D "Advance through thread and archive. +(defun notmuch-show-advance () + "Advance through threads. =20 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. =20 Finally, if there is no further message to advance to, and this =2Dlast message is already read, then archive the entire current =2Dthread, (remove the \"inbox\" tag from each message). Also kill =2Dthis buffer, and display the next thread from the search from =2Dwhich 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." =20 ((not (=3D end-of-this-message (point-max))) ;; This is not the last message - move to the next visible one. =2D (notmuch-show-next-open-message)) =2D =2D (t =2D ;; This is the last message - archive the thread. =2D (notmuch-show-archive-thread))))) + (notmuch-show-next-open-message))))) =20 (defun notmuch-show-rewind () =2D "Backup through the thread, (reverse scrolling compared to \\[notmuch-= show-advance-and-archive]). + "Backup through the thread, (reverse scrolling compared to \\[notmuch-sh= ow-advance]). =20 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. =20 This command does not modify any message tags, (it does not undo any effects from previous calls to =2D`notmuch-show-advance-and-archive'." +`notmuch-show-advance'." (interactive) (let ((start-of-message (notmuch-show-message-top)) (start-of-window (window-start))) =2D-=20 1.7.1 --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iQIcBAEBCAAGBQJMD6wwAAoJEO00zqvie6q8HVcP/0eBMxSezr3cKXzhl96U78rB DW8FBE5sVrQ6JhijHcNJqi2IO8/vn0OKQvmnUm43rXEC2CfoNF6pzi6EeJBPouII eZ+3GuTazxlmFdYCN4hNBn0HDd/oflhNQHAX7zhXv7FqfeabTa5EawZeJct7hj6a lst8Ekmirz/ixisQBuT1BdmssDbS3JwlQeRyW63osddY6nKDa+65CsrLQ2Q+wJFq RbQG416Ljmm4E1ZlSg/Wn9rhUbUEyhPU8s4cl/gTYcD3O+fDUvFxrlitDZG/UGqP 2TNnuSlSiHfXmm7Gld/wUCCR2oQUT9tqphapyLakyDyquAr1sJ0GWMlJj88AIdMe hnjj2L49iAjlwmtCrVdFK7y+EuH8Zuy4CYVZbDBlHeo4vyAkBZ62Dwm9j3x3dgPW K0XdNRvdIf3bFclwaUD/h7jVT+C+Mso/FEVWZ+g4oZN/yq9C10XasfrBcvGl3Z/e 1wM6W+mgXK1wgPTxjdSL200vndx86uLua70vEk0PTHwvM1/uiwDTu9LTfch+Uc2i ZPnO1vaJV74yvZGr3UCrvRVvuwU7BWH2ura6SgJEdnIP9T/KPJMYOhjiVpp6IO/6 lFcMoYLsWNjvWejNfDN2/2LcIgPH0f1LmIv6+zVPoFbkgqfb0u3kaBZAeZ5v7ubt j/lY90f6oxVoNgdv+mz+ =6w/s -----END PGP SIGNATURE----- --=-=-=--