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 36B744196F2 for ; Tue, 13 Apr 2010 06:06:43 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.1 X-Spam-Level: X-Spam-Status: No, score=-0.1 tagged_above=-999 required=5 tests=[BAYES_20=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001] 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 5YJ+x3P-Dkl3 for ; Tue, 13 Apr 2010 06:06:42 -0700 (PDT) Received: from mail-ww0-f53.google.com (mail-ww0-f53.google.com [74.125.82.53]) by olra.theworths.org (Postfix) with ESMTP id 5E8D4431FC1 for ; Tue, 13 Apr 2010 06:06:42 -0700 (PDT) Received: by wwb22 with SMTP id 22so2820231wwb.26 for ; Tue, 13 Apr 2010 06:06:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:received:message-id :subject:from:to:content-type; bh=ZcsvrT2zRI0RHFX+WiZjabyx6CkDJXx4BJLvljWG8XM=; b=x+FvhY6Y+C4+1VYnc1R8RRz32W2UevrCxbFlxNERo5zzkgpWbuA1TQLX19sq6zgFPJ jbDfcMWhSmbUvF0UDB7M/+k0U7D8cOYH0LLLSQdVrPvZs7VHRUpmUTKf7wVZilylWgNK MZA+Gd9LNG7A+wRDqJI+cn62e1p/IgySjUSuQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=JLmXxSrXrnTq8ERxxWss+qgK2mdYUZ9+rnUKMHbMiNdM8OWGmFjc1BzFUvKMNPqUWM j/Gihc17v/K5cHdUbeiKEDc3PxmRx+1easlXiy9OpbWBaZatRFywg0un6GPqzL2mVJll /7e5b0PfrTG9SY4n41w9wZxyAFQMnhxljN9Fk= MIME-Version: 1.0 Received: by 10.216.89.140 with HTTP; Tue, 13 Apr 2010 06:06:41 -0700 (PDT) Date: Tue, 13 Apr 2010 09:06:41 -0400 Received: by 10.216.86.193 with SMTP id w43mr3190049wee.16.1271164001493; Tue, 13 Apr 2010 06:06:41 -0700 (PDT) Message-ID: Subject: [PATCH] emacs: Extend the archive function to operate on regions too. From: Servilio Afre Puentes To: notmuch Content-Type: text/plain; charset=ISO-8859-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: Tue, 13 Apr 2010 13:06:43 -0000 Signed-off-by: Servilio Afre Puentes --- emacs/notmuch.el | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/emacs/notmuch.el b/emacs/notmuch.el index 517c53a..4d4971f 100644 --- a/emacs/notmuch.el +++ b/emacs/notmuch.el @@ -264,7 +264,7 @@ For a mouse binding, return nil." (define-key map "f" 'notmuch-search-filter) (define-key map [mouse-1] 'notmuch-search-show-thread) (define-key map "*" 'notmuch-search-operate-all) - (define-key map "a" 'notmuch-search-archive-thread) + (define-key map "a" 'notmuch-search-archive-thread-or-region) (define-key map "-" 'notmuch-search-remove-tag) (define-key map "+" 'notmuch-search-add-tag) (define-key map (kbd "RET") 'notmuch-search-show-thread) @@ -359,7 +359,7 @@ participants in the thread, a representative subject line, and any tags). Pressing \\[notmuch-search-show-thread] on any line displays that thread. The '\\[notmuch-search-add-tag]' and '\\[notmuch-search-remove-tag]' -keys can be used to add or remove tags from a thread. The '\\[notmuch-search-archive-thread]' key +keys can be used to add or remove tags from a thread. The '\\[notmuch-search-archive-thread-or-region]' key is a convenience for archiving a thread (removing the \"inbox\" tag). The '\\[notmuch-search-operate-all]' key can be used to add or remove a tag from all threads in the current buffer. @@ -566,12 +566,12 @@ thread or threads in the current region." (notmuch-search-remove-tag-region tag beg end)) (notmuch-search-remove-tag-thread tag)))) -(defun notmuch-search-archive-thread () - "Archive the currently selected thread (remove its \"inbox\" tag). +(defun notmuch-search-archive-thread-or-region () + "Archive the currently selected thread or region (remove its \"inbox\" tag). This function advances the next thread when finished." (interactive) - (notmuch-search-remove-tag-thread "inbox") + (notmuch-search-remove-tag "inbox") (forward-line)) (defun notmuch-search-process-sentinel (proc msg) -- 1.7.0.4