On Sat, Feb 20 2016, Dirk-Jan C. Binnema <
dj...@djcbsoftware.nl> wrote:
> Hmmm - it's an interesting experiment, but to be honest, I'm a bit wary
> of adding query pre-processing... There are some improvement possible to
> the Xapian query language, but I think those are best addressed with a
> custom query parser, on the mu (not mu4e) level.
True. You can obviously see how you can break the substitution as
there's no parsing involved.
As I said, my main gripe was mostly due to the lack of prefix matching,
and mostly for maildir:. As I have multiple accounts with the same
structure, I have to repeat all maildirs whereas I could just use one
pattern.
That being said, after toying with it for a while, I definitely like
being able to define fragments I can use in any query. I have several I
didn't post that select things I look for recurringly.
The fact that this is expanded under-the-hood not only makes the query
instantly readable, but also easily *editable*.
As suggested here, I initially started by defining many bookmarks with
pre-baked queries, but this resulted in too many bookmarks and very long
queries which weren't easy to edit. That wasn't pleasant.
In any case, it has been posted for those who'd like to try.
> I think the main practical problem this comes from is the long queries
> in the modeline; that's a valid concern, but I think we can handle that
> separate from this, perhaps by allowing for a rewriter hook for the
> modeline string.
Compacting the modeline if overlong would be helpful irregardless of
this. Even just ellipsizing the query when exceeding the visual width of
the modeline would be good start (right now the current focus is just
pushed out of view).