From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Toby Cubitt Newsgroups: gmane.emacs.bugs Subject: bug#459: Zero-length overlays, overlay keymaps, and `overlays-at' Date: Tue, 20 Jul 2021 13:34:39 +0000 Message-ID: <20210720124457.GA10470@bb84> References: <485D204B.2@dr-qubit.org> Reply-To: Toby Cubitt Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25796"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Lars Ingebrigtsen , 459@debbugs.gnu.org, monnier@iro.umontreal.ca To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jul 20 15:35:37 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m5puK-0006Lm-Sf for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 20 Jul 2021 15:35:36 +0200 Original-Received: from localhost ([::1]:59896 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m5puJ-0006Ky-RO for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 20 Jul 2021 09:35:35 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59046) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m5ptn-0006J8-BM for bug-gnu-emacs@gnu.org; Tue, 20 Jul 2021 09:35:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49927) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m5ptn-0002NE-2g for bug-gnu-emacs@gnu.org; Tue, 20 Jul 2021 09:35:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m5ptm-0007WL-GO for bug-gnu-emacs@gnu.org; Tue, 20 Jul 2021 09:35:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <485D204B.2@dr-qubit.org> Resent-From: Toby Cubitt Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 20 Jul 2021 13:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 459 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 459-submit@debbugs.gnu.org id=B459.162678809328890 (code B ref 459); Tue, 20 Jul 2021 13:35:02 +0000 Original-Received: (at 459) by debbugs.gnu.org; 20 Jul 2021 13:34:53 +0000 Original-Received: from localhost ([127.0.0.1]:33240 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5ptd-0007Vt-1v for submit@debbugs.gnu.org; Tue, 20 Jul 2021 09:34:53 -0400 Original-Received: from mail-4323.protonmail.ch ([185.70.43.23]:32847) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5pta-0007Vf-9U for 459@debbugs.gnu.org; Tue, 20 Jul 2021 09:34:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dr-qubit.org; s=protonmail; t=1626788082; bh=N5hufbtOGRccwYvvH4/tC5PlTaUq1FYqFNMjhp640lQ=; h=Date:To:From:Cc:Reply-To:Subject:From; b=DiocmcpYyzzBar1CNQgMdaD8q6Yb6XljkFDWmNo+4A0t5HpBMVYacDLzZC5r9aFWQ 3Df5s2PxYXYmI+XWpi8I2jvTET5Dx5eSkJQbA0WjcUOjikOIZYFUVB+c6N6AeSFqSs aZIx9goHoAQR2BTrGliocl2EOMpiaj87yZCuzDBqPZnhLKfdeRXNI7+O/nNZvacmnb cAGML+q7UBaSPPbjxAQuvWz14QX3o1i3A+Izcipzm4f+SC+Iz8F7JlX4wd92bQCXKu RUltPKxZuecIYui4RJGtdZPfYwHwdRYL8CjTVmDosbg8Hvv2ENXGVZFHwXZt1YLNxk Un2SMhbAy8ywg== X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:210351 Archived-At: On Tue, Jul 20, 2021 at 02:50:20PM +0300, Eli Zaretskii wrote: > > From: Lars Ingebrigtsen > > Cc: 459@debbugs.gnu.org, monnier@iro.umontreal.ca, t.s.cubitt.98@cant= ab.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 mig= ht 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 r= eport originated). So I guess I did try it. In which case, apologies from m= y 15-years-ago self for not noting this in the bug report. Maybe the bug re= port was more about the API doing something inconsistent and surprising, wh= ich 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 wo= nder if the proposed change to overlays-at would really break anything? See= ms 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 r= elated (as I wrote back then). The fact that keymap properties of zero-leng= th 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 Emac= s. Is the intention to dismiss that first bug as "won't fix", too? Just fla= gging, 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