From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.bugs Subject: Re: elisp's display.texi: What happens to overlays when text is inserted/deleted? Date: 19 Jan 2004 00:10:20 +0100 Organization: Organization?!? Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1074468170 19835 80.91.224.253 (18 Jan 2004 23:22:50 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 18 Jan 2004 23:22:50 +0000 (UTC) Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jan 19 00:22:41 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AiMFc-0001o4-00 for ; Mon, 19 Jan 2004 00:22:41 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AiMEu-0000Hv-TI for geb-bug-gnu-emacs@m.gmane.org; Sun, 18 Jan 2004 18:21:56 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AiMEM-0008Ke-PT for bug-gnu-emacs@prep.ai.mit.edu; Sun, 18 Jan 2004 18:21:22 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AiMDq-0007uL-Jk for bug-gnu-emacs@prep.ai.mit.edu; Sun, 18 Jan 2004 18:21:21 -0500 Original-Received: from [199.232.41.8] (helo=mx20.gnu.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.24) id 1AiM7C-0002vd-F5 for bug-gnu-emacs@prep.ai.mit.edu; Sun, 18 Jan 2004 18:13:58 -0500 Original-Received: from [216.168.1.22] (helo=trinity.supernews.net) by mx20.gnu.org with esmtp (Exim 4.24) id 1AiM3m-0006IP-PF for bug-gnu-emacs@prep.ai.mit.edu; Sun, 18 Jan 2004 18:10:26 -0500 Original-Received: from mail.fu-berlin.de ([160.45.11.165]:45781 ident=root) by trinity.supernews.net with esmtp (Exim 4.24; FreeBSD) id 1AiM3l-0008NF-Lo for gnu-emacs-bug@moderators.isc.org; Sun, 18 Jan 2004 23:10:25 +0000 Original-Received: by mail.fu-berlin.de (Smail3.2.0.98) from Curry.ZEDAT.FU-Berlin.DE (160.45.10.36) with esmtp id ; Mon, 19 Jan 2004 00:10:18 +0100 (MET) Original-Received: by Curry.ZEDAT.FU-Berlin.DE (Smail3.2.0.98) from news.fu-berlin.de with bsmtp id ; Mon, 19 Jan 2004 00:10:18 +0100 (MET) Original-To: gnu-emacs-bug@moderators.isc.org Original-Path: p3ee20bf3.dip.t-dialin.NET!not-for-mail Original-Newsgroups: gnu.emacs.bug Original-Lines: 39 X-Orig-NNTP-Posting-Host: p3ee20bf3.dip.t-dialin.net (62.226.11.243) X-Orig-X-Trace: news.uni-berlin.de 1074467417 17887539 62.226.11.243 ([198409]) X-Face: 2FEFf>]>q>2iw=B6, xrUubRI>pR&Ml9=ao@P@i)L:\urd*t9M~y1^:+Y]'C0~{mAl`oQuAl \!3KEIp?*w`|bL5qr,H)LFO6Q=qx~iH4DN; i"; /yuIsqbLLCh/!U#X[S~(5eZ41to5f%E@'ELIi$t^ Vc\LWP@J5p^rst0+('>Er0=^1{]M9!p?&:\z]|;&=NP3AhB!B_bi^]Pfkw User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Bug reports for GNU Emacs, the Swiss army knife of text editors List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.bugs:6628 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:6628 Alan Mackenzie 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