mirror of https://github.com/djcb/mu.git
mu4e: Use mu4e-query-rewrite-function
The (new) mu4e-search-query-rewrite-function is a bit too long, let's keep the old one.
This commit is contained in:
parent
892b9ce1fa
commit
5d155841a6
|
@ -796,7 +796,7 @@ Switch to the output buffer for the results. If IGNORE-HISTORY is
|
||||||
true, do *not* update the query history stack."
|
true, do *not* update the query history stack."
|
||||||
(let* ((buf (get-buffer-create mu4e-headers-buffer-name))
|
(let* ((buf (get-buffer-create mu4e-headers-buffer-name))
|
||||||
(inhibit-read-only t)
|
(inhibit-read-only t)
|
||||||
(rewritten-expr (funcall mu4e-search-query-rewrite-function expr))
|
(rewritten-expr (funcall mu4e-query-rewrite-function expr))
|
||||||
(maxnum (unless mu4e-search-full mu4e-search-results-limit)))
|
(maxnum (unless mu4e-search-full mu4e-search-results-limit)))
|
||||||
(with-current-buffer buf
|
(with-current-buffer buf
|
||||||
(mu4e-headers-mode)
|
(mu4e-headers-mode)
|
||||||
|
|
|
@ -173,7 +173,7 @@ clicked."
|
||||||
for bm in bmks
|
for bm in bmks
|
||||||
for key = (string (plist-get bm :key))
|
for key = (string (plist-get bm :key))
|
||||||
for name = (plist-get bm :name)
|
for name = (plist-get bm :name)
|
||||||
for query = (funcall (or mu4e-search-query-rewrite-function #'identity)
|
for query = (funcall (or mu4e-query-rewrite-function #'identity)
|
||||||
(plist-get bm :query))
|
(plist-get bm :query))
|
||||||
for qcounts = (and (stringp query)
|
for qcounts = (and (stringp query)
|
||||||
(cl-loop for q in queries
|
(cl-loop for q in queries
|
||||||
|
|
|
@ -62,10 +62,7 @@ If this is nil, search for up to `mu4e-search-results-limit')")
|
||||||
(defvar mu4e-search-threads t
|
(defvar mu4e-search-threads t
|
||||||
"Whether to calculate threads for the search results.")
|
"Whether to calculate threads for the search results.")
|
||||||
|
|
||||||
|
(defcustom mu4e-query-rewrite-function 'identity
|
||||||
(define-obsolete-variable-alias 'mu4e-query-rewrite-function
|
|
||||||
'mu4e-search-query-rewrite-function "1.7.0")
|
|
||||||
(defcustom mu4e-search-query-rewrite-function 'identity
|
|
||||||
"Function to rewrite a query.
|
"Function to rewrite a query.
|
||||||
|
|
||||||
It takes a search expression string, and returns a possibly
|
It takes a search expression string, and returns a possibly
|
||||||
|
@ -87,7 +84,6 @@ anything about the query, it just does text replacement."
|
||||||
:type 'function
|
:type 'function
|
||||||
:group 'mu4e-search)
|
:group 'mu4e-search)
|
||||||
|
|
||||||
|
|
||||||
(define-obsolete-variable-alias
|
(define-obsolete-variable-alias
|
||||||
'mu4e-headers-search-bookmark-hook
|
'mu4e-headers-search-bookmark-hook
|
||||||
'mu4e-search-bookmark-hook "1.7.0")
|
'mu4e-search-bookmark-hook "1.7.0")
|
||||||
|
|
Loading…
Reference in New Issue