[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
10 Jul 2001 17:22:01 +0100
This bug report will be sent to the Free Software Foundation,
not to your local site managers!!
Please write in English, because the Emacs maintainers do not have
translators to read other languages for them.
In GNU Emacs 20.7.1 (i386-*-nt4.0.1381)
of Tue Jun 13 2000 on buffy
configured using `configure NT'
Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:
`shell-resync-dir' hangs if `comint-truncate-buffer' is in
`comint-output-filter-functions' and the shell buffer is at its
The reason is the following `while'-loop in `shell-resync-dir':
(let ((pt (point))) ; wait for 1 line
;; This extra newline prevents the user's pending input from spoofing us.
(insert "\n") (backward-char 1)
(while (not (looking-at ".+\n"))
In the scenario described above, calling `accept-process-output'
triggers `comint-truncate-buffer' which removes text *before* the
location `pt' point to. As a result, `pt' points to (for
example) after `(point-max)', so the `looking-at' never
recognizes that process output has been inserted. Another
variant may be that `pt' point to the middle of the process
output, leading to incorrect results.
Making `pt' a marker does not help, since `comint-output-filter'
uses `insert-before-markers' to insert its text.
A possible solution would be to replace the expression
`(goto-char pt)' by `(goto-char comint-last-output-start)' and
remove the surrounding `let' alltogether, but I am not sure about
correctness of this one. However, I'll try it as a workaround.
|[Prev in Thread]
||[Next in Thread]|
- `shell-resync-dir' hangs,
Jens Schmidt <=