From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.devel Subject: RE: Overlay insertion types, markers, etc. Date: Wed, 13 Nov 2019 07:36:14 -0800 (PST) Message-ID: <4e3fe50d-5a72-41bf-8434-579406f4464c@default> References: <20c74b83-6272-44e9-b4ac-829fd4cd0143@default> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="165502"; mail-complaints-to="usenet@blaine.gmane.org" To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Nov 13 16:36:33 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iUuh5-000gtY-Nx for ged-emacs-devel@m.gmane.org; Wed, 13 Nov 2019 16:36:31 +0100 Original-Received: from localhost ([::1]:46520 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iUuh4-0005Dx-Dj for ged-emacs-devel@m.gmane.org; Wed, 13 Nov 2019 10:36:30 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35657) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iUugv-000590-2i for emacs-devel@gnu.org; Wed, 13 Nov 2019 10:36:22 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iUugt-0005nL-JU for emacs-devel@gnu.org; Wed, 13 Nov 2019 10:36:20 -0500 Original-Received: from aserp2120.oracle.com ([141.146.126.78]:57424) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iUugt-0005mz-8p for emacs-devel@gnu.org; Wed, 13 Nov 2019 10:36:19 -0500 Original-Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.27/8.16.0.27) with SMTP id xADFZJOI151046 for ; Wed, 13 Nov 2019 15:36:17 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2019-08-05; bh=gzEi7QVt73JY0Md5Cq5zzPbXWQfSrHdo3nPHavnerb4=; b=r9886o8JQ4vMAOwOA3+CTQpHi8iXC44ojCohhwG2xFo+N05+RMTirCdHardd1kVGlQ9g +qRpeqAlnX74vlS+r4Cj+KCaVrouplfkeOIEmwvs19JssFa9PKH66OhuWA6onuw6ba2b Ipnk2A6pW10Mk6xC9Jyk2/Zszq/F8KIPwVD5KnrT6Qa4zhVebG2ZqFnMt/sAn8clsZ1r pEhYuWUXZgOJuT3j/hSrYufXNi0h+f+QZlvD4GfwWiijUHMZn20zFv0lqGNZItQ+mUJo OdNhnqDQgY3VtaU1wynwPN5IdmvLTtSFYioC4Co2okQLQlZELOqmaI8G7XLr/gIOXFF8 sw== Original-Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by aserp2120.oracle.com with ESMTP id 2w5ndqd8k2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 13 Nov 2019 15:36:17 +0000 Original-Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.27/8.16.0.27) with SMTP id xADFDXGs015100 for ; Wed, 13 Nov 2019 15:36:16 GMT Original-Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userp3020.oracle.com with ESMTP id 2w7vbd2hmw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 13 Nov 2019 15:36:16 +0000 Original-Received: from abhmp0016.oracle.com (abhmp0016.oracle.com [141.146.116.22]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id xADFaF72003873 for ; Wed, 13 Nov 2019 15:36:15 GMT In-Reply-To: <20c74b83-6272-44e9-b4ac-829fd4cd0143@default> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4900.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9439 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1910280000 definitions=main-1911130142 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9439 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1910280000 definitions=main-1911130143 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 141.146.126.78 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:242124 Archived-At: ping. I really would like to know about this, if someone has an idea. Thx. ___ > From (elisp) `Overlays': >=20 > "An overlay uses markers to record its beginning and end." >=20 > 1. You can create an overlay with `make-overlay', > passing it markers. >=20 > But the insertion types of those markers are not used > for that overlay. Instead, you can specify those types > for the overlay as optional `make-overlay' args. By > default, text you insert at the beginning, but not at > the end, of the overlay is included in the (extended) > overlay. >=20 > First question: >=20 > Why, if you pass markers, isn't the default to use > the insertion types of those markers? >=20 >=20 > 2. `make-overlay' seems to be the only way to specify > the insertion types for an overlay. Is that right, > or did I miss something? `move-overlay' doesn't let > you specify them, nor does `copy-overlay'. (And I > don't see this being handled by `overlay-put'' - they > are not overlay properties.) >=20 > There are hook properties `insert-in-front-hooks' > and `insert-behind-hooks'. But that's not the same. >=20 > Second question: >=20 > Why isn't there (or is there?) a simple way to > change the "marker insertion types" of an existing > overlay? >=20 > Suppose you want to copy an existing overlay and > then change some things in the copy. You can't > change the insertion types for it, right? >=20 > I guess you need to use `make-overlay', specifying > insertion types, and then explicitly copy everything > else from the first overlay. Is that right? >=20 >=20 > 3. Similarly, the default BUFFER for `make-overlay' > is the current buffer, even if you pass markers. >=20 > Third question (similar to the first): >=20 > Why, if you pass markers to `make-overlay', and > you don't pass arg BUFFER, isn't the default to > use the buffer of those markers? >=20 >=20 > 4. (Repeating) "An overlay uses markers to record > its beginning and end." >=20 > It seems that an overlay "uses markers" but those > aren't the markers you passed to `make-overlay'. > Is that right? >=20 > Fourth question (also similar to the first): >=20 > Can you retrieve the markers that are "used by" > an overlay, i.e., as markers? I don't see that > you can. (`overlay-start' and `overlay-end', > for example, don't give you markers.) You can > of course create suitable (but separate) markers. >=20 > (elisp) `Managing Overlays' says, about > `move-overlay': >=20 > "This is the only valid way to change the endpoints > of an overlay. Do not try modifying the markers in > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > the overlay by hand, as that fails to update other > vital data structures and can cause some overlays > to be lost." >=20 > That makes me wonder. I don't even see how you > could try to "modify the markers of the overlay" > (with Lisp). How so? How to get those markers? >=20 >=20 > I feel like I'm probably missing something here, > but I don't notice it in the manual, doc strings, > or Lisp code (only `remove-overlay' and > `copy-overlay' are coded in Lisp, it seems). >=20 > Do I understand the situation correctly? If so, > what's the rationale for it? I'm guessing there > are good reasons?