unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Overlays at the end of the buffer does not reach it
@ 2008-03-24 20:40 Lennart Borgman (gmail)
  2008-03-25  1:39 ` Stefan Monnier
  2008-03-25 18:31 ` Richard Stallman
  0 siblings, 2 replies; 5+ messages in thread
From: Lennart Borgman (gmail) @ 2008-03-24 20:40 UTC (permalink / raw)
  To: Emacs Devel

If you put an overlay at the end of the buffer and then put point at the 
  end of the buffer then point is outside the overlay.

That prevents the use of overlay keymaps at the end of the buffer. I 
therefor suggest that in this case the point should be regarded to be 
within the overlay.

Or, alternatively that move-overlay used with something like

   (widen)
   (move-overlay ovl beg (1+ (point-max)))

should make the overlay behave the way I suggest.

However when inserting text at the end of the buffer I guess that text 
still should be regarded as placed after the overlay. Otherwise it would 
be very inconvenient to add text after the overlay.




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Overlays at the end of the buffer does not reach it
  2008-03-24 20:40 Overlays at the end of the buffer does not reach it Lennart Borgman (gmail)
@ 2008-03-25  1:39 ` Stefan Monnier
  2008-03-25  2:19   ` Lennart Borgman (gmail)
  2008-03-25 18:31 ` Richard Stallman
  1 sibling, 1 reply; 5+ messages in thread
From: Stefan Monnier @ 2008-03-25  1:39 UTC (permalink / raw)
  To: Lennart Borgman (gmail); +Cc: Emacs Devel

> If you put an overlay at the end of the buffer and then put point at the end
> of the buffer then point is outside the overlay.

Doesn't it depend on the insertion type of the end of the overlay?
I.e. (make-overlay (point) (point-max) nil nil t) should work.
I'm not claiming it does, but if it doesn't, I think it's a bug.


        Stefan




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Overlays at the end of the buffer does not reach it
  2008-03-25  1:39 ` Stefan Monnier
@ 2008-03-25  2:19   ` Lennart Borgman (gmail)
  0 siblings, 0 replies; 5+ messages in thread
From: Lennart Borgman (gmail) @ 2008-03-25  2:19 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Emacs Devel

Stefan Monnier wrote:
>> If you put an overlay at the end of the buffer and then put point at the end
>> of the buffer then point is outside the overlay.
> 
> Doesn't it depend on the insertion type of the end of the overlay?
> I.e. (make-overlay (point) (point-max) nil nil t) should work.
> I'm not claiming it does, but if it doesn't, I think it's a bug.

Yes, it works the way you say. Thanks.




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Overlays at the end of the buffer does not reach it
  2008-03-24 20:40 Overlays at the end of the buffer does not reach it Lennart Borgman (gmail)
  2008-03-25  1:39 ` Stefan Monnier
@ 2008-03-25 18:31 ` Richard Stallman
  2008-03-25 20:14   ` Lennart Borgman (gmail)
  1 sibling, 1 reply; 5+ messages in thread
From: Richard Stallman @ 2008-03-25 18:31 UTC (permalink / raw)
  To: Lennart Borgman (gmail); +Cc: emacs-devel

    If you put an overlay at the end of the buffer and then put point at the 
      end of the buffer then point is outside the overlay.

    That prevents the use of overlay keymaps at the end of the buffer. I 
    therefor suggest that in this case the point should be regarded to be 
    within the overlay.

This issue calls for very careful thought.  The change you're proposing
would be useful, but it would be an inconsistency.  Inconsistencies
in the meaning of Lisp data tend to bite you.  For instance, what happens
if you narrow and set ZV to the place where an overlay ends.
Does that cause the overlay to start affecting the position at the end
whereas previously it did not?

If this doesn't depend on the marker insertion type of each end of the
overlay, perhaps making it depend on that is a good solution.




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Overlays at the end of the buffer does not reach it
  2008-03-25 18:31 ` Richard Stallman
@ 2008-03-25 20:14   ` Lennart Borgman (gmail)
  0 siblings, 0 replies; 5+ messages in thread
From: Lennart Borgman (gmail) @ 2008-03-25 20:14 UTC (permalink / raw)
  To: rms; +Cc: Stefan Monnier, emacs-devel

Richard Stallman wrote:
> If this doesn't depend on the marker insertion type of each end of the
> overlay, perhaps making it depend on that is a good solution.

It does depend on the marker insertion type. Stefan told this and I 
sorry for the trouble I caused here. (And of course a bit ashamed I 
missed that.)




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-03-25 20:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-24 20:40 Overlays at the end of the buffer does not reach it Lennart Borgman (gmail)
2008-03-25  1:39 ` Stefan Monnier
2008-03-25  2:19   ` Lennart Borgman (gmail)
2008-03-25 18:31 ` Richard Stallman
2008-03-25 20:14   ` Lennart Borgman (gmail)

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).