From f882b96c48641a92d91fb5cbe809912b9f36bc16 Mon Sep 17 00:00:00 2001 From: David Bremner Date: Sun, 18 Aug 2013 16:32:18 +0200 Subject: [PATCH] Re: search order --- 39/3560f1f661f783388a76e0ac7ca83773cbdbd5 | 76 +++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 39/3560f1f661f783388a76e0ac7ca83773cbdbd5 diff --git a/39/3560f1f661f783388a76e0ac7ca83773cbdbd5 b/39/3560f1f661f783388a76e0ac7ca83773cbdbd5 new file mode 100644 index 000000000..58fc34e60 --- /dev/null +++ b/39/3560f1f661f783388a76e0ac7ca83773cbdbd5 @@ -0,0 +1,76 @@ +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 1DF05431FBF + for ; Sun, 18 Aug 2013 13:53:00 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 1.103 +X-Spam-Level: * +X-Spam-Status: No, score=1.103 tagged_above=-999 required=5 + tests=[DATE_IN_PAST_06_12=1.103] autolearn=disabled +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 wX-ZXRFqPp+L for ; + Sun, 18 Aug 2013 13:52:52 -0700 (PDT) +Received: from yantan.tethera.net (yantan.tethera.net [199.188.72.155]) + (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 29627431FBD + for ; Sun, 18 Aug 2013 13:52:52 -0700 (PDT) +Received: from remotemail by yantan.tethera.net with local (Exim 4.80) + (envelope-from ) + id 1VB9xu-00050i-Vf; Sun, 18 Aug 2013 17:52:46 -0300 +Received: (nullmailer pid 8987 invoked by uid 1000); Sun, 18 Aug 2013 + 14:32:18 -0000 +From: David Bremner +To: Ramakrishnan Muthukrishnan , notmuch@notmuchmail.org +Subject: Re: search order +In-Reply-To: + +References: + +User-Agent: Notmuch/0.16 (http://notmuchmail.org) Emacs/24.3.1 + (x86_64-pc-linux-gnu) +Date: Sun, 18 Aug 2013 16:32:18 +0200 +Message-ID: <87vc33oyrx.fsf@maritornes.cs.unb.ca> +MIME-Version: 1.0 +Content-Type: text/plain +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: Sun, 18 Aug 2013 20:53:00 -0000 + +Ramakrishnan Muthukrishnan writes: + +> If I startup notmuch and then do a M-x notmuch-search and then *, I see +> the messages with the newest on the top. But if I instead, startup +> notmuch and then hit "s", I see that the new messages are at the +> bottom. The value of notmuch-search-oldest-first is t. + +I had a quick look at this, and I think the issue is as follows: +notmuch-search takes an extra parameter for the order, and does not +directly look at notmuch-search-oldest-first. notmuch-hello-search +works better in this case because it calls notmuch-search with +notmuch-search-oldest-first as one of it's parameters. The simplest +solution would be to make another helper function like + +(defun notmuch-search-interactive () + (interactive) + (notmuch-search nil notmuch-search-oldest-first)) + +I don't know if notmuch-search should remain interactive, or perhaps be +renamed and have interactive removed (with the new helper replacing it). +I guess that might break some user code. + +d -- 2.26.2