GNU bug report logs - #19422
25.0.50; `remove-overlays` needs one additional `point` at end of narrowed region.

Previous Next

Package: emacs;

Reported by: Keith David Bershatsky <esq <at> lawlist.com>

Date: Sun, 21 Dec 2014 08:41:02 UTC

Severity: normal

Found in version 25.0.50

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #14 received at 19422 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Keith David Bershatsky <esq <at> lawlist.com>
Cc: 19422 <at> debbugs.gnu.org
Subject: Re: 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 <at> lawlist.com>
> Cc:  19422 <at> 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.




This bug report was last modified 3 years and 280 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.