mirror of https://github.com/djcb/mu.git
* mu4e: mu4e~proc: make sure parameters are not treated as format strings
This commit is contained in:
parent
045ad92545
commit
ca90c99e85
|
@ -337,19 +337,18 @@ result found, a function is called, depending on the kind of
|
|||
result. The variables `mu4e-error-func' contain the function that
|
||||
will be called for, resp., a message (header row) or an error."
|
||||
(mu4e~proc-send-command
|
||||
(format
|
||||
(concat
|
||||
"find query:\"%s\" threads:%s sortfield:%s reverse:%s maxnum:%d "
|
||||
"skip-dups:%s include-related:%s")
|
||||
(mu4e~proc-escape-query query)
|
||||
(if threads "true" "false")
|
||||
;; sortfield is e.g. ':subject'; this removes the ':'
|
||||
(if (null sortfield) "nil" (substring (symbol-name sortfield) 1))
|
||||
;; TODO: use ascending/descending in backend too (it's clearer than 'reverse'
|
||||
(if (eq sortdir 'descending) "true" "false")
|
||||
(if maxnum maxnum -1)
|
||||
(if skip-dups "true" "false")
|
||||
(if include-related "true" "false"))))
|
||||
(concat
|
||||
"find query:\"%s\" threads:%s sortfield:%s reverse:%s maxnum:%d "
|
||||
"skip-dups:%s include-related:%s")
|
||||
(mu4e~proc-escape-query query)
|
||||
(if threads "true" "false")
|
||||
;; sortfield is e.g. ':subject'; this removes the ':'
|
||||
(if (null sortfield) "nil" (substring (symbol-name sortfield) 1))
|
||||
;; TODO: use ascending/descending in backend too (it's clearer than 'reverse'
|
||||
(if (eq sortdir 'descending) "true" "false")
|
||||
(if maxnum maxnum -1)
|
||||
(if skip-dups "true" "false")
|
||||
(if include-related "true" "false")))
|
||||
|
||||
(defun mu4e~proc-move (docid-or-msgid &optional maildir flags)
|
||||
"Move message identified by DOCID-OR-MSGID.
|
||||
|
@ -464,7 +463,7 @@ mean:
|
|||
docid partidx what
|
||||
(if param (format " param:\"%s\"" param) "")))
|
||||
(otherwise (mu4e-error "Unsupported action %S" action))))))
|
||||
(mu4e~proc-send-command cmd)))
|
||||
(mu4e~proc-send-command "%s" cmd)))
|
||||
|
||||
|
||||
(defun mu4e~proc-ping ()
|
||||
|
|
Loading…
Reference in New Issue