mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-25 20:38:08 +01:00
emacs: remove newlines from input to notmuch count --batch
Since a newline starts a new query in batch mode, this causes mysterious crashes in the emacs interface if saved searches contain newlines. See the discussion at id:87wqhcxb5j.fsf@maritornes.cs.unb.ca In general newlines seem to be just whitespace to the xapian query parser, so this should be mainly harmless.
This commit is contained in:
parent
fa27d0faa0
commit
75d84dfd84
1 changed files with 6 additions and 4 deletions
|
@ -399,10 +399,12 @@ options will be handled as specified for
|
||||||
(third elem)
|
(third elem)
|
||||||
(cdr elem))))
|
(cdr elem))))
|
||||||
(insert
|
(insert
|
||||||
(notmuch-hello-filtered-query count-query
|
(replace-regexp-in-string
|
||||||
(or (plist-get options :filter-count)
|
"\n" " "
|
||||||
(plist-get options :filter)))
|
(notmuch-hello-filtered-query count-query
|
||||||
"\n")))
|
(or (plist-get options :filter-count)
|
||||||
|
(plist-get options :filter))))
|
||||||
|
"\n")))
|
||||||
|
|
||||||
(unless (= (call-process-region (point-min) (point-max) notmuch-command
|
(unless (= (call-process-region (point-min) (point-max) notmuch-command
|
||||||
t t nil "count" "--batch") 0)
|
t t nil "count" "--batch") 0)
|
||||||
|
|
Loading…
Reference in a new issue