From c89e129223ed20c2046c7c112e28bd01f11ea8f2 Mon Sep 17 00:00:00 2001 From: Eric Abrahamsen Date: Wed, 3 May 2017 13:08:50 -0700 Subject: [PATCH] Change "no-parse" query meta-key to "raw" * lisp/gnus/gnus-search.el (gnus-search-prepare-query): Easier to type, and makes a little more sense. * lisp/gnus/gnus-group.el (gnus-group-make-search-group): Swap out here. --- lisp/gnus/gnus-group.el | 2 +- lisp/gnus/gnus-search.el | 12 +++--------- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el index 2e61b7d178a..b7b94da0e50 100644 --- a/lisp/gnus/gnus-group.el +++ b/lisp/gnus/gnus-group.el @@ -2825,7 +2825,7 @@ non-nil `specs' arg must be an alist with `search-query-spec' and (or (cdr (assq 'search-query-spec specs)) (list (cons 'query (read-string "Query: " nil 'gnus-search-history)) - (cons 'no-parse arg))))) + (cons 'raw arg))))) (if perm (let ((name (read-string "Group name: " nil))) (gnus-group-make-group diff --git a/lisp/gnus/gnus-search.el b/lisp/gnus/gnus-search.el index 727892643ca..040dca4b202 100644 --- a/lisp/gnus/gnus-search.el +++ b/lisp/gnus/gnus-search.el @@ -2075,14 +2075,8 @@ string query into sexp form." (let ((q-string (alist-get 'query query-spec)) key val) ;; Look for these meta keys: - (while (string-match "\\(thread\\|limit\\|raw\\|no-parse\\|count\\):\\([^ ]+\\)" q-string) - ;; If they're found, push them into the query spec, and remove - ;; them from the query string. - (setq key (if (string= (match-string 1 q-string) - "raw") - ;; "raw" is a synonym for "no-parse". - 'no-parse - (intern (match-string 1 q-string))) + (while (string-match "\\(thread\\|limit\\|raw\\|count\\):\\([^ ]+\\)" q-string) + (setq key (intern (match-string 1 q-string)) val (string-to-number (match-string 2 q-string))) (push (cons key ;; A bit stupid, but right now the only possible @@ -2095,7 +2089,7 @@ string query into sexp form." ;; Decide whether to parse the query or not. (setf (alist-get 'query query-spec) (if (and gnus-search-use-parsed-queries - (null (alist-get 'no-parse query-spec))) + (null (alist-get 'raw query-spec))) (gnus-search-parse-query q-string) q-string)) query-spec)) -- 2.39.5