bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#19422: 25.0.50; `remove-overlays` needs one additional `point` at en


From: Eli Zaretskii
Subject: bug#19422: 25.0.50; `remove-overlays` needs one additional `point` at end of narrowed region.
Date: Mon, 22 Dec 2014 18:32:01 +0200

> Date:  Sun, 21 Dec 2014 09:42:36 -0800
> From:  Keith David Bershatsky <esq@lawlist.com>
> Cc:  19422@debbugs.gnu.org
> 
> In my particular use case, I am narrowing to a region and then inserting an 
> `after-string` overlay at `point-max`:
> 
> (overlay-put (make-overlay (point-max) (point-max)) 'after-string "|")
> 
> I have a minor mode that draws a vertical line that tracks the cursor 
> position and I extend that to window-end or point-max.  The end of the buffer 
> has a different color and a different character overlay depending upon where 
> `point` is --- a leading cushion is used if the vertical column extends 
> beyond the point at the end of the line.

It looks like overlays-in treats EOB specially, and does not treat
(point-max) in the same way.  This is explicitly stated in the doc
string of overlays-in.

I don't know what are the reasons for such a special treatment, and
why a narrowed region doesn't get the same treatment.  I always
thought that Emacs treats both the same.  Perhaps all we need is to
give both the same treatment, and that's it.

Besides that, the doc string of remove-overlays is inaccurate and
misleading; I will take care of that.





reply via email to

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