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 78BD4418C33 for ; Tue, 24 Jan 2012 16:06:41 -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 rCxCObicFjcN for ; Tue, 24 Jan 2012 16:06:40 -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 B95AC429E3A for ; Tue, 24 Jan 2012 16:06:32 -0800 (PST) Received: from fire-doxen.imss.caltech.edu (localhost [127.0.0.1]) by fire-doxen-postvirus (Postfix) with ESMTP id 28A7332803F for ; Tue, 24 Jan 2012 16:06:30 -0800 (PST) X-Spam-Scanned: at Caltech-IMSS on fire-doxen by amavisd-new Received: from finestructure.net (DHCP-123-180.caltech.edu [131.215.123.180]) (Authenticated sender: jrollins) by fire-doxen-submit (Postfix) with ESMTP id E05E3328051 for ; Tue, 24 Jan 2012 16:06:27 -0800 (PST) Received: by finestructure.net (Postfix, from userid 1000) id D8BD532B; Tue, 24 Jan 2012 16:06:27 -0800 (PST) From: Jameson Graef Rollins To: Notmuch Mail Subject: [PATCH v3 4/8] emacs: add message archiving functions Date: Tue, 24 Jan 2012 16:06:19 -0800 Message-Id: <1327449983-23638-5-git-send-email-jrollins@finestructure.net> X-Mailer: git-send-email 1.7.8.3 In-Reply-To: <1327449983-23638-4-git-send-email-jrollins@finestructure.net> References: <87pqea24z0.fsf@servo.finestructure.net> <1327449983-23638-1-git-send-email-jrollins@finestructure.net> <1327449983-23638-2-git-send-email-jrollins@finestructure.net> <1327449983-23638-3-git-send-email-jrollins@finestructure.net> <1327449983-23638-4-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: Wed, 25 Jan 2012 00:06:41 -0000 This adds two new message archiving functions that parallel the thread archiving functions: notmuch-show-archive-message{,-then-next}. The former also takes a prefix argument to unarchive the message (ie. put back in inbox). --- emacs/notmuch-show.el | 17 +++++++++++++++++ 1 files changed, 17 insertions(+), 0 deletions(-) diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index 071e662..0dc594b 100644 --- a/emacs/notmuch-show.el +++ b/emacs/notmuch-show.el @@ -1590,6 +1590,23 @@ buffer." (notmuch-show-archive-thread) (notmuch-show-next-thread)) +(defun notmuch-show-archive-message (&optional unarchive) + "Archive the current message. + +If a prefix argument is given, the message will be +\"unarchived\" (ie. the \"inbox\" tag will be added instead of +removed)." + (interactive "P") + (if unarchive + (notmuch-show-add-tag "inbox") + (notmuch-show-remove-tag "inbox"))) + +(defun notmuch-show-archive-message-then-next () + "Archive the current message, then show the next open message in the current thread." + (interactive) + (notmuch-show-archive-message) + (notmuch-show-next-open-message)) + (defun notmuch-show-stash-cc () "Copy CC field of current message to kill-ring." (interactive) -- 1.7.8.3