[PATCH v2 0/2] sort saved searches, again

Jani Nikula jani at nikula.org
Wed Sep 7 01:01:26 PDT 2011


Hi, and thanks for all the comments -

[I took the liberty of reordering Adam's paragraphs in my reply.]

On Tue, 6 Sep 2011 08:23:43 -0700 (PDT), Adam Wolfe Gordon <awg+notmuch at xvx.ca> wrote:
> I think having an option to sort the saved searches is a fine idea.  
> The Emacs Way would probably be to have an option for the sort order 
> that takes the name of a function, which is called to sort the 
> searches.  My first thought is that this isn't very user-friendly.  
> But, thinking about it a bit more, if the default causes the searches 
> to be sorted alphabetically, and setting the value to nil causes them 
> not to be sorted, then it's user-friendly for the two most common 
> cases, and still 100% customizable for those who want different sort 
> orders.

Please find this implemented in patch 1.

> I keep my saved searches in a particular order, kind of emulating the 
> Gmail sidebar: unread, inbox, sent, all mail.  Putting these in 
> alphabetical order either direction would not achieve the goal of 
> having the most used/important saved searches first (i.e. I hardly 
> ever use all mail, so it shouldn't be first in the list).

> The tags list, on the other hand, I like having sorted to make tags 
> easy to find.  It has a different purpose than saved searches for me, 
> so its behavior is different.

I hardly use tags at all. I have dozens of saved searches instead. Thus 
I want the saved searches to be easy to find, and I'd rather have the 
computer sort them for me. I do admit to renaming the most important 
ones to start with capital letters so they pop up first even when 
sorted.

Since it seems that people generally prefer to keep the most important 
saved searches first in the list, I've included patch 2 to make new 
saved searches be added to the end of the list rather than inserted in 
the beginning.

BR,
Jani.


Jani Nikula (2):
  emacs: Add new customization option to sort saved searches
  emacs: Make saving new saved searches append, not prepend

 emacs/notmuch-hello.el |   28 ++++++++++++++++++++++++++--
 1 files changed, 26 insertions(+), 2 deletions(-)



More information about the notmuch mailing list