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 9A2E5431FBF for ; Mon, 23 Nov 2009 06:51:09 -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 5ujliMmazqMa for ; Mon, 23 Nov 2009 06:51:08 -0800 (PST) Received: from e28smtp09.in.ibm.com (e28smtp09.in.ibm.com [122.248.162.9]) by olra.theworths.org (Postfix) with ESMTP id 4C548431FBC for ; Mon, 23 Nov 2009 06:51:07 -0800 (PST) Received: from d28relay01.in.ibm.com (d28relay01.in.ibm.com [9.184.220.58]) by e28smtp09.in.ibm.com (8.14.3/8.13.1) with ESMTP id nANEVsjs017324 for ; Mon, 23 Nov 2009 20:01:54 +0530 Received: from d28av01.in.ibm.com (d28av01.in.ibm.com [9.184.220.63]) by d28relay01.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id nANEp46Y2314320 for ; Mon, 23 Nov 2009 20:21:04 +0530 Received: from d28av01.in.ibm.com (loopback [127.0.0.1]) by d28av01.in.ibm.com (8.14.3/8.13.1/NCO v10.0 AVout) with ESMTP id nANEp4ED026132 for ; Mon, 23 Nov 2009 20:21:04 +0530 Received: from localhost.localdomain ([9.77.127.154]) by d28av01.in.ibm.com (8.14.3/8.13.1/NCO v10.0 AVin) with ESMTP id nANEp2Aa025619; Mon, 23 Nov 2009 20:21:03 +0530 From: "Aneesh Kumar K.V" To: notmuch@notmuchmail.org Date: Mon, 23 Nov 2009 20:20:59 +0530 Message-Id: <1258987859-25557-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com> X-Mailer: git-send-email 1.6.5.2.74.g610f9 Subject: [notmuch] [PATCH] 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: Mon, 23 Nov 2009 14:51:09 -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 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 af4ceec..5582132 100644 --- a/notmuch.el +++ b/notmuch.el @@ -840,7 +840,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 () "Scroll up, moving point to last message in thread if at end." @@ -1106,7 +1107,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) @@ -1176,7 +1177,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