Subject: bug#14582: 24.3.50.1; Strange overlay behavior, when window-start is inside an overlay.

From: Eli Zaretskii <[email-masked]>
Date: Sun, 09 Jun 2013 20:06:51 +0300

> Date: Sun, 9 Jun 2013 10:13:09 +0100
> From: E Sabof <[email-masked]>
> 
> Evaluate in emacs -Q
> 
> (let (pt pt2 ws ov)
>   (insert "Lorem ipsum dolor sit amet.")
>   (setq pt (point))
>   (insert "Consectetuer adipiscing elit." "\n")
>   (setq ws (point))
>   (insert "Phasellus lacus." "\n")
>   (insert "Cum sociis natoque penatibus et magnis dis.")
>   (setq pt2 (point))
>   (insert "\n")
>   (insert "Parturient montes, nascetur ridiculus mus." "\n")
>   (insert "Nullam eu ante vel est convallis dignissim." "\n")
>   (set-window-start nil ws)
>   (setq ov (make-overlay pt pt2))
>   (overlay-put ov 'display "..."))
> 
> It will appear as though the overlay is at the beginning of the line, even
> though it's not.

"If it hurts, don't do that."  You've put window-start on a position
that is at the beginning of a line, but happens to be covered by an
overlay.  Emacs obeyed.

What did you expect instead, and why?  Is there some real-life use
case where this causes trouble?