[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Patch to make VC annotate async
From: |
David Kastrup |
Subject: |
Re: Patch to make VC annotate async |
Date: |
Mon, 09 Jul 2007 21:09:29 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux) |
Tom Tromey <address@hidden> writes:
>>>>>> "Stefan" == Stefan Monnier <address@hidden> writes:
>
> Stefan> For the vc-cvs.el part of the patch , can you try the patch below?
>
> I haven't tried it yet, but I do have a question.
>
> Stefan> +(defun vc-cvs-annotate-process-filter (process string)
> Stefan> + (setq string (concat (process-get process 'output) string))
> Stefan> + (if (not (string-match "^[0-9]" string))
> Stefan> + ;; Still waiting for the first real line.
> Stefan> + (process-put process 'output string)
> Stefan> + ;; FIXME: we shouldn't hardcode vc-process-filter here.
> Stefan> + (set-process-filter process 'vc-process-filter)
> Stefan> + (vc-process-filter process (substring string (match-beginning
> 0)))))
>
> I had written a much more complicated filter because my reading of the
> Elisp manual is that the output from the process won't necessarily
> appear as full lines. Is that not so?
Correct. But the above does wait for a complete line, followed by a
newline followed by [0-9], then calls the filter function on
everything up to there.
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum