messages: Keep hyphens and quotes when preprocessing query string.
authorRicardo Wurmus <rekado@elephly.net>
Sun, 10 May 2020 06:29:40 +0000 (08:29 +0200)
committerRicardo Wurmus <rekado@elephly.net>
Sun, 10 May 2020 06:29:40 +0000 (08:29 +0200)
mumi/messages.scm

index a3d279f11382889e391b38075243282883854232..bc87a4e6ff40ad14493cc9dcb5551b2b7c2b3ae5 100644 (file)
@@ -230,9 +230,11 @@ Intersect the result with the id sets in the list SETS."
 (define-public (process-query query)
   "Process the QUERY string and return a list of query terms and
 sets that need to overlap the result set."
-  ;; Mu doesn't like punctuation.  Replace with spaces.
+  ;; Mu doesn't like punctuation.  Replace with spaces.  Leave hyphens
+  ;; and quotes.
   (define (clean-term term)
     (string-map (match-lambda
+                  ((and (or #\" #\-) c) c)
                   ((? punctuation? c) #\space)
                   (c c))
                 term))