Re: configurable summary line for notmuch search

Subject: Re: configurable summary line for notmuch search

Date: Wed, 01 Sep 2021 18:25:41 +0200

To: Roger Randall, Jose Antonio Ortega Ruiz, David Bremner, notmuch@notmuchmail.org

Cc:

From: Alexander Adolf


Roger Randall <roger@rogerrandall.com> writes:

> [...]
> Along those lines, I would also like the ability to
> explicitly set the order in which tags are shown in notmuch-search (as
> opposed to purely alphabetical). 
> [...]

I have to admit having been intrigued by this thought, too. How could
this work? I guess one could want specific tags to always be at the
start, or the end of the tags string, and perhaps in a specific order.

Implementation-wise this could be done with weights, or priorities. Each
tag gets a default weight/priority, say zero. I would then like to be
able to set up regular expressions to assign different
weights/priorities to tags matching these regexps. Tags would then be
displayed in ascending weight/priority order (i.e. negative
weights/priorities first, then zero, then positive weights/priorities).
Within the same weight/priority value, alphabetic ordering would be
used.

What if a tag matches more than one regexp? Are the weights/priorities
added up, or does the minimum weight/priority "win"?

For me, this would be interesting for Emacs only, i.e. likely best
implemented in elisp.

That said, this could - more or less - easily be done with the patch
proposed on this thread by jao. <hint>_Provided_ that it will be amended
to not only cover notmuch-tree-result-format, but also
notmuch-search-result-format.</hint> ;-)


Cheers,

  --alex
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: