Subject: Re: bug#25246: 25.1.90; Buffer not responsible with overlay at buffer end.

From: Eli Zaretskii <[email-masked]>
Date: Thu, 22 Dec 2016 19:04:37 +0200

> Date: Thu, 22 Dec 2016 10:13:05 +0100
> From: "Stefan-W. Hahn" <[email-masked]>
> 
> For showing some information in compile buffer I have a function which
> uses the hooks compilation-start-hook and compilation-filter-hook to
> scan the compile buffer while compiling and adding an overlay together
> with information of the compilation at the end of the compile buffer.
> 
> The compile buffer has
>   truncate-lines t
> 
> And the function to add the overlay is like:
> 
> (defun xx ()
>   (interactive)
>   (let ((text (propertize
>                 (concat
>                 (format "Already done %d test (%d positive, %d negative, %d undecided).\n"
>                         0 0 0 0))
>                'face 'highlight))
>         (ov (make-overlay (point-min) (point-min) nil 'front-advance)))
>     (overlay-put ov 'after-string text)
>     (goto-char (point-max))
>     (move-overlay ov (point-at-bol) (point-at-eol))))
> 
> Together with an content of a buffer like:
> 
> --- snipp
>     xxxx xxxxxx xxxxxx `xxxxxxxx_xxxxx_xxxx.xxx'.
> ./../../xxxxx/xxxxxx xxxxxxxxxxxxx.xxx xxxxxxx.xxx xxxxxxx.xxx xxxxxxxxx.xxx xxxxx.xxx xxxxxxxxxxxx.xxx xxxxxxxxx.xxx xxxxxxxxxx.xxx xxx_xxxx.xxx xxxxxxxxx.xxx xxxxxxxxxx.xxx xxxxxxxxxx.xxxxxxxxxxxxx.xxxxxxxxxxxxx.xxxxxxxxxxxxx.xxxxxxxxxxxx
> --- snipp
> 
> The last line is longer then the screen width, so truncated.
> 
> If running the above defined funtion xx in this buffer (with emacs -Q), the
> buffer is not responsible any more afterwards.
> 
> If truncate-lines is nil, it works.

Could you please show a complete recipe, starting from "emacs -Q"?
I'm afraid I don't understand from your description how to reproduce
the problem, in order to debug it.

It should be enough to provide some text to serve as buffer contents,
and a Lisp function to put the overlay on that text, such that Emacs
stops responding.

Thanks.