all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* elisp's display.texi: What happens to overlays when text is inserted/deleted?
@ 2004-01-18 18:38 Alan Mackenzie
  0 siblings, 0 replies; 2+ messages in thread
From: Alan Mackenzie @ 2004-01-18 18:38 UTC (permalink / raw)


[-- Attachment #1: Type: TEXT/PLAIN, Size: 408 bytes --]

Elisp manual's display.texi.  Section "Overlays".

In Emacs, when text is inserted into/deleted from a buffer in which an
overlay exists, the overlay's beginning and end are updated much like
markers are.

The Elisp manual (display.texi) doesn't say this explicitly - I think it
should.

Attached is a patch to display.texi which adds this info, and a ChangeLog
entry.

-- 
Alan Mackenzie (Munich, Germany)


[-- Attachment #2: display-1.111.texi.diff --]
[-- Type: TEXT/PLAIN, Size: 822 bytes --]

*** display-1.111.texi	Fri Jan 16 20:36:33 2004
--- display-1.111.acm.texi	Sun Jan 18 18:00:51 2004
***************
*** 966,971 ****
--- 966,978 ----
  beginning and end.  It also has properties that you can examine and set;
  these affect the display of the text within the overlay.
  
+ If text is inserted into or deleted from the buffer before the range
+ covered by an overlay, the beginning and end of the overlay are
+ automatically adjusted so that it continues to cover the same range of
+ text.  Similarly, if text is inserted into or deleted from the inside of
+ the range covered by an overlay, the overlay gets expanded or shrunk
+ accordingly by adjusting its end position.
+ 
  @menu
  * Overlay Properties::  How to read and set properties.
  			What properties do to the screen display.

[-- Attachment #3: ChangeLog Entry --]
[-- Type: TEXT/PLAIN, Size: 198 bytes --]

2004-01-18  Alan Mackenzie  <acm@muc.de>

	* display.texi: Note that when text is inserted into/deleted from
	a buffer, any overlay's beginning and end positions are
	automatically adjusted.


[-- Attachment #4: Type: text/plain, Size: 148 bytes --]

_______________________________________________
Bug-gnu-emacs mailing list
Bug-gnu-emacs@gnu.org
http://mail.gnu.org/mailman/listinfo/bug-gnu-emacs

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

* Re: elisp's display.texi: What happens to overlays when text is inserted/deleted?
       [not found] <mailman.862.1074451008.928.bug-gnu-emacs@gnu.org>
@ 2004-01-18 23:10 ` David Kastrup
  0 siblings, 0 replies; 2+ messages in thread
From: David Kastrup @ 2004-01-18 23:10 UTC (permalink / raw)


Alan Mackenzie <acm@muc.de> writes:

> Elisp manual's display.texi.  Section "Overlays".
> 
> In Emacs, when text is inserted into/deleted from a buffer in which an
> overlay exists, the overlay's beginning and end are updated much like
> markers are.
> 
> The Elisp manual (display.texi) doesn't say this explicitly - I think it
> should.
> 
> Attached is a patch to display.texi which adds this info, and a ChangeLog
> entry.

Please don't put patches in your signature: that makes it difficult
to answer to them as they are not quoted by the mail reader.

+ If text is inserted into or deleted from the buffer before the range
+ covered by an overlay, the beginning and end of the overlay are
+ automatically adjusted so that it continues to cover the same range of
+ text.  Similarly, if text is inserted into or deleted from the inside of
+ the range covered by an overlay, the overlay gets expanded or shrunk
+ accordingly by adjusting its end position.

This is misleading at best.  If text is inserted into the buffer
immediately before the overlay, dependending on the insertion
property of the overlay start, this text becomes part of the
overlay.  The second sentence is similarly misleading, since it does
not cover whether text inserted at the end of the overlay is
considered "inside" or not: again this depends on the insert property
of the overlay end marker.

The correct explanation is that that overlay beginning and end work
like markers with the appropriate marker-insertion-type as specified
to make-overlay.  If any explanation is added beyond that, it should
not be fuzzy, incomplete or incorrect.  That is not an advantage.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

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

end of thread, other threads:[~2004-01-18 23:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.862.1074451008.928.bug-gnu-emacs@gnu.org>
2004-01-18 23:10 ` elisp's display.texi: What happens to overlays when text is inserted/deleted? David Kastrup
2004-01-18 18:38 Alan Mackenzie

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.