all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 459@debbugs.gnu.org, t.s.cubitt.98@cantab.net
Subject: bug#459: Zero-length overlays, overlay keymaps, and `overlays-at'
Date: Mon, 19 Jul 2021 19:29:05 +0300	[thread overview]
Message-ID: <83y2a25ktq.fsf@gnu.org> (raw)
In-Reply-To: <875yx6mijw.fsf@gnus.org> (message from Lars Ingebrigtsen on Mon,  19 Jul 2021 17:26:11 +0200)

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Date: Mon, 19 Jul 2021 17:26:11 +0200
> Cc: 459@debbugs.gnu.org
> 
> > Suggestions for possible fixes:
> > -------------------------------
> > a) Modify (overlays-at pos) to return zero-length overlays that start
> > at pos (it already returns all other overlays that start at
> > pos). Again, this seems unlikely to have significant impact on other
> > parts of Emacs, since zero-length overlays are rarely used.
> >
> > b) Modify (overlays-at pos) to return zero-length overlays that start
> > at pos, and have a null front-advance and non-nil rear-advance
> > property. (The logic for this is the same as in option b) for the
> > overlay keymaps issue.)
> >
> > c) Leave `overlays-at' unchanged, and define a new function
> > `overlays-at-point' that implements either a) or b).
> 
> Hm...  the issue here is that if a zero-length overlay has a
> read-advance property, then it can influence what happens when you type
> something at that position.  So b) makes sense to me on that level.
> 
> But I'd worry that it'd break code that's not aware of zero-length
> overlays.  And introducing a new function doesn't seem very attractive.

We could add a new optional argument to overlays-at, to make it return
such overlays.  That would avoid the risk of breaking unsuspecting
callers.





  reply	other threads:[~2021-07-19 16:29 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-21 15:37 bug#459: Zero-length overlays, overlay keymaps, and `overlays-at' Toby Cubitt
2008-06-22 11:31 ` Toby Cubitt
2021-07-19 15:26 ` Lars Ingebrigtsen
2021-07-19 16:29   ` Eli Zaretskii [this message]
2021-07-19 16:37     ` Lars Ingebrigtsen
2021-07-19 16:49       ` Eli Zaretskii
2021-07-19 18:19       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-07-19 18:23         ` Lars Ingebrigtsen
2021-07-19 18:35           ` Eli Zaretskii
2021-07-20 11:28             ` Lars Ingebrigtsen
2021-07-20 11:50               ` Eli Zaretskii
2021-07-20 13:34 ` Toby Cubitt
2021-07-20 13:46   ` Lars Ingebrigtsen
2021-07-20 15:23   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-07-20 14:30 ` Toby Cubitt
2021-07-21 10:36   ` Lars Ingebrigtsen
  -- strict thread matches above, loose matches on Subject: below --
2008-08-05 23:05 Chong Yidong

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=83y2a25ktq.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=459@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    --cc=t.s.cubitt.98@cantab.net \
    /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.