emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] scratch/gnus-search c89e129 11/30: Change "no-parse" query


From: Eric Abrahamsen
Subject: [Emacs-diffs] scratch/gnus-search c89e129 11/30: Change "no-parse" query meta-key to "raw"
Date: Thu, 1 Jun 2017 03:50:21 -0400 (EDT)

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

    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 2e61b7d..b7b94da 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 7278926..040dca4 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))



reply via email to

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