all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Joakim Jalap <joakim.jalap@fastmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: A question about overlay-modification
Date: Fri, 25 Nov 2016 09:39:21 +0100	[thread overview]
Message-ID: <87eg20gdhi.fsf@fastmail.com> (raw)
In-Reply-To: <83eg206cj3.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 24 Nov 2016 18:57:52 +0200")

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Joakim Jalap <joakim.jalap@fastmail.com>
>> 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



  reply	other threads:[~2016-11-25  8:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-24 12:42 A question about overlay-modification Joakim Jalap
2016-11-24 16:57 ` Eli Zaretskii
2016-11-25  8:39   ` Joakim Jalap [this message]
2016-11-25 10:14     ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87eg20gdhi.fsf@fastmail.com \
    --to=joakim.jalap@fastmail.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.