emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] scratch/gnus-search 5b6b375 11/12: WIP on search presets


From: Eric Abrahamsen
Subject: [Emacs-diffs] scratch/gnus-search 5b6b375 11/12: WIP on search presets
Date: Wed, 3 May 2017 11:51:00 -0400 (EDT)

branch: scratch/gnus-search
commit 5b6b375810cc3132534824a51dbef4224fcea699
Author: Eric Abrahamsen <address@hidden>
Commit: Eric Abrahamsen <address@hidden>

    WIP on search presets
---
 lisp/gnus/gnus-search.el | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/lisp/gnus/gnus-search.el b/lisp/gnus/gnus-search.el
index 640577c..f4554b3 100644
--- a/lisp/gnus/gnus-search.el
+++ b/lisp/gnus/gnus-search.el
@@ -106,6 +106,31 @@ transformed."
   :type 'boolean
   :group 'gnus-search)
 
+(defcustom gnus-search-presets nil
+  "A list of search \"presets\" for easy search configuration.
+
+A preset is a set of groups to search, possibly also with a
+\"base query\".  Selecting a preset will prompt for a search
+query which will be run against the specified groups, ANDed with
+the base query, if present.  The base query can be specified as
+an unparsed string, or as a parsed sexp.
+
+Each present should be a list holding a list of groups, and an
+optional base query.  For example:
+
+\(\(\"nnimap+server1:group1\" \"nnmaildir+server2:group2\) \"since:1m\"\)
+
+Presets are made available in the Gnus *Group* keymap as \"G
+<n>\", where <n> is the preset's 1-indexed place in
+`gnus-search-presets'."
+  :version "26.3"
+  :group 'gnus-search
+  :type '(repeat (group
+                 (repeat (string :tag "Group name"))
+                 (choice (string :tag "Unparsed base query")
+                         (list :tag "Parsed base query")
+                         (const :tag "No base query" nil)))))
+
 (defcustom gnus-search-ignored-newsgroups ""
   "A regexp to match newsgroups in the active file that should
   be skipped when searching."



reply via email to

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