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 52D564196F5 for ; Sat, 26 Jun 2010 16:29:10 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -1.999 X-Spam-Level: X-Spam-Status: No, score=-1.999 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001] 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 glxTg8iZ6pnJ for ; Sat, 26 Jun 2010 16:29:00 -0700 (PDT) Received: from mail-vw0-f53.google.com (mail-vw0-f53.google.com [209.85.212.53]) by olra.theworths.org (Postfix) with ESMTP id 212DC431FC1 for ; Sat, 26 Jun 2010 16:29:00 -0700 (PDT) Received: by vws9 with SMTP id 9so622327vws.26 for ; Sat, 26 Jun 2010 16:28:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=DLRBfXGu347BbTBUki6DD9RyvlLTC6Gdadas95T75k8=; b=kprPH1XGjELJSUy5EIoLps/B8LrebhAgv89CZxSKZfShilT0B7NK+qNfQdjrFg93IY ZFvoqcdGijriDRvyI7mDTVGw9+NCmypTMfMeMyFWvZQ1oZQVpj8OZ7k7Jsn3Ch7G3e93 Qd1j2eOF1PHcGmIy/kApjzrjwKF6LJd1gjQq4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=brA6XxcLoc7OvmdZFXhv5Hy6hZznvctOxpjQyz4482PTIbHJKhHj2BeJ5rRq0cqfsW wcBVKfqhbnFHsmBlcJRwlOpBMT/IAONT/c/34YRK8urvcbgfm/iXCPr0oPPL4ya8wyae lHgUqW8JRlBdmXIV4XXcC21pehQof3+YxzlRU= MIME-Version: 1.0 Received: by 10.220.63.207 with SMTP id c15mr1675976vci.85.1277594938301; Sat, 26 Jun 2010 16:28:58 -0700 (PDT) Received: by 10.220.90.138 with HTTP; Sat, 26 Jun 2010 16:28:58 -0700 (PDT) Date: Sat, 26 Jun 2010 19:28:58 -0400 Message-ID: Subject: [PATCH 2/3] Introducing the concept of mail processing order. From: "servilio@gmail.com" 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: Sat, 26 Jun 2010 23:29:10 -0000 This separates the order you want to go through your mail from the order you want it sorted visually. Now you can, e.g.: have your newer mails appearing at the top while still reading them starting from the oldest. --- emacs/notmuch-lib.el | 8 ++++++++ emacs/notmuch.el | 6 ++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el index f30bcb4..54c7329 100644 --- a/emacs/notmuch-lib.el +++ b/emacs/notmuch-lib.el @@ -33,6 +33,14 @@ :type 'boolean :group 'notmuch) +(defcustom notmuch-process-newer-next nil + "When finished with a thread, which one you intend to process next. + +If the value is nil, the thread older than the current will be +focused next, otherwise focus the newer thread will be chosen." + :type 'boolean + :group 'notmuch) + ;; (defcustom notmuch-saved-searches nil diff --git a/emacs/notmuch.el b/emacs/notmuch.el index 417f3fd..404e77d 100644 --- a/emacs/notmuch.el +++ b/emacs/notmuch.el @@ -261,12 +261,14 @@ For a mouse binding, return nil." (defun notmuch-search-next-thread () "Select the next thread in the search results." (interactive) - (forward-line 1)) + (forward-line (* (if notmuch-search-oldest-first 1 -1) + (if notmuch-process-newer-next 1 -1)))) (defun notmuch-search-previous-thread () "Select the previous thread in the search results." (interactive) - (forward-line -1)) + (previous-line (* (if notmuch-search-oldest-first 1 -1) + (if notmuch-process-newer-next 1 -1)))) (defun notmuch-search-last-thread () "Select the last thread in the search results." -- 1.7.1