From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Joakim Jalap Newsgroups: gmane.emacs.devel Subject: Re: A question about overlay-modification Date: Fri, 25 Nov 2016 09:39:21 +0100 Message-ID: <87eg20gdhi.fsf@fastmail.com> References: <87inrdgibz.fsf@fastmail.com> <83eg206cj3.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1480063216 27468 195.159.176.226 (25 Nov 2016 08:40:16 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 25 Nov 2016 08:40:16 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (berkeley-unix) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 25 09:40:07 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 1cAC3C-0005vd-QY for ged-emacs-devel@m.gmane.org; Fri, 25 Nov 2016 09:40:07 +0100 Original-Received: from localhost ([::1]:44667 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cAC3G-0003oN-Ha for ged-emacs-devel@m.gmane.org; Fri, 25 Nov 2016 03:40:10 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47347) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cAC2e-0003oF-7e for emacs-devel@gnu.org; Fri, 25 Nov 2016 03:39:33 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cAC2c-0005om-VY for emacs-devel@gnu.org; Fri, 25 Nov 2016 03:39:32 -0500 Original-Received: from out5-smtp.messagingengine.com ([66.111.4.29]:36105) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cAC2X-0005kB-N5; Fri, 25 Nov 2016 03:39:25 -0500 Original-Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id BD72C206AC; Fri, 25 Nov 2016 03:39:24 -0500 (EST) Original-Received: from frontend1 ([10.202.2.160]) by compute4.internal (MEProxy); Fri, 25 Nov 2016 03:39:24 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.com; h=cc :content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=5E/HWJ+stJ3kjxtU4XmB8JF2YxE=; b=Ng6F/2 nfkvt2Rvz3XkqGtkyXNoHdsDXTJgEJkskZB0PLZTxv5la5XtrVpvjqXNrOyICQmF FJNsdlA0ChI4rauOP9czARJnfOJ8RungOghym9hTQlE8L3B1GxJk8RFdG9+qmc4D NMsixsEnS3VnUJcCdL+z+qD2lbfR9cYgADtIY= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=smtpout; bh=5E/HWJ+stJ3kjx tU4XmB8JF2YxE=; b=DOy9BGfp7vEtzV4FdgXk6rl3ibi0L3U0pZC9xijkjKUiM2 ZSNPHVvduKPe3zhYSFg8xhDZzlm6HaBvFOF/dgcY7DVRYbcLeSkBoy87bk3/0Dhs QbztSyZwate9IIE2/kqJMBZT+jCxl7DlrVTCBeMgxUoC65prreTo6fdDivdUQ= X-ME-Sender: X-Sasl-enc: Qm1jTzwIUmGKBwLFbYDpwIhTAZaJk/4Kjey/7kabw1JK 1480063164 Original-Received: from genserv (unknown [5.150.202.248]) by mail.messagingengine.com (Postfix) with ESMTPA id 242E17EA44; Fri, 25 Nov 2016 03:39:24 -0500 (EST) In-Reply-To: <83eg206cj3.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 24 Nov 2016 18:57:52 +0200") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.111.4.29 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:209586 Archived-At: Eli Zaretskii writes: >> 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? I don't think it's a problem :) I was just trying to understand why it is the way it is, and if it should actually be that way. And I guess the answer is that it should :) >> 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 But the condition after the snippet I showed concerns different hooks. > . some overlays (so-called "empty" overlays) start and end at the > same buffer positions, so for them start and end positions are > indistinguishable True, but the condition is an 'or', so I guess they would have their hooks called anyway. >> (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... Then I will rewrite it when I get to there :) > Thanks. Thank you! -- Joakim