[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

From: npostavs
Subject: bug#25246: 25.1.90; Buffer not responsible with overlay at buffer end.
Date: Thu, 22 Dec 2016 08:55:41 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)

tags 25246 confirmed

"Stefan-W. Hahn" <address@hidden> writes:

> I have the following problem:
> 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.

I think this is a similar case to #24633 "highlight-region func using
(window-hscroll) in :align-to spec can cause inf loop".  If you try your
recipe in the master branch, Emacs won't freeze, although the overlay
you put blinks in and out of visibility on every redisplay (trigged by
cursor blinking).

reply via email to

[Prev in Thread] Current Thread [Next in Thread]