From: Mark Walters Date: Sat, 8 Dec 2012 12:41:34 +0000 (+0000) Subject: [PATCH] contrib: pick: archive message updated X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=93da9cdc7f923f99e17836ccf7ae2c0d9bda7b8e;p=notmuch-archives.git [PATCH] contrib: pick: archive message updated --- diff --git a/bf/930460c1f05d0cf6a4ecac229351bed89c0729 b/bf/930460c1f05d0cf6a4ecac229351bed89c0729 new file mode 100644 index 000000000..c116650e6 --- /dev/null +++ b/bf/930460c1f05d0cf6a4ecac229351bed89c0729 @@ -0,0 +1,119 @@ +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 649DB431FB6 + for ; Sat, 8 Dec 2012 04:41:44 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0.201 +X-Spam-Level: +X-Spam-Status: No, score=0.201 tagged_above=-999 required=5 + tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, + FREEMAIL_ENVFROM_END_DIGIT=1, FREEMAIL_FROM=0.001, + RCVD_IN_DNSWL_LOW=-0.7] 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 Fp+KwV2WsymI for ; + Sat, 8 Dec 2012 04:41:44 -0800 (PST) +Received: from mail-wi0-f175.google.com (mail-wi0-f175.google.com + [209.85.212.175]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id C07AC431FAE + for ; Sat, 8 Dec 2012 04:41:43 -0800 (PST) +Received: by mail-wi0-f175.google.com with SMTP id hm11so189982wib.2 + for ; Sat, 08 Dec 2012 04:41:42 -0800 (PST) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; + h=from:to:cc:subject:date:message-id:x-mailer; + bh=rxqrrypyOJaK5jqvzIsaaMIqLngIrTo3gr2sMXVaKao=; + b=xkhRMLL/jHUVGtpOO60zbaNfox64FUDmam5gBhaLg4TiCix22N4ZJQRq3OIGPBNiXc + UeHnYzQ9HbDEQ6y4OimsyhY+nHdy2J2O7Ngmj8TI9kbaTmyL0u/N/IBuYvFs6lYAv34n + +GyXRZhD/VQHJFI0WDMzor4s+Mv6qxYpdHbyyRVHfWyommXBg6v4G500rwZ42IQuy9qx + /r0/FIXuH25gw2lEgNXCZ4DwXHqaMyiYamzTD9vVZGTGWn9qdxIysBsd7IdUs+WhlhbU + FwVdRzJ4RED5ZUJSw+wfWD2JeF7WnidbUcn47aExpGn+lnqlqWLOmKTrkVJYDL7rWWO/ + jtFQ== +Received: by 10.216.220.35 with SMTP id n35mr3286540wep.128.1354970501178; + Sat, 08 Dec 2012 04:41:41 -0800 (PST) +Received: from localhost (93-97-24-31.zone5.bethere.co.uk. [93.97.24.31]) + by mx.google.com with ESMTPS id y3sm2032193wix.6.2012.12.08.04.41.39 + (version=TLSv1/SSLv3 cipher=OTHER); + Sat, 08 Dec 2012 04:41:40 -0800 (PST) +From: Mark Walters +To: notmuch@notmuchmail.org +Subject: [PATCH] contrib: pick: archive message updated +Date: Sat, 8 Dec 2012 12:41:34 +0000 +Message-Id: <1354970494-18050-1-git-send-email-markwalters1009@gmail.com> +X-Mailer: git-send-email 1.7.9.1 +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: Sat, 08 Dec 2012 12:41:44 -0000 + +Update pick's archive message to respect notmuch-archive-tags. Also +split archive message into an archiving part and a separate +"then-next" part, to move more inline with show. Update the keybinding +so default behaviour is unchanged. +--- + +Notmuch pick had fallen behind show so update. + +Best wishes + +Mark + + + contrib/notmuch-pick/notmuch-pick.el | 21 +++++++++++++++++---- + 1 files changed, 17 insertions(+), 4 deletions(-) + +diff --git a/contrib/notmuch-pick/notmuch-pick.el b/contrib/notmuch-pick/notmuch-pick.el +index 755cbbc..36587a6 100644 +--- a/contrib/notmuch-pick/notmuch-pick.el ++++ b/contrib/notmuch-pick/notmuch-pick.el +@@ -173,7 +173,7 @@ + (define-key map "q" 'notmuch-pick-quit) + (define-key map "x" 'notmuch-pick-quit) + (define-key map "?" 'notmuch-help) +- (define-key map "a" 'notmuch-pick-archive-message) ++ (define-key map "a" 'notmuch-pick-archive-message-then-next) + (define-key map "=" 'notmuch-pick-refresh-view) + (define-key map "s" 'notmuch-search) + (define-key map "z" 'notmuch-pick) +@@ -393,10 +393,23 @@ Does NOT change the database." + (kill-buffer notmuch-pick-message-buffer)) + t)) + +-(defun notmuch-pick-archive-message () ++(defun notmuch-pick-archive-message (&optional unarchive) ++ "Archive the current message. ++ ++Archive the current message by applying the tag changes in ++`notmuch-archive-tags' to it (remove the \"inbox\" tag by ++default). If a prefix argument is given, the message will be ++\"unarchived\", i.e. the tag changes in `notmuch-archive-tags' ++will be reversed." ++ (interactive "P") ++ (when notmuch-archive-tags ++ (apply 'notmuch-pick-tag ++ (notmuch-tag-change-list notmuch-archive-tags unarchive)))) ++ ++(defun notmuch-pick-archive-message-then-next (&optional unarchive) + "Archive the current message and move to next matching message." +- (interactive) +- (notmuch-pick-tag "-inbox") ++ (interactive "P") ++ (notmuch-pick-archive-message unarchive) + (notmuch-pick-next-matching-message)) + + (defun notmuch-pick-next-message () +-- +1.7.9.1 +