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 E3E6B40AD7A for ; Sat, 7 Jan 2012 17:27:14 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -2.3 X-Spam-Level: X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_MED=-2.3] 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 kGSKWfqB3fA2 for ; Sat, 7 Jan 2012 17:27:12 -0800 (PST) Received: from outgoing-mail.its.caltech.edu (outgoing-mail.its.caltech.edu [131.215.239.19]) by olra.theworths.org (Postfix) with ESMTP id 88AF340F1D5 for ; Sat, 7 Jan 2012 17:27:05 -0800 (PST) Received: from earth-doxen.imss.caltech.edu (localhost [127.0.0.1]) by earth-doxen-postvirus (Postfix) with ESMTP id 1527A66E00B6 for ; Sat, 7 Jan 2012 17:27:05 -0800 (PST) X-Spam-Scanned: at Caltech-IMSS on earth-doxen by amavisd-new Received: from finestructure.net (cpe-76-174-137-84.socal.res.rr.com [76.174.137.84]) (Authenticated sender: jrollins) by earth-doxen-submit (Postfix) with ESMTP id 0D32D66E00E2 for ; Sat, 7 Jan 2012 17:26:59 -0800 (PST) Received: by finestructure.net (Postfix, from userid 1000) id 78E4829C; Sat, 7 Jan 2012 17:26:58 -0800 (PST) From: Jameson Graef Rollins To: Notmuch Mail Subject: [PATCH 1/4] emacs: add show-mode functions to archive/delete only current message Date: Sat, 7 Jan 2012 17:26:52 -0800 Message-Id: <1325986015-22510-2-git-send-email-jrollins@finestructure.net> X-Mailer: git-send-email 1.7.7.3 In-Reply-To: <1325986015-22510-1-git-send-email-jrollins@finestructure.net> References: <1325975294-646-4-git-send-email-jrollins@finestructure.net> <1325986015-22510-1-git-send-email-jrollins@finestructure.net> 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: Sun, 08 Jan 2012 01:27:15 -0000 This adds two new function, notmuch-show-{archive,delete}-message, that archive/delete the current message, and then move to the next open one. --- emacs/notmuch-show.el | 24 ++++++++++++++++++++++++ 1 files changed, 24 insertions(+), 0 deletions(-) diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index e1d15f4..8bb052e 100644 --- a/emacs/notmuch-show.el +++ b/emacs/notmuch-show.el @@ -1436,6 +1436,18 @@ argument, hide all of the messages." (if show-next (notmuch-search-show-thread))))))) +(defun notmuch-show-archive-message () + "Archive the current message and advance. + +After the last message is reached, either the buffer will be +closed and the cursor will move to the search result if +available, or the cursor will move to the end of the current +thread. +" + (interactive) + (notmuch-show-remove-tag "inbox") + (notmuch-show-next-open-message))) + (defun notmuch-show-archive-thread () "Archive each message in thread, then show next thread from search. @@ -1455,6 +1467,18 @@ buffer." (interactive) (notmuch-show-tag-thread-internal "-" "inbox" nil)) +(defun notmuch-show-delete-message () + "Delete the current message and advance. + +After the last message is reached, either the buffer will be +closed and the cursor will move to the search result if +available, or the cursor will move to the end of the current +thread. +" + (interactive) + (notmuch-show-add-tag "deleted") + (notmuch-show-next-open-message))) + (defun notmuch-show-delete-thread () "Delete each message in thread, then show next thread from search. -- 1.7.7.3