unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Toby Cubitt <toby@dr-qubit.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Lars Ingebrigtsen <larsi@gnus.org>,
	459@debbugs.gnu.org, monnier@iro.umontreal.ca
Subject: bug#459: Zero-length overlays, overlay keymaps, and `overlays-at'
Date: Tue, 20 Jul 2021 13:34:39 +0000	[thread overview]
Message-ID: <20210720124457.GA10470@bb84> (raw)
In-Reply-To: <485D204B.2@dr-qubit.org>

On Tue, Jul 20, 2021 at 02:50:20PM +0300, Eli Zaretskii wrote:
> > From: Lars Ingebrigtsen <larsi@gnus.org>
> > Cc: 459@debbugs.gnu.org,  monnier@iro.umontreal.ca,  t.s.cubitt.98@cantab.net
> > Date: Tue, 20 Jul 2021 13:28:10 +0200
> >
> > However...  after implementing this, I see that `overlays-in' is
> > something that exists?  And does include zero-length overlays?  *sigh*
> > So `(overlays-in 1 1)' is the answer to this bug report.
>
> Oops.  For some reason, I was under the impression that the OP tried
> overlays-in as well.  I now see that I've just imagined that.  Sorry.

The OP on this was so much younger when he submitted the bug report, he might as well have been a different person :)

At this length of time, I can't remember for sure. But it looks like I used overlays-in as a workaround in the auto-overlays package (where this bug report originated). So I guess I did try it. In which case, apologies from my 15-years-ago self for not noting this in the bug report. Maybe the bug report was more about the API doing something inconsistent and surprising, which looked like a bug rather than deliberate?

Still seems surprising to me that overlays-at won't return all overlays "at" point, but overlays-in will return overlays that technically aren't "in" the specified region. (The emptyset canonically contains no elements.) I wonder if the proposed change to overlays-at would really break anything? Seems like a case where adding an optional argument or some such, deprecating the current default behaviour, issuing a warning for x decades, then making the change to overlays-in, would clean up the API here.

But I bow to your judgement on the cost-benefit of backwards-compatibility versus API ugliness.

I do remember that the first half of this bug report, about the interacting between overlay keymaps and zero-length overlays, was more significant. I included the overlays-at part of the bug report, as I thought it might be related (as I wrote back then). The fact that keymap properties of zero-length overlays do not apply, irrespective of the front/read-advance properties, means it's impossible to bind a key at a single point location in Emacs. It required an ugly kludge to work around this in the auto-overlays package.

This first bug in the report still seems to be there in current stable Emacs. Is the intention to dismiss that first bug as "won't fix", too? Just flagging, in case that part got missed.

Best wishes,
Toby
--
Dr T. S. Cubitt
Reader (Associate Professor) in Quantum Information
Royal Society University Research Fellow
Department of Computer Science
University College London

email: tsc25@cantab.net
web:   www.dr-qubit.org







  parent reply	other threads:[~2021-07-20 13:34 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
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 [this message]
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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=20210720124457.GA10470@bb84 \
    --to=toby@dr-qubit.org \
    --cc=459@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=larsi@gnus.org \
    --cc=monnier@iro.umontreal.ca \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).