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 C1C9F414687 for ; Sun, 8 Jan 2012 11:09:12 -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 P3GcS8O-mlAe for ; Sun, 8 Jan 2012 11:09: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 5E9DE414680 for ; Sun, 8 Jan 2012 11:09:12 -0800 (PST) Received: from fire-doxen.imss.caltech.edu (localhost [127.0.0.1]) by fire-doxen-postvirus (Postfix) with ESMTP id CE4252E50D7C for ; Sun, 8 Jan 2012 11:09:11 -0800 (PST) X-Spam-Scanned: at Caltech-IMSS on fire-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 fire-doxen-submit (Postfix) with ESMTP id 8CFCF2E50D74 for ; Sun, 8 Jan 2012 11:09:09 -0800 (PST) Received: by finestructure.net (Postfix, from userid 1000) id 3806DA4A; Sun, 8 Jan 2012 11:09:09 -0800 (PST) From: Jameson Graef Rollins To: Notmuch Mail Subject: [PATCH 1/4 v2] emacs: add show-mode functions to archive/delete only current message Date: Sun, 8 Jan 2012 11:09:09 -0800 Message-Id: <1326049749-19899-1-git-send-email-jrollins@finestructure.net> X-Mailer: git-send-email 1.7.7.3 In-Reply-To: <1325986015-22510-2-git-send-email-jrollins@finestructure.net> References: <1325986015-22510-2-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 19:09:12 -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. --- Sorry, there were some errant extra parens at the end of these function definitions. 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..b2e7829 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