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 9E201431FC3 for ; Tue, 24 Nov 2009 20:58:19 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 YqkbDf9-Tn49 for ; Tue, 24 Nov 2009 20:58:19 -0800 (PST) Received: from e23smtp05.au.ibm.com (e23smtp05.au.ibm.com [202.81.31.147]) by olra.theworths.org (Postfix) with ESMTP id 9B75E431FAE for ; Tue, 24 Nov 2009 20:58:18 -0800 (PST) Received: from d23relay05.au.ibm.com (d23relay05.au.ibm.com [202.81.31.247]) by e23smtp05.au.ibm.com (8.14.3/8.13.1) with ESMTP id nAP4tHq6008192 for ; Wed, 25 Nov 2009 15:55:17 +1100 Received: from d23av03.au.ibm.com (d23av03.au.ibm.com [9.190.234.97]) by d23relay05.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id nAP4sk641552426 for ; Wed, 25 Nov 2009 15:54:46 +1100 Received: from d23av03.au.ibm.com (loopback [127.0.0.1]) by d23av03.au.ibm.com (8.14.3/8.13.1/NCO v10.0 AVout) with ESMTP id nAP4wGnv012248 for ; Wed, 25 Nov 2009 15:58:16 +1100 Received: from localhost.localdomain ([9.124.31.111]) by d23av03.au.ibm.com (8.14.3/8.13.1/NCO v10.0 AVin) with ESMTP id nAP4wE0O012225; Wed, 25 Nov 2009 15:58:15 +1100 From: "Aneesh Kumar K.V" To: notmuch@notmuchmail.org Date: Wed, 25 Nov 2009 10:28:13 +0530 Message-Id: <1259125093-18743-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com> X-Mailer: git-send-email 1.6.5.2.74.g610f9 Subject: [notmuch] [PATCH -v2] notmuch.el: Use variable notmuch-search-oldest-first to decide the search order X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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 Nov 2009 04:58:19 -0000 Make sure we use notmuch-search-oldest-first to decide the how the search result should be displayed. This helps to set the value to nil and have latest mail shown first. This also fix the notmuch-folder mode to use the right search order when we select a folder. Also the notmuch command is fixed to use the right ordering. Signed-off-by: Aneesh Kumar K.V --- notmuch.el | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/notmuch.el b/notmuch.el index 5737f77..45c3dc6 100644 --- a/notmuch.el +++ b/notmuch.el @@ -817,7 +817,8 @@ thread from that buffer can be show when done with this one)." (fset 'notmuch-search-mode-map notmuch-search-mode-map) (defvar notmuch-search-query-string) -(defvar notmuch-search-oldest-first) +(defvar notmuch-search-oldest-first t + "Show the oldest mail first in the search-mode") (defun notmuch-search-scroll-up () @@ -1129,7 +1130,7 @@ current search results AND that are tagged with the given tag." (defun notmuch () "Run notmuch to display all mail with tag of 'inbox'" (interactive) - (notmuch-search "tag:inbox" t)) + (notmuch-search "tag:inbox" notmuch-search-oldest-first)) (setq mail-user-agent 'message-user-agent) @@ -1199,7 +1200,7 @@ results for the search terms in that line. (setq folder (notmuch-folder-find-name))) (let ((search (assoc folder notmuch-folders))) (if search - (notmuch-search (cdr search) t)))) + (notmuch-search (cdr search) notmuch-search-oldest-first)))) (defun notmuch-folder () "Show the notmuch folder view and update the displayed counts." -- 1.6.5.2.74.g610f9