bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#44016: 28.0.50; Add new "gnus-search" search interface to Gnus


From: Eric Abrahamsen
Subject: bug#44016: 28.0.50; Add new "gnus-search" search interface to Gnus
Date: Thu, 15 Oct 2020 09:47:53 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Now that the nnselect Gnus backend is in, I've been able to finish the
gnus-search.el library from... four years ago or more. There's a
scratch/gnus-search branch in the repo but it was so old merging was a
pain, so I'm going to just delete it. I've attached a work-in-progress
patch.

To recap: with this library, you can set
`gnus-search-use-parsed-queries' non-nil, and use the same generalized
search query language against all supported search engines. A query
might look like:

from:"my boss" mark:flag since:1w

That same query would work against an IMAP group, or a nnmaildir group
indexed with notmuch, or even multiple groups backed by different search
engines, and the results will be collected correctly. Using nnselect,
the above group could be made permanent, so you'd have a
continually-updating group displaying recent important messages from
your boss.

Some open questions:

- This patch doesn't include documentation, though I have that around
  here somewhere. I'll fix it up and add it.
- This patch doesn't remove the nnir.el library, though that's now
  obsolete. I think removing it could be problematic: it's not like
  declaring functions/variables obsolete, where we can let people down
  gently. I suspect plenty of code uses (require 'nnir), which will
  cause blowups. Renaming gnus-search.el to nnir.el doesn't make a lot
  of sense, though. I'm considering leaving the nnir.el file in there,
  but containing nothing but a warning.
- There's "clever" completion stuff in there, that allows search keys to
  be completed either during entry, with TAB, or programmatically, after
  the query has been entered. I suspect I'm not using quite the right
  functions, particularly `completion-in-region' which sort of looks
  like it's not meant to be used the way I'm using it -- it seems to
  return messages directly.


Anyway, comments very welcome!

Eric

Attachment: gnus-search.diff
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]