[notmuch] [PATCH -v2] notmuch.el: Use variable notmuch-search-oldest-first to decide...
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Wed, 25 Nov 2009 04:58:13 +0000 (10:28 +0530)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:35:42 +0000 (09:35 -0800)
1d/3904a07fa789ec58e1fb8bc6a14c066fac6052 [new file with mode: 0644]

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