From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: A question about overlay-modification Date: Thu, 24 Nov 2016 18:57:52 +0200 Message-ID: <83eg206cj3.fsf@gnu.org> References: <87inrdgibz.fsf@fastmail.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1480006699 504 195.159.176.226 (24 Nov 2016 16:58:19 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 24 Nov 2016 16:58:19 +0000 (UTC) Cc: emacs-devel@gnu.org To: Joakim Jalap Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Nov 24 17:58:12 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c9xLg-0007FM-Et for ged-emacs-devel@m.gmane.org; Thu, 24 Nov 2016 17:58:12 +0100 Original-Received: from localhost ([::1]:41164 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c9xLi-0007tI-7b for ged-emacs-devel@m.gmane.org; Thu, 24 Nov 2016 11:58:14 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46507) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c9xLc-0007sy-3g for emacs-devel@gnu.org; Thu, 24 Nov 2016 11:58:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c9xLZ-0006SM-30 for emacs-devel@gnu.org; Thu, 24 Nov 2016 11:58:08 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:47849) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c9xLY-0006SI-Vx; Thu, 24 Nov 2016 11:58:05 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4122 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1c9xLY-0002gR-9O; Thu, 24 Nov 2016 11:58:04 -0500 In-reply-to: <87inrdgibz.fsf@fastmail.com> (message from Joakim Jalap on Thu, 24 Nov 2016 13:42:24 +0100) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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:209579 Archived-At: > From: Joakim Jalap > Date: Thu, 24 Nov 2016 13:42:24 +0100 > > To me that looks like the insert-in-front-hooks get run for overlays > which start either at START or END, not only those which start at > END. Likewise (but the other way around) for insert-behind-hooks. Right. But why do you think it's a problem? > What am I missing here? Not sure. Possible candidates: . without the code you cite, overlays ending exactly at START and starting exactly at END won't get their hooks called (see the condition after the snippet you show . some overlays (so-called "empty" overlays) start and end at the same buffer positions, so for them start and end positions are indistinguishable > (As an aside, the doc string mentions insert-before-hooks and > insert-after-hooks, while the code has Qinsert_in_front_hooks and > Qinsert_behind_hooks. Is this intentional or just left overs?) It's one of those cases where the comments lie... Thanks.