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

From: [email-masked] (GNU bug Tracking System)
Date: Fri, 23 Dec 2016 14:21:02 +0000

Your bug report

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

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
25246: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=25246
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#25246: 25.1.90; Buffer not responsible with overlay at buffer end.
From: Eli Zaretskii <[email-masked]>
To: [email-masked]
Cc: [email-masked], [email-masked]
Date: Fri, 23 Dec 2016 16:19:56 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

> From: [email-masked]
> Cc: "Stefan-W. Hahn" <[email-masked]>,  [email-masked]
> Date: Fri, 23 Dec 2016 09:14:02 -0500
> 
> >> > Is this satisfactory enough to install this simple change?
> >> 
> >> As said. It works very well.
> >
> > OK, thanks.  Noam, do you agree?
> 
> Yes, this looks like a clear improvement.

Thanks, pushed to master.

I'm marking this bug done; feel free to reopen if it causes problems.

Subject: 25.1.90; Buffer not responsible with overlay at buffer end.
From: "Stefan-W. Hahn" <[email-masked]>
To: [email-masked]
Date: Thu, 22 Dec 2016 10:13:05 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

Hello,

running following emacs version

origin/emacs-25 emacs-25 cf1f9852d0e8d571dfe74486c26417828faa945a
Author:     Noam Postavsky <[email-masked]>
AuthorDate: Tue Dec 20 21:43:46 2016 -0500

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.

The problem happens on Windows 7 and Linux both in 64-bit compiled emacs version.
On Windows I tested this back till 

commit d35d398bdbeb393f3ebf17918d82c7573562f01e
Author: John Wiegley <[email-masked]>
Date:   Tue Aug 2 16:55:16 2016 -0700

Running the above on Linux 64 Bit with commit a3487a8 from Dec 2 and emacs -Q,
attaching gdb to the not responding process gets following backtrace:

--- snipp
0x00000000005caedc in Fassq (key=key@entry=12192, list=<optimised out>, list@entry=45444787) at fns.c:1437
1437	      QUIT;
(gdb) backtrace
#0  0x00000000005caedc in Fassq (key=key@entry=12192, list=<optimised out>, list@entry=45444787)
    at fns.c:1437
#1  0x0000000000424717 in store_in_alist (val=0, prop=12192, alistptr=<synthetic pointer>) at frame.c:2342
#2  Fframe_parameters (frame=frame@entry=19550117) at frame.c:2573
#3  0x0000000000425287 in Fframe_parameter (frame=<optimised out>, parameter=parameter@entry=46176)
    at frame.c:2641
#4  0x0000000000459e56 in x_consider_frame_title (frame=19550117) at xdisp.c:11697
#5  0x0000000000478de5 in redisplay_window (window=19557973, just_this_one_p=just_this_one_p@entry=true)
    at xdisp.c:17142
#6  0x000000000047c90e in redisplay_window_1 (window=window@entry=19557973) at xdisp.c:14495
#7  0x00000000005c1769 in internal_condition_case_1 (bfun=bfun@entry=0x47c8e0 <redisplay_window_1>, 
    arg=19557973, handlers=<optimised out>, hfun=hfun@entry=0x4317c0 <redisplay_window_error>) at eval.c:1338
#8  0x000000000046709e in redisplay_internal () at xdisp.c:14120
#9  0x0000000000469ff5 in redisplay () at xdisp.c:13255
#10 0x0000000000536021 in read_char (commandflag=1, map=map@entry=18151331, prev_event=0, 
    used_mouse_menu=used_mouse_menu@entry=0x7fff2925f61b, end_time=end_time@entry=0x0) at keyboard.c:2482
#11 0x0000000000538b16 in read_key_sequence (keybuf=keybuf@entry=0x7fff2925f770, prompt=prompt@entry=0, 
    dont_downcase_last=dont_downcase_last@entry=false, 
    can_return_switch_frame=can_return_switch_frame@entry=true, 
    fix_current_buffer=fix_current_buffer@entry=true, prevent_redisplay=false, bufsize=30) at keyboard.c:9068
#12 0x000000000053a876 in command_loop_1 () at keyboard.c:1370
#13 0x00000000005c1601 in internal_condition_case (bfun=bfun@entry=0x53a670 <command_loop_1>, 
    handlers=handlers@entry=19104, hfun=hfun@entry=0x52d150 <cmd_error>) at eval.c:1314
#14 0x0000000000529a9c in command_loop_2 (ignore=ignore@entry=0) at keyboard.c:1112
#15 0x00000000005c14ec in internal_catch (tag=tag@entry=46320, func=func@entry=0x529a80 <command_loop_2>, 
    arg=arg@entry=0) at eval.c:1079
#16 0x0000000000529a59 in command_loop () at keyboard.c:1091
#17 0x000000000052ec04 in recursive_edit_1 () at keyboard.c:697
#18 Frecursive_edit () at keyboard.c:768
#19 0x0000000000414b60 in main (argc=2, argv=0x7fff2925fb38) at emacs.c:1629
--- snipp

Following information is from emacs running on Windows 7:

In GNU Emacs 25.1.90.2 (x86_64-w64-mingw32)
 of 2016-12-22 built on MD12GA7C
Repository revision: cf1f9852d0e8d571dfe74486c26417828faa945a
Windowing system distributor 'Microsoft Corp.', version 6.1.7601
Configured using:
 'configure --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32
 --build=x86_64-w64-mingw32 --with-wide-int --with-jpeg --with-xpm
 --with-png --with-tiff --with-rsvg --with-xml2 --with-gnutls --with-xft
 --without-imagemagick 'CFLAGS=-static -g3 -O3'
 GIT_VERSION=emacs-24.5-rc3-fixed-8567-gcf1f985'

Configured features:
XPM JPEG TIFF GIF PNG RSVG SOUND NOTIFY ACL GNUTLS LIBXML2 ZLIB
TOOLKIT_SCROLL_BARS

Important settings:
  value of $LANG: en_GB.iso-8859-1
  locale-coding-system: cp1252

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Making completion list...

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message dired format-spec rfc822 mml
mml-sec password-cache epg epg-config gnus-util mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail
rfc2047 rfc2045 ietf-drums mm-util help-fns help-mode easymenu
cl-loaddefs pcase cl-lib mail-prsvr mail-utils time-date mule-util
tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type
mwheel dos-w32 ls-lisp disp-table w32-win w32-vars term/common-win
tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment
elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow timer
select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan
thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian
slovak czech european ethiopic indian cyrillic chinese charscript
case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer
cl-preloaded nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote w32notify w32 multi-tty
make-network-process emacs)

Memory information:
((conses 16 91337 6635)
 (symbols 56 20392 0)
 (miscs 48 47 148)
 (strings 32 17043 4347)
 (string-bytes 1 446534)
 (vectors 16 11864)
 (vector-slots 8 431279 5382)
 (floats 8 159 77)
 (intervals 56 255 13)
 (buffers 976 22))

If more information is needed please tell me.

If my code to have an overlay at the end of compile buffer is wrong please
tell me too.

With kind regards,
Stefan

-- 
Stefan-W. Hahn                          It is easy to make things.
                                        It is hard to make things simple.