emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] scratch/gnus-search a4fe929 18/30: Notmuch query transform


From: Eric Abrahamsen
Subject: [Emacs-diffs] scratch/gnus-search a4fe929 18/30: Notmuch query transformation improvements
Date: Thu, 1 Jun 2017 03:50:22 -0400 (EDT)

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

    Notmuch query transformation improvements
    
    * lisp/gnus/gnus-search.el (gnus-search-transform-expression): A
      "body" keyword should just be removed. Also, strip angle brackets
      from message ids.
---
 lisp/gnus/gnus-search.el | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/lisp/gnus/gnus-search.el b/lisp/gnus/gnus-search.el
index 34b6243..9f027d2 100644
--- a/lisp/gnus/gnus-search.el
+++ b/lisp/gnus/gnus-search.el
@@ -1644,8 +1644,14 @@ absolute filepaths to standard out."
     (cond
      ((consp (car expr))
       (format "(%s)") (gnus-search-transform engine expr))
+     ((eql (car expr) 'body)
+      (cdr expr))
      ((memq (car expr) '(from to subject attachment mimetype tag id
                              thread folder path lastmod query property))
+      ;; Notmuch requires message-id with no angle brackets.
+      (when (eql (car expr) 'id)
+       (setcdr
+        expr (replace-regexp-in-string "\\`<\\|>\\'" "" (cdr expr))))
       (format "%s:%s" (car expr)
              (if (string-match "\\`\\*" (cdr expr))
                  ;; Notmuch can only handle trailing asterisk



reply via email to

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