Re: search order

Subject: Re: search order

Date: Sun, 18 Aug 2013 16:32:18 +0200

To: Ramakrishnan Muthukrishnan, notmuch@notmuchmail.org

Cc:

From: David Bremner


Ramakrishnan Muthukrishnan <ram@rkrishnan.org> 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

Thread: