summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
44d3c57)
This fixes the recently-added emacs-large-search-buffer test. This is
as simple as saving any trailing input and then pre-prepending it on
the next call.
MAny thanks to Thomas Schwinge <thomas@schwinge.name> for tracking
down this problem and contributing a preliminary version of this fix.
do (notmuch-search-insert-field field date count authors subject tags)))
(insert "\n"))
do (notmuch-search-insert-field field date count authors subject tags)))
(insert "\n"))
+(defvar notmuch-search-process-filter-data nil
+ "Data that has not yet been processed.")
+(make-variable-buffer-local 'notmuch-search-process-filter-data)
+
(defun notmuch-search-process-filter (proc string)
"Process and filter the output of \"notmuch search\""
(let ((buffer (process-buffer proc))
(defun notmuch-search-process-filter (proc string)
"Process and filter the output of \"notmuch search\""
(let ((buffer (process-buffer proc))
(save-excursion
(let ((line 0)
(more t)
(save-excursion
(let ((line 0)
(more t)
+ (inhibit-read-only t)
+ (string (concat notmuch-search-process-filter-data string)))
+ (setq notmuch-search-process-filter-data nil)
(while more
(while (and (< line (length string)) (= (elt string line) ?\n))
(setq line (1+ line)))
(while more
(while (and (< line (length string)) (= (elt string line) ?\n))
(setq line (1+ line)))
(while (and (< line (length string)) (= (elt string line) ?\n))
(setq line (1+ line)))
(if (< line (length string))
(while (and (< line (length string)) (= (elt string line) ?\n))
(setq line (1+ line)))
(if (< line (length string))
- (insert (concat "Error: Unexpected output from notmuch search:\n" (substring string line) "\n")))
+ (setq notmuch-search-process-filter-data (substring string line)))
))))
(if found-target
(goto-char found-target)))
))))
(if found-target
(goto-char found-target)))