From unknown Tue Aug 19 12:49:43 2025 X-Loop: don@donarmstrong.com Subject: bug#459: Zero-length overlays, overlay keymaps, and `overlays-at' Reply-To: Toby Cubitt , 459@debbugs.gnu.org Resent-From: Toby Cubitt Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sat, 21 Jun 2008 15:45:03 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 459 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.121406268729322 (code B ref -1); Sat, 21 Jun 2008 15:45:03 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-5.0 required=4.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 21 Jun 2008 15:38:07 +0000 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m5LFc2SL029316 for ; Sat, 21 Jun 2008 08:38:04 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KA5A9-0003UR-ET for bug-gnu-emacs@gnu.org; Sat, 21 Jun 2008 11:38:01 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KA5A5-0003U9-6n for bug-gnu-emacs@gnu.org; Sat, 21 Jun 2008 11:38:00 -0400 Received: from [199.232.76.173] (port=41256 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KA5A5-0003U6-2u for bug-gnu-emacs@gnu.org; Sat, 21 Jun 2008 11:37:57 -0400 Received: from mail.geekisp.com ([216.168.135.169]:15176 helo=starfish.geekisp.com) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KA5A4-0006cO-G6 for bug-gnu-emacs@gnu.org; Sat, 21 Jun 2008 11:37:57 -0400 Received: (qmail 6244 invoked by uid 1003); 21 Jun 2008 15:37:50 -0000 Received: from [192.168.2.2] (localhost.geekisp.com [127.0.0.1]) by localhost.geekisp.com (tmda-ofmipd) with ESMTP; Sat, 21 Jun 2008 11:37:48 -0400 Message-ID: <485D204B.2@dr-qubit.org> Date: Sat, 21 Jun 2008 16:37:47 +0100 User-Agent: Thunderbird 2.0.0.14 (X11/20080508) MIME-Version: 1.0 To: bug-gnu-emacs@gnu.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Delivery-Agent: TMDA/1.1.11 (Ladyburn) From: Toby Cubitt X-Primary-Address: t.s.cubitt.98@cantab.net X-detected-kernel: by monty-python.gnu.org: OpenBSD 3.0-3.9 Two separate issues involving zero-length overlays. By "zero-length", I mean an overlay that starts and ends at the same position. (I'm not knowledgeable enough about Emacs' c internals to work it out whether these issues are fundamentally related or not.) Strictly speaking, neither of these issues are bugs, since the behaviour is consistent with the documentation. But it makes it difficult or impossible to do certain things in Emacs that one would expect to be able to do. Both "bugs" have been present since version 21, including the current stable version and in recent CVS (20.0.60.1). 1. Overlay keymaps ================== "Bug" description: ------------------ When a zero-length overlay has a keymap property, that keymap is never active, even if when the point is at the overlay's start (and end) position. This makes it impossible in Emacs to define a key binding that is only active at a single point in the buffer. Steps to reproduce: ------------------- (setq test-overlay (make-overlay 1 1)) ; any position will do (overlay-put test-overlay 'keymap (make-sparse-keymap)) ;; any key binding will do (define-key (overlay-get test-overlay 'keymap) "a" 'end-of-line) Move point to position 1. Type "a". The character "a" is inserted instead of the point moving to the end of the line. Impact: ------- Zero-length overlays are probably rarely used. But it is strange to be able to define a keybinding in Emacs that is active at two or more neighbouring point positions, but not at a single point position. At the very least, this is a missing feature. When this behaviour *is* needed (as in my completion-UI and auto-overlays packages), it is extremely difficult to work-around this issue. In fact, it requires abandoning overlay keymaps entirely, and simulating this behaviour via minor-mode maps and an ugly hack to check for overlays, temporarily disable the minor-mode map if no overlay was found, look up the keybinding again, call whatever command it is now bound to it, then re-enable the minor-mode map. Suggestions for possible fixes: ------------------------------- a) Make overlay keymaps active when the point is at the start, end, or within the overlay (currently, it is only active when the next character is within the overlay). This seems unlikely to have significant impact on other parts of Emacs, since zero-length overlays are rarely used. b) If a) is undesirable, why not make the behaviour depend on the overlay's front-advance and read-advance properties? If the zero-length overlay has null front-advance and non-null read-advance, then there is some logic in making its keymap active when point is at that position, since any character inserted at that point will be within the overlay after insertion. c) Add another overlay property to control the keymap behaviour in the case of zero-length overlays. (This seems an ugly solution to me, since it involves adding a whole new property just to deal with a very rare edge-case.) 2. `overlays-at' ================ "Bug" description: ------------------ `overlays-at' never returns zero-length overlays. Steps to reproduce: ------------------- (make-overlay 1 1) ; any position will do (overlays-at 1) Returns nil instead of the overlay from 1 to 1. Impact: ------- Again, zero-length overlays are probably rarely used. But this makes it impossible in Emacs to find a zero-length overlay using `overlays-at'. Instead, one has to work-around this using three calls to `overlays-in' then filter out overlays that shouldn't be in the list. Overlays do fairly frequently become zero-length when the text they cover is deleted (depending on their front- and rear-advance properties), and this "bug" makes them suddenly disappear from the return value of `overlays-at' even though they still exist in the buffer. 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). Toby Cubitt From unknown Tue Aug 19 12:49:43 2025 X-Loop: don@donarmstrong.com Subject: bug#459: Zero-length overlays, overlay keymaps, and `overlays-at' Reply-To: Toby Cubitt , 459@debbugs.gnu.org Resent-From: Toby Cubitt Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sun, 22 Jun 2008 11:40:04 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 459 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 459-submit@emacsbugs.donarmstrong.com id=B459.121413432432036 (code B ref 459); Sun, 22 Jun 2008 11:40:04 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-3.9 required=4.0 tests=BAYES_00,FOURLA autolearn=no version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 459) by emacsbugs.donarmstrong.com; 22 Jun 2008 11:32:04 +0000 Received: from starfish.geekisp.com (mail.geekisp.com [216.168.135.169]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m5MBW0XM032030 for <459@emacsbugs.donarmstrong.com>; Sun, 22 Jun 2008 04:32:02 -0700 Received: (qmail 20256 invoked by uid 1003); 22 Jun 2008 11:31:55 -0000 Received: from [192.168.2.3] (localhost.geekisp.com [127.0.0.1]) by localhost.geekisp.com (tmda-ofmipd) with ESMTP; Sun, 22 Jun 2008 07:31:49 -0400 Message-ID: <485E3824.6030405@dr-qubit.org> Date: Sun, 22 Jun 2008 12:31:48 +0100 User-Agent: Thunderbird 2.0.0.14 (X11/20080508) MIME-Version: 1.0 To: 459@debbugs.gnu.org References: <485D204B.2@dr-qubit.org> In-Reply-To: <485D204B.2@dr-qubit.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Delivery-Agent: TMDA/1.1.11 (Ladyburn) From: Toby Cubitt X-Primary-Address: toby@dr-qubit.org Looking through NEWS.22, I came upon the following: *** The `keymap' property now also works at the ends of overlays and text properties, according to their stickiness. This also means that it works with empty overlays. The same hold for the `local-map' property. So the first issue I reported is already fixed! (In exactly the way I suggested, which makes me suspect that future-bug might now have been fixed too... :) However, this behaviour isn't documented in the Emacs Lisp manual (unless I've overlooked something yet again), which *is* a bug. I think the second issue still remains, though. Toby Toby Cubitt wrote: [...] > 1. Overlay keymaps > ================== > > "Bug" description: > ------------------ > When a zero-length overlay has a keymap property, that keymap is never > active, even if when the point is at the overlay's start (and end) > position. This makes it impossible in Emacs to define a key binding that > is only active at a single point in the buffer. [...] > > Suggestions for possible fixes: > ------------------------------- [...] > b) If a) is undesirable, why not make the behaviour depend on the > overlay's front-advance and read-advance properties? If the zero-length > overlay has null front-advance and non-null read-advance, then there is > some logic in making its keymap active when point is at that position, > since any character inserted at that point will be within the overlay > after insertion. [...] > > > 2. `overlays-at' > ================ > > "Bug" description: > ------------------ > `overlays-at' never returns zero-length overlays. > > > Steps to reproduce: > ------------------- > (make-overlay 1 1) ; any position will do > (overlays-at 1) > > Returns nil instead of the overlay from 1 to 1. > > > Impact: > ------- > Again, zero-length overlays are probably rarely used. But this makes it > impossible in Emacs to find a zero-length overlay using `overlays-at'. > Instead, one has to work-around this using three calls to `overlays-in' > then filter out overlays that shouldn't be in the list. > > Overlays do fairly frequently become zero-length when the text they > cover is deleted (depending on their front- and rear-advance > properties), and this "bug" makes them suddenly disappear from the > return value of `overlays-at' even though they still exist in the buffer. > > > 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). > > > Toby Cubitt > From unknown Tue Aug 19 12:49:43 2025 X-Loop: don@donarmstrong.com Subject: bug#459: Zero-length overlays, overlay keymaps, and `overlays-at' Reply-To: Chong Yidong , 459@debbugs.gnu.org Resent-From: Chong Yidong Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Tue, 05 Aug 2008 23:10:05 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 459 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 459-submit@emacsbugs.donarmstrong.com id=B459.121797751131875 (code B ref 459); Tue, 05 Aug 2008 23:10:05 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-3.3 required=4.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 459) by emacsbugs.donarmstrong.com; 5 Aug 2008 23:05:11 +0000 Received: from cyd (CYD.MIT.EDU [18.115.2.24]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m75N57Wi031504 for <459@emacsbugs.donarmstrong.com>; Tue, 5 Aug 2008 16:05:09 -0700 Received: by cyd (Postfix, from userid 1000) id 279A857E338; Tue, 5 Aug 2008 19:05:35 -0400 (EDT) From: Chong Yidong To: 459@debbugs.gnu.org Date: Tue, 05 Aug 2008 19:05:35 -0400 Message-ID: <87ej53xdts.fsf@stupidchicken.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii > `overlays-at' never returns zero-length overlays. I think the way to fix this is to add an optional argument to overlays-at telling it to include zero-length overlays. However, this will have to wait till after the release. From unknown Tue Aug 19 12:49:43 2025 X-Loop: help-debbugs@gnu.org Subject: bug#459: Zero-length overlays, overlay keymaps, and `overlays-at' Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 19 Jul 2021 15:27: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: To: Toby Cubitt Cc: 459@debbugs.gnu.org Received: via spool by 459-submit@debbugs.gnu.org id=B459.162670838310821 (code B ref 459); Mon, 19 Jul 2021 15:27:02 +0000 Received: (at 459) by debbugs.gnu.org; 19 Jul 2021 15:26:23 +0000 Received: from localhost ([127.0.0.1]:59857 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5V9y-0002oT-Ve for submit@debbugs.gnu.org; Mon, 19 Jul 2021 11:26:23 -0400 Received: from quimby.gnus.org ([95.216.78.240]:46296) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5V9w-0002o2-S3 for 459@debbugs.gnu.org; Mon, 19 Jul 2021 11:26:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=9wsjAd8exCj9zihmhg60fZfMjmeQS7jPK8aPZPu1qX0=; b=FUBjrVLDbPOauqTd9NsnawjTtr fYNbFBPEwUAv2LPX76ZvPLT+kFcxx0eVdU5ZygXltTQlDEENMHzdf3mQSc1SMfpFOu8Vck9ra7dek wD6VQBsAA9PBzrHEk6iY4OJ75ZIWDx0mpNxnXeErqILjH8rV0b8sILTvNZeZZs3l3LEA=; Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m5V9o-0008DZ-DW; Mon, 19 Jul 2021 17:26:14 +0200 From: Lars Ingebrigtsen References: <485D204B.2@dr-qubit.org> X-Now-Playing: Colored Music's _Individual Beauty_: "Angel" Date: Mon, 19 Jul 2021 17:26:11 +0200 In-Reply-To: <485D204B.2@dr-qubit.org> (Toby Cubitt's message of "Sat, 21 Jun 2008 16:37:47 +0100") Message-ID: <875yx6mijw.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Toby Cubitt writes: > "Bug" description: > > `overlays-at' never returns zero-length overlays. > > Steps to reproduce: > > (make-overlay 1 1) ; any position will do > (overlays-at 1 [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Toby Cubitt writes: > "Bug" description: > ------------------ > `overlays-at' never returns zero-length overlays. > > Steps to reproduce: > ------------------- > (make-overlay 1 1) ; any position will do > (overlays-at 1) > > Returns nil instead of the overlay from 1 to 1. (I'm going through old bug reports that unfortunately wasn't resolved at the time.) This is still the case in Emacs 28. > Impact: > ------- > Again, zero-length overlays are probably rarely used. But this makes > it impossible in Emacs to find a zero-length overlay using > `overlays-at'. Instead, one has to work-around this using three calls > to `overlays-in' then filter out overlays that shouldn't be in the > list. Or just `overlay-lists'. > Overlays do fairly frequently become zero-length when the text they > cover is deleted (depending on their front- and rear-advance > properties), and this "bug" makes them suddenly disappear from the > return value of `overlays-at' even though they still exist in the > buffer. > > 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. Does anybody have any opinions here? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 19 11:26:30 2021 Received: (at control) by debbugs.gnu.org; 19 Jul 2021 15:26:30 +0000 Received: from localhost ([127.0.0.1]:59860 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5VA6-0002or-8y for submit@debbugs.gnu.org; Mon, 19 Jul 2021 11:26:30 -0400 Received: from quimby.gnus.org ([95.216.78.240]:46310) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5VA4-0002oS-1i for control@debbugs.gnu.org; Mon, 19 Jul 2021 11:26:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=UDS5dhkKEpZEnppmq4HpVQKlIQU7jqtlfBMfDaHD0Ew=; b=ZLNIHiB2wHcruWlzZn0F08HWZQ Hc8C2SkLjVX6K2uH2brt3yq6CyR92kF4ijvNIFjKVZ0b7OTTBmxlRKOiNvCguTXcxltvyrBCs54W7 OpWaEPz3qKVDW5WAZFm/feJ8jR8o9I2WVRUembJsOUyC2qLQu532//Pt1fKurCBHlE5M=; Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m5V9w-0008Dk-HL for control@debbugs.gnu.org; Mon, 19 Jul 2021 17:26:22 +0200 Date: Mon, 19 Jul 2021 17:26:20 +0200 Message-Id: <874kcqmijn.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #459 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 459 + moreinfo quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) tags 459 + moreinfo quit From unknown Tue Aug 19 12:49:43 2025 X-Loop: help-debbugs@gnu.org Subject: bug#459: Zero-length overlays, overlay keymaps, and `overlays-at' Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 19 Jul 2021 16:30: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 To: Lars Ingebrigtsen Cc: 459@debbugs.gnu.org, t.s.cubitt.98@cantab.net Received: via spool by 459-submit@debbugs.gnu.org id=B459.162671216019178 (code B ref 459); Mon, 19 Jul 2021 16:30:02 +0000 Received: (at 459) by debbugs.gnu.org; 19 Jul 2021 16:29:20 +0000 Received: from localhost ([127.0.0.1]:60128 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5W8u-0004zG-EE for submit@debbugs.gnu.org; Mon, 19 Jul 2021 12:29:20 -0400 Received: from eggs.gnu.org ([209.51.188.92]:34548) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5W8s-0004z4-Km for 459@debbugs.gnu.org; Mon, 19 Jul 2021 12:29:18 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:48924) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m5W8m-0006eG-Ng; Mon, 19 Jul 2021 12:29:12 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4576 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m5W8m-0002MY-6J; Mon, 19 Jul 2021 12:29:12 -0400 Date: Mon, 19 Jul 2021 19:29:05 +0300 Message-Id: <83y2a25ktq.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <875yx6mijw.fsf@gnus.org> (message from Lars Ingebrigtsen on Mon, 19 Jul 2021 17:26:11 +0200) References: <485D204B.2@dr-qubit.org> <875yx6mijw.fsf@gnus.org> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Lars Ingebrigtsen > 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. From unknown Tue Aug 19 12:49:43 2025 X-Loop: help-debbugs@gnu.org Subject: bug#459: Zero-length overlays, overlay keymaps, and `overlays-at' Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 19 Jul 2021 16:38: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 To: Eli Zaretskii Cc: 459@debbugs.gnu.org, t.s.cubitt.98@cantab.net Received: via spool by 459-submit@debbugs.gnu.org id=B459.162671263928359 (code B ref 459); Mon, 19 Jul 2021 16:38:02 +0000 Received: (at 459) by debbugs.gnu.org; 19 Jul 2021 16:37:19 +0000 Received: from localhost ([127.0.0.1]:60137 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5WGc-0007NL-Md for submit@debbugs.gnu.org; Mon, 19 Jul 2021 12:37:18 -0400 Received: from quimby.gnus.org ([95.216.78.240]:47390) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5WGa-0007N9-JM for 459@debbugs.gnu.org; Mon, 19 Jul 2021 12:37:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=k9Iq9rlVeERblNSxyWOY7KBSTNkWnqxVcvJyW3aWtFc=; b=adn5X7KGFU9P3IOB/Qa1kT3m3P EH+QkYuUbPpt595SzUztpkV6AKuC2kapYta2Jx/nKjVBiiPQgdNi3WRR/t5gnEWPDl3Eao2k9fF3F SOefGrQ2ju89CEHuF7hApBKW+ljwzC9e68WRG20hvVtgekGHF3VOekAJD6s3OQE5c6oA=; Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m5WGR-0000RA-Kq; Mon, 19 Jul 2021 18:37:10 +0200 From: Lars Ingebrigtsen References: <485D204B.2@dr-qubit.org> <875yx6mijw.fsf@gnus.org> <83y2a25ktq.fsf@gnu.org> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADFBMVEVZVU6popZFQDv/ //8RJBwaAAAAAWJLR0QDEQxM8gAAAAd0SU1FB+UHExAYE2BSfgcAAAGqSURBVCjPNZHBatwwEIZ/ CavYOqlgh9CTYjAYP4UCXlh6UhepuLc0UOhjKMZbtnss2Z6dPal6yo687YAH/ZZm5tcnwMEgh7cA U6DMUVkFFABl5l6+/877QqFvDMO7LGqUwvFKq63UHG3QpZElrZVx6MEV2+HBew+J0NfCo/GWh8bh aDmyoGRWT/1Re2Wqr84PuVXjD2X1zExhb2IClwvLDuumoA7en7IQ3pSU/Jw9Cud01zTjnK0zsoNL t9czBHlWT6V/2WMhURj2yVs2QdAtOBW7yFzowjbo25kItMtmgT3SgGa/Ce+/GBRvdrwhshMBOYhN uLs7wBU/kSH5ccGixYnOdZ/rkRE9RWghbL1jT2SsbRQuYwG+f3t/n+svhTjwie1UIAevOIJPf/Sc 3Vx8EfmHqBe6EF4fJVYEdHnraOlaPIIRQxSUEtJM6EGYodqHc4g6bU+iympYQxtXQgKN0/OMNg+i WOPHOJR9oN86SRqE+yGz51cefvUYUsYohxB+JDlEjWtKaUZKMl0jIv6HTMjvfetJ49uUstIypUhN 0r9D6UqlOc70heEvpalxS178q4kAAAAldEVYdGRhdGU6Y3JlYXRlADIwMjEtMDctMTlUMTY6MjQ6 MTkrMDA6MDA+CC65AAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIxLTA3LTE5VDE2OjI0OjE5KzAwOjAw T1WWBQAAAABJRU5ErkJggg== X-Now-Playing: Aksak Maboul's _Before and After Bandits_: "Cinema [Knokke] (original version)" Date: Mon, 19 Jul 2021 18:37:07 +0200 In-Reply-To: <83y2a25ktq.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 19 Jul 2021 19:29:05 +0300") Message-ID: <87y2a2i7kc.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Eli Zaretskii writes: >> > 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 im [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Eli Zaretskii writes: >> > 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). [...] > 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. Yeah, that's true. Do you have any opinion on whether a) or b) would make the most sense if given this optional argument? I'm leaning towards b)... -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Tue Aug 19 12:49:43 2025 X-Loop: help-debbugs@gnu.org Subject: bug#459: Zero-length overlays, overlay keymaps, and `overlays-at' Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 19 Jul 2021 16:50: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 To: Lars Ingebrigtsen , Stefan Monnier Cc: 459@debbugs.gnu.org, t.s.cubitt.98@cantab.net Received: via spool by 459-submit@debbugs.gnu.org id=B459.162671337929506 (code B ref 459); Mon, 19 Jul 2021 16:50:02 +0000 Received: (at 459) by debbugs.gnu.org; 19 Jul 2021 16:49:39 +0000 Received: from localhost ([127.0.0.1]:60154 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5WSY-0007fp-O7 for submit@debbugs.gnu.org; Mon, 19 Jul 2021 12:49:39 -0400 Received: from eggs.gnu.org ([209.51.188.92]:39010) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5WSW-0007fc-VV for 459@debbugs.gnu.org; Mon, 19 Jul 2021 12:49:37 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:49598) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m5WSQ-0003YV-4Q; Mon, 19 Jul 2021 12:49:30 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1848 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m5WSP-0008Do-1p; Mon, 19 Jul 2021 12:49:30 -0400 Date: Mon, 19 Jul 2021 19:49:25 +0300 Message-Id: <83sg0a5jvu.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <87y2a2i7kc.fsf@gnus.org> (message from Lars Ingebrigtsen on Mon, 19 Jul 2021 18:37:07 +0200) References: <485D204B.2@dr-qubit.org> <875yx6mijw.fsf@gnus.org> <83y2a25ktq.fsf@gnu.org> <87y2a2i7kc.fsf@gnus.org> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Lars Ingebrigtsen > Cc: t.s.cubitt.98@cantab.net, 459@debbugs.gnu.org > Date: Mon, 19 Jul 2021 18:37:07 +0200 > > Eli Zaretskii writes: > > >> > 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). > > [...] > > > 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. > > Yeah, that's true. Do you have any opinion on whether a) or b) would > make the most sense if given this optional argument? I'm leaning > towards b)... b) is fine by me, but let's hear from Stefan as well. From unknown Tue Aug 19 12:49:43 2025 X-Loop: help-debbugs@gnu.org Subject: bug#459: Zero-length overlays, overlay keymaps, and `overlays-at' Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 19 Jul 2021 18:20: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 To: Lars Ingebrigtsen Cc: Eli Zaretskii , 459@debbugs.gnu.org, t.s.cubitt.98@cantab.net Received: via spool by 459-submit@debbugs.gnu.org id=B459.162671877714091 (code B ref 459); Mon, 19 Jul 2021 18:20:02 +0000 Received: (at 459) by debbugs.gnu.org; 19 Jul 2021 18:19:37 +0000 Received: from localhost ([127.0.0.1]:60297 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5Xrd-0003fC-3p for submit@debbugs.gnu.org; Mon, 19 Jul 2021 14:19:37 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:3415) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5XrZ-0003ex-U8 for 459@debbugs.gnu.org; Mon, 19 Jul 2021 14:19:35 -0400 Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id E5B7180928; Mon, 19 Jul 2021 14:19:27 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 6E8458043C; Mon, 19 Jul 2021 14:19:26 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1626718766; bh=fZp2pWOsFa7dW/7gUVICSxSrDc0itp88yJW2Vi1Bl4c=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=JyZbLJQ4sEMuzIRnBDCMuK3P7HRm58CHHGkrH3VjAqBHYbHIYSYHy2aPhXO4w5Dwd fSZbtUGQu+PQp5hEad0nZT0oCvmVLoSBCZxkxWOM29YzmMtRf1wd/etywYeUAwBwUh oUfKy3TJ6X7PwM4LRe0DBC3xw10RuElEbIYdI8HDndtQI+UrNUCPTmRoPzOPFkWkEj 6lJvxGkyfqLdLTT3UdOzvi/tnb1X+2In2ZtfbvUsW+uipNcTqkW2wDHPrxiElxFWIg xWFRgdpkQYPkiB2fQ/giN3231LhQNqtoe6AFI2Mq4U0GI8aMmdCTsIjp+qENhQk/E1 hbEO9pX2kWSiA== Received: from alfajor (unknown [216.154.29.138]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 324231204DB; Mon, 19 Jul 2021 14:19:26 -0400 (EDT) From: Stefan Monnier Message-ID: References: <485D204B.2@dr-qubit.org> <875yx6mijw.fsf@gnus.org> <83y2a25ktq.fsf@gnu.org> <87y2a2i7kc.fsf@gnus.org> Date: Mon, 19 Jul 2021 14:19:25 -0400 In-Reply-To: <87y2a2i7kc.fsf@gnus.org> (Lars Ingebrigtsen's message of "Mon, 19 Jul 2021 18:37:07 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.094 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Lars Ingebrigtsen [2021-07-19 18:37:07] wrote: > Eli Zaretskii writes: >>> > 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). > > [...] > >> 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. > > Yeah, that's true. Do you have any opinion on whether a) or b) would > make the most sense if given this optional argument? I'm leaning > towards b)... I vote for a) with or without the requirement of a new optional arg. The reason I vote for a) rather than b) is because AFAICT `overlays-at` does not pay currently attention to from/rear advance properties, so it would be weird to do that just for empty overlays. Stefan From unknown Tue Aug 19 12:49:43 2025 X-Loop: help-debbugs@gnu.org Subject: bug#459: Zero-length overlays, overlay keymaps, and `overlays-at' Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 19 Jul 2021 18:24: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 To: Stefan Monnier Cc: Eli Zaretskii , 459@debbugs.gnu.org, t.s.cubitt.98@cantab.net Received: via spool by 459-submit@debbugs.gnu.org id=B459.162671903114529 (code B ref 459); Mon, 19 Jul 2021 18:24:02 +0000 Received: (at 459) by debbugs.gnu.org; 19 Jul 2021 18:23:51 +0000 Received: from localhost ([127.0.0.1]:60310 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5Xvj-0003mH-8Z for submit@debbugs.gnu.org; Mon, 19 Jul 2021 14:23:51 -0400 Received: from quimby.gnus.org ([95.216.78.240]:48232) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5Xvh-0003ly-Q9 for 459@debbugs.gnu.org; Mon, 19 Jul 2021 14:23:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=1v48GJLq8mPqcbQDGMuAvY5i+kFSfuClXM0PyFX15Hc=; b=QHFWYDN+mKDTCINnuzAC1I3ZQR 0sThXNcoFhOxx/+1DFPXlKwTeyaa/sv1WLB+x/8dZY/HelXh1qM27mnUWA/+osgAxUUeiWmXTAtR3 6C3kofg+jwN9JujiLkjJZUasZ9T2e17gt2RG64fS+so7Y9tkgBQo8eLrAkv2otXbaHBI=; Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m5XvX-0001Om-Vr; Mon, 19 Jul 2021 20:23:42 +0200 From: Lars Ingebrigtsen References: <485D204B.2@dr-qubit.org> <875yx6mijw.fsf@gnus.org> <83y2a25ktq.fsf@gnu.org> <87y2a2i7kc.fsf@gnus.org> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAHlBMVEW3ubuaoaG9vsC+ v8Li4uLDxMaRmpiYoZ+9v77///8LVZ9QAAAAAWJLR0QJ8dml7AAAAAd0SU1FB+UHExIWFGMxEkQA AAGwSURBVDjLnVMxbsMwDFQYeG9+QJDQHkjQB4pkL6xw79TO/UJfXh4VJ07jLiWQDHckdSTPKf2K w+HwCPCNeFmAgIh+lyYSEfXfHTmdL2cQLL3WNfO+S7soUWuiRcryzMfnx1cQVYrUkg1FxEm65Q48 SYRWb5jIc/IsPN5AI6nNzHhviNHVc1tzuDsy5yDmUOJtqlS1ImaiDnpF0kHgidZ5MtYm4ikgCGKc gRJL0zHtuxANQkBoZs68T8lriDkIHc0KxySzIhNdOmDXr0Hk0gpjp9CEEh9Z/Y9ar42varVr7BCv 5VqLjMmxjTL25AVWco+WoQrBTJACBdcLyBKej4MK3S+4MEK+X+EnAjhTesbRjG8XDsDr/W+FDgKv PofPmzZDuwhv4CTbuLvqj05pO/9/hC+T/yBwPWxvNSbO4+Y7qnut2cw4d5iG4ysY7nTvuk+7G19y Cfu08KsM23rW9TOiak/RK3zVbIPxhd9aLNGshh30kalCwybT+TIja0jDF+BNMMlkvYQ9ioae+9qv LWZv0Gq5zz5dTh6X0yvk1dXSKJ5u/S1BxMPR+NvUdSfWNfEDr96ADXFpUgsAAAAldEVYdGRhdGU6 Y3JlYXRlADIwMjEtMDctMTlUMTg6MjI6MjArMDA6MDDS5xB+AAAAJXRFWHRkYXRlOm1vZGlmeQAy MDIxLTA3LTE5VDE4OjIyOjIwKzAwOjAwo7qowgAAAABJRU5ErkJggg== X-Now-Playing: Roni Size & Reprazent's _New Forms (1)_: "Digital" Date: Mon, 19 Jul 2021 20:23:39 +0200 In-Reply-To: (Stefan Monnier's message of "Mon, 19 Jul 2021 14:19:25 -0400") Message-ID: <87k0lmi2ms.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Stefan Monnier writes: > I vote for a) with or without the requirement of a new optional arg. > The reason I vote for a) rather than b) is because AFAICT `overlays-at` > does not pay currently attention to from/rear advance [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Stefan Monnier writes: > I vote for a) with or without the requirement of a new optional arg. > The reason I vote for a) rather than b) is because AFAICT `overlays-at` > does not pay currently attention to from/rear advance properties, so it > would be weird to do that just for empty overlays. That's an excellent point. I'll have a look at doing a) tomorrow, then, unless we (in the mean time) decide to just include these overlays without adding a new parameter. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Tue Aug 19 12:49:43 2025 X-Loop: help-debbugs@gnu.org Subject: bug#459: Zero-length overlays, overlay keymaps, and `overlays-at' Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 19 Jul 2021 18:36: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 To: Lars Ingebrigtsen Cc: 459@debbugs.gnu.org, monnier@iro.umontreal.ca, t.s.cubitt.98@cantab.net Received: via spool by 459-submit@debbugs.gnu.org id=B459.162671974315607 (code B ref 459); Mon, 19 Jul 2021 18:36:02 +0000 Received: (at 459) by debbugs.gnu.org; 19 Jul 2021 18:35:43 +0000 Received: from localhost ([127.0.0.1]:60315 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5Y7D-00043f-BM for submit@debbugs.gnu.org; Mon, 19 Jul 2021 14:35:43 -0400 Received: from eggs.gnu.org ([209.51.188.92]:34336) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5Y7B-00043T-NI for 459@debbugs.gnu.org; Mon, 19 Jul 2021 14:35:42 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:52180) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m5Y75-0007kP-4J; Mon, 19 Jul 2021 14:35:35 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4426 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m5Y74-0007Tq-Os; Mon, 19 Jul 2021 14:35:35 -0400 Date: Mon, 19 Jul 2021 21:35:28 +0300 Message-Id: <83pmve5ez3.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <87k0lmi2ms.fsf@gnus.org> (message from Lars Ingebrigtsen on Mon, 19 Jul 2021 20:23:39 +0200) References: <485D204B.2@dr-qubit.org> <875yx6mijw.fsf@gnus.org> <83y2a25ktq.fsf@gnu.org> <87y2a2i7kc.fsf@gnus.org> <87k0lmi2ms.fsf@gnus.org> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Lars Ingebrigtsen > Cc: Eli Zaretskii , 459@debbugs.gnu.org, > t.s.cubitt.98@cantab.net > Date: Mon, 19 Jul 2021 20:23:39 +0200 > > Stefan Monnier writes: > > > I vote for a) with or without the requirement of a new optional arg. > > The reason I vote for a) rather than b) is because AFAICT `overlays-at` > > does not pay currently attention to from/rear advance properties, so it > > would be weird to do that just for empty overlays. > > That's an excellent point. > > I'll have a look at doing a) tomorrow, then, unless we (in the mean > time) decide to just include these overlays without adding a new > parameter. No, please don't make that the default behavior. It makes no sense to change the default behavior of such a veteran API for the benefit of a rare use case. The gains are very small, and don't justify the risks. An optional argument gets us the best of both worlds, so it's a clear winner. From unknown Tue Aug 19 12:49:43 2025 X-Loop: help-debbugs@gnu.org Subject: bug#459: Zero-length overlays, overlay keymaps, and `overlays-at' Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 20 Jul 2021 11:29:01 +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 To: Eli Zaretskii Cc: 459@debbugs.gnu.org, monnier@iro.umontreal.ca, t.s.cubitt.98@cantab.net Received: via spool by 459-submit@debbugs.gnu.org id=B459.162678050621704 (code B ref 459); Tue, 20 Jul 2021 11:29:01 +0000 Received: (at 459) by debbugs.gnu.org; 20 Jul 2021 11:28:26 +0000 Received: from localhost ([127.0.0.1]:32965 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5nvF-0005dx-Td for submit@debbugs.gnu.org; Tue, 20 Jul 2021 07:28:26 -0400 Received: from quimby.gnus.org ([95.216.78.240]:56112) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5nvE-0005dk-3E for 459@debbugs.gnu.org; Tue, 20 Jul 2021 07:28:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=yiHFe3iijic7x7vGB3Xhu/PXnGH4giDBbx6iV5Loh6Q=; b=G8YdsrrkKCuxXEL7/OEqUiRhB4 E8gJTg3OnijJs8Lqf4cNNdqIkXR5B9QLfLhSEZVfZWmubILWqyuTdWW4Izchtmt96+hOKv9IRY5Vf IA4FEPcrmyZ7sBWuqzeUdCR9uyHlTO+j4lD9hr4SWDsB3gEAgczwqfxU14OTYZBm6m6Q=; Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m5nv1-0002TH-FE; Tue, 20 Jul 2021 13:28:14 +0200 From: Lars Ingebrigtsen References: <485D204B.2@dr-qubit.org> <875yx6mijw.fsf@gnus.org> <83y2a25ktq.fsf@gnu.org> <87y2a2i7kc.fsf@gnus.org> <87k0lmi2ms.fsf@gnus.org> <83pmve5ez3.fsf@gnu.org> X-Now-Playing: Four Tet's _Sixteen Oceans_: "Something In The Sadness" Date: Tue, 20 Jul 2021 13:28:10 +0200 In-Reply-To: <83pmve5ez3.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 19 Jul 2021 21:35:28 +0300") Message-ID: <87czrdi5rp.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Eli Zaretskii writes: > No, please don't make that the default behavior. It makes no sense to > change the default behavior of such a veteran API for the benefit of a > rare use case. The gains are very small, and don't ju [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Eli Zaretskii writes: > No, please don't make that the default behavior. It makes no sense to > change the default behavior of such a veteran API for the benefit of a > rare use case. The gains are very small, and don't justify the risks. > An optional argument gets us the best of both worlds, so it's a clear > winner. I was just hedging in case somebody came up with a brilliant reason for including them by default. :-) 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. I've included the patch that won't be applied below for reference. Instead I'll just mention `overlays-in' in the `overlays-at' doc string. diff --git a/src/buffer.c b/src/buffer.c index d3a5ffd149..93f3e3dbb6 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -2859,7 +2859,8 @@ DEFUN ("kill-all-local-variables", Fkill_all_local_variables, ptrdiff_t overlays_at (EMACS_INT pos, bool extend, Lisp_Object **vec_ptr, ptrdiff_t *len_ptr, - ptrdiff_t *next_ptr, ptrdiff_t *prev_ptr, bool change_req) + ptrdiff_t *next_ptr, ptrdiff_t *prev_ptr, bool change_req, + bool include_zero_length) { ptrdiff_t idx = 0; ptrdiff_t len = *len_ptr; @@ -2886,7 +2887,8 @@ overlays_at (EMACS_INT pos, bool extend, Lisp_Object **vec_ptr, so its start counts for PREV_PTR if it's before POS. */ if (prev < startpos && startpos < pos) prev = startpos; - if (endpos == pos) + if (endpos == pos + && (!include_zero_length || endpos != startpos)) continue; if (startpos <= pos) { @@ -2928,7 +2930,8 @@ overlays_at (EMACS_INT pos, bool extend, Lisp_Object **vec_ptr, break; } ptrdiff_t endpos = OVERLAY_POSITION (end); - if (pos < endpos) + if (pos < endpos + || (include_zero_length && pos == endpos && startpos == endpos)) { if (idx == len) { @@ -4220,10 +4223,13 @@ DEFUN ("overlay-properties", Foverlay_properties, Soverlay_properties, 1, 1, 0, } -DEFUN ("overlays-at", Foverlays_at, Soverlays_at, 1, 2, 0, +DEFUN ("overlays-at", Foverlays_at, Soverlays_at, 1, 3, 0, doc: /* Return a list of the overlays that contain the character at POS. -If SORTED is non-nil, then sort them by decreasing priority. */) - (Lisp_Object pos, Lisp_Object sorted) +If SORTED is non-nil, then sort them by decreasing priority. + +If INCLUDE-ZERO-LENGTH is non-nil, also include zero-length overlays +at POS. (These are otherwise excluded.) */) + (Lisp_Object pos, Lisp_Object sorted, Lisp_Object include_zero_length) { ptrdiff_t len, noverlays; Lisp_Object *overlay_vec; @@ -4241,7 +4247,7 @@ DEFUN ("overlays-at", Foverlays_at, Soverlays_at, 1, 2, 0, /* Put all the overlays we want in a vector in overlay_vec. Store the length in len. */ noverlays = overlays_at (XFIXNUM (pos), 1, &overlay_vec, &len, - NULL, NULL, 0); + NULL, NULL, 0, !NILP (include_zero_length)); if (!NILP (sorted)) noverlays = sort_overlays (overlay_vec, noverlays, @@ -4317,7 +4323,7 @@ DEFUN ("next-overlay-change", Fnext_overlay_change, Snext_overlay_change, Store the length in len. endpos gets the position where the next overlay starts. */ noverlays = overlays_at (XFIXNUM (pos), 1, &overlay_vec, &len, - &endpos, 0, 1); + &endpos, 0, 1, false); /* If any of these overlays ends before endpos, use its ending point instead. */ @@ -4364,7 +4370,7 @@ DEFUN ("previous-overlay-change", Fprevious_overlay_change, Store the length in len. prevpos gets the position of the previous change. */ overlays_at (XFIXNUM (pos), 1, &overlay_vec, &len, - 0, &prevpos, 1); + 0, &prevpos, 1, false); xfree (overlay_vec); return make_fixnum (prevpos); diff --git a/src/buffer.h b/src/buffer.h index 24e9c3fcbc..daa666248d 100644 --- a/src/buffer.h +++ b/src/buffer.h @@ -1145,7 +1145,8 @@ #define CHECK_FIXNUM_COERCE_MARKER(x) ((x) = make_fixnum (fix_position (x))) extern void compact_buffer (struct buffer *); extern void evaporate_overlays (ptrdiff_t); extern ptrdiff_t overlays_at (EMACS_INT, bool, Lisp_Object **, - ptrdiff_t *, ptrdiff_t *, ptrdiff_t *, bool); + ptrdiff_t *, ptrdiff_t *, ptrdiff_t *, bool, + bool); extern ptrdiff_t sort_overlays (Lisp_Object *, ptrdiff_t, struct window *); extern void recenter_overlay_lists (struct buffer *, ptrdiff_t); extern ptrdiff_t overlay_strings (ptrdiff_t, struct window *, unsigned char **); @@ -1204,13 +1205,13 @@ #define GET_OVERLAYS_AT(posn, overlays, noverlays, nextp, chrq) \ ptrdiff_t maxlen = 40; \ SAFE_NALLOCA (overlays, 1, maxlen); \ (noverlays) = overlays_at (posn, false, &(overlays), &maxlen, \ - nextp, NULL, chrq); \ + nextp, NULL, chrq, false); \ if ((noverlays) > maxlen) \ { \ maxlen = noverlays; \ SAFE_NALLOCA (overlays, 1, maxlen); \ (noverlays) = overlays_at (posn, false, &(overlays), &maxlen, \ - nextp, NULL, chrq); \ + nextp, NULL, chrq, false); \ } \ } while (false) diff --git a/test/src/buffer-tests.el b/test/src/buffer-tests.el index 2adffc024a..5e83c0beab 100644 --- a/test/src/buffer-tests.el +++ b/test/src/buffer-tests.el @@ -1386,4 +1386,17 @@ buffer-tests-inhibit-buffer-hooks-indirect (when (buffer-live-p base) (kill-buffer base))))))) +(ert-deftest zero-length-overlays-and-not () + (with-temp-buffer + (insert "hello") + (let ((long-overlay (make-overlay 2 4)) + (zero-overlay (make-overlay 3 3))) + ;; Exclude. + (should (= (length (overlays-at 3)) 1)) + (should (eq (car (overlays-at 3)) long-overlay)) + ;; Include. + (should (= (length (overlays-at 3 nil t)) 2)) + (should (memq long-overlay (overlays-at 3 nil t))) + (should (memq zero-overlay (overlays-at 3 nil t)))))) + ;;; buffer-tests.el ends here -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 20 07:32:57 2021 Received: (at control) by debbugs.gnu.org; 20 Jul 2021 11:32:57 +0000 Received: from localhost ([127.0.0.1]:32969 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5nzd-0007vz-OH for submit@debbugs.gnu.org; Tue, 20 Jul 2021 07:32:57 -0400 Received: from quimby.gnus.org ([95.216.78.240]:56146) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5nzc-0007vn-02 for control@debbugs.gnu.org; Tue, 20 Jul 2021 07:32:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=6fwVux9IvVpTpt992KIavL0bUtjQxPRI7OvGV4Lu7ys=; b=VFpOLzQQtH4FyDY3pGwQRoM7y5 1avyzL65wscssgkFGKyJzp+TnJBUgOHTOOc4X+nqdAzYTJqcnRcoiGXGR3uudPbDeSHIjo791QWRQ G2HcqAJPcu1g6CFz0l6uOatVlLsSuJmyaMYCdnECASX6nzEsw1sb4k7VsDH5Y89OsvnM=; Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m5nzU-0002VD-6f for control@debbugs.gnu.org; Tue, 20 Jul 2021 13:32:50 +0200 Date: Tue, 20 Jul 2021 13:32:47 +0200 Message-Id: <87bl6xi5k0.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #459 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: close 459 28.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) close 459 28.1 quit From unknown Tue Aug 19 12:49:43 2025 X-Loop: help-debbugs@gnu.org Subject: bug#459: Zero-length overlays, overlay keymaps, and `overlays-at' Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 20 Jul 2021 11:51: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 To: Lars Ingebrigtsen Cc: 459@debbugs.gnu.org, monnier@iro.umontreal.ca, t.s.cubitt.98@cantab.net Received: via spool by 459-submit@debbugs.gnu.org id=B459.16267818358157 (code B ref 459); Tue, 20 Jul 2021 11:51:02 +0000 Received: (at 459) by debbugs.gnu.org; 20 Jul 2021 11:50:35 +0000 Received: from localhost ([127.0.0.1]:33011 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5oGh-00027U-Hu for submit@debbugs.gnu.org; Tue, 20 Jul 2021 07:50:35 -0400 Received: from eggs.gnu.org ([209.51.188.92]:39690) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5oGf-00027H-Bv for 459@debbugs.gnu.org; Tue, 20 Jul 2021 07:50:34 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:41044) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m5oGY-0004nJ-AR; Tue, 20 Jul 2021 07:50:26 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3822 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m5oGW-0002hH-ST; Tue, 20 Jul 2021 07:50:26 -0400 Date: Tue, 20 Jul 2021 14:50:20 +0300 Message-Id: <83mtqh5hmr.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <87czrdi5rp.fsf@gnus.org> (message from Lars Ingebrigtsen on Tue, 20 Jul 2021 13:28:10 +0200) References: <485D204B.2@dr-qubit.org> <875yx6mijw.fsf@gnus.org> <83y2a25ktq.fsf@gnu.org> <87y2a2i7kc.fsf@gnus.org> <87k0lmi2ms.fsf@gnus.org> <83pmve5ez3.fsf@gnu.org> <87czrdi5rp.fsf@gnus.org> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Lars Ingebrigtsen > 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. From unknown Tue Aug 19 12:49:43 2025 X-Loop: help-debbugs@gnu.org Subject: bug#459: Zero-length overlays, overlay keymaps, and `overlays-at' References: <485D204B.2@dr-qubit.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 To: Eli Zaretskii Cc: Lars Ingebrigtsen , 459@debbugs.gnu.org, monnier@iro.umontreal.ca Reply-To: Toby Cubitt Received: via spool by 459-submit@debbugs.gnu.org id=B459.162678809328890 (code B ref 459); Tue, 20 Jul 2021 13:35:02 +0000 Received: (at 459) by debbugs.gnu.org; 20 Jul 2021 13:34:53 +0000 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 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 Date: Tue, 20 Jul 2021 13:34:39 +0000 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== From: Toby Cubitt Message-ID: <20210720124457.GA10470@bb84> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mailout.protonmail.ch X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 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 From unknown Tue Aug 19 12:49:43 2025 X-Loop: help-debbugs@gnu.org Subject: bug#459: Zero-length overlays, overlay keymaps, and `overlays-at' Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 20 Jul 2021 13:47:01 +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 To: Toby Cubitt Cc: Eli Zaretskii , 459@debbugs.gnu.org, monnier@iro.umontreal.ca Received: via spool by 459-submit@debbugs.gnu.org id=B459.162678881029970 (code B ref 459); Tue, 20 Jul 2021 13:47:01 +0000 Received: (at 459) by debbugs.gnu.org; 20 Jul 2021 13:46:50 +0000 Received: from localhost ([127.0.0.1]:33248 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5q5C-0007nK-I0 for submit@debbugs.gnu.org; Tue, 20 Jul 2021 09:46:50 -0400 Received: from quimby.gnus.org ([95.216.78.240]:57680) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5q5A-0007n7-A2 for 459@debbugs.gnu.org; Tue, 20 Jul 2021 09:46:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=Ql93BBdzDqnp7V4uqQ1eFk6+fj3GVY1OvDkyXvmVua4=; b=gzCKYfDCiyoFxnxUG0db/6JdPZ lk1IJw8E+B+02EVjqlFh+qA/wnMafgBKLf47S2Hq+eGI0Ff89XMU5edbCVALdq6QqpEiaMzLsWEZ6 MZsU/Y5iyY5t7dcOprI4vqwZEU0NpJWcynwy+JGkHy6jzVB4STVXMQWlaCdWLgq2Kv2A=; Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m5q51-0003of-2X; Tue, 20 Jul 2021 15:46:41 +0200 From: Lars Ingebrigtsen References: <20210720124457.GA10470@bb84> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAG1BMVEWFEReKKiilnJGS WVRyDxNgIx4qJR56hHn///9MMD0NAAAAAWJLR0QIht6VegAAAAd0SU1FB+UHFA0qIlXVItYAAAGU SURBVDjLddHBUuMwDAZgZUju0TbhAWCmPZelu1czyD3HOM6dqWMegAOvj2S7JS6pD53WX35JUQHK g/HAn0eADe6vAeDuAeDpgT9qle4rh9hCgs1ffgKGDCjQJoiPnBO4kUoR0skAhqH6DVWLsdbvBBpc LyUAqVS+cTxyrVTjuQUuYVJ0DN40I0O7hKPSIcxDbzoZaglDwwD3JvYWIEXyrfF1CD5thCOvDEQS qgOXer+fGZAXlyBGjkHOUGFbldDI/dzKFutLKTonnJKN1KBygpsogdm2e1nJpRQXUxPDZJ1ssf0B UDxsOAX3abCrgH4SsVI4/ft8R6j59wVojtN+nSwiFTDGxO602SO9LEAPU4zMThKwAr0xRPUCKN4H ezCu6DHlwMejNgWMCUL4r/sS8v3But4V4NPavdVuDbbe9lc9xnOiH8s3dwIf28EeSnCjTn+t7Yi6 AtIbDq/PVCR0BnLPssMF+Ay64/WUCenuBa5LcWSWwUuIGMZ1oBDnW4G8g1XQ+gbQRLdKZdjdgLft Ouin8A0rqO3Ehwu7/gAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMS0wNy0yMFQxMzo0MjozNCswMDow MGufFEkAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjEtMDctMjBUMTM6NDI6MzQrMDA6MDAawqz1AAAA AElFTkSuQmCC X-Now-Playing: Voiski's _Fabric 94: Steffi_: "Sounds of Distance" Date: Tue, 20 Jul 2021 15:46:38 +0200 In-Reply-To: <20210720124457.GA10470@bb84> (Toby Cubitt's message of "Tue, 20 Jul 2021 13:34:39 +0000") Message-ID: <87fsw9drnl.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Toby Cubitt writes: > The OP on this was so much younger when he submitted the bug report, > he might as well have been a different person :) :-) Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Toby Cubitt writes: > The OP on this was so much younger when he submitted the bug report, > he might as well have been a different person :) :-) > 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. Yes, it's pretty surprising, so I've noted this in the `overlays-at' doc string. > 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. I didn't check that bit, since you said: ---- Looking through NEWS.22, I came upon the following: *** The `keymap' property now also works at the ends of overlays and text properties, according to their stickiness. This also means that it works with empty overlays. The same hold for the `local-map' property. So the first issue I reported is already fixed! (In exactly the way I suggested, which makes me suspect that future-bug might now have been fixed too... :) However, this behaviour isn't documented in the Emacs Lisp manual (unless I've overlooked something yet again), which *is* a bug. ---- Oh, I missed the bit about the missing documentation? Is that what you're referring to? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Tue Aug 19 12:49:43 2025 X-Loop: help-debbugs@gnu.org Subject: bug#459: Zero-length overlays, overlay keymaps, and `overlays-at' References: <485D204B.2@dr-qubit.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 14:31: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 To: Lars Ingebrigtsen Cc: Eli Zaretskii , 459@debbugs.gnu.org, monnier@iro.umontreal.ca Reply-To: Toby Cubitt Received: via spool by 459-submit@debbugs.gnu.org id=B459.162679142313339 (code B ref 459); Tue, 20 Jul 2021 14:31:02 +0000 Received: (at 459) by debbugs.gnu.org; 20 Jul 2021 14:30:23 +0000 Received: from localhost ([127.0.0.1]:35014 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5qlL-0003Se-Aq for submit@debbugs.gnu.org; Tue, 20 Jul 2021 10:30:23 -0400 Received: from mail-4317.protonmail.ch ([185.70.43.17]:59557) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5qlJ-0003Kt-Fa for 459@debbugs.gnu.org; Tue, 20 Jul 2021 10:30:22 -0400 Date: Tue, 20 Jul 2021 14:30:04 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dr-qubit.org; s=protonmail; t=1626791414; bh=TvcYY+UxPCNjBEyS2qcbi5aD/JE6D0q9cbaTv6tRyLs=; h=Date:To:From:Cc:Reply-To:Subject:From; b=Xu6rl96fNE2LxGerZly5689OMf2C5Rum/yg8mqTSvmKjJeRmuWt6u7FG/yv9cTU9D q9CMNcMQ3YJp1wQoJsGs4F9Qy3cOyn49bWi2MgBj/j/t2V66hEx/kq3MdU9n+AoNO0 sXh57s/R4n7u5fEKpm6Bo/5z0rUftnBju49LnAbQN21xYiI7RwZGScV5Ezy/9zMj/O r5/ipL2M/sXT7VVIkgCqduhtZ1UUa3T72CiKszX9RARksLe635FEks4jAmKJkEYovi XmsGhhsc1GczTdz7CotN2/OYbIH/IDzExBRE5URMWZ4uzoIehnA+rTMABJpMcBK3IO V6Ba5FNoFXFSg== From: Toby Cubitt Message-ID: <20210720143000.GA15534@bb84> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mailout.protonmail.ch X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Tue, Jul 20, 2021 at 03:46:38PM +0200, Lars Ingebrigtsen wrote: > > 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. > > I didn't check that bit, since you said: > > ---- > Looking through NEWS.22, I came upon the following: > > *** The `keymap' property now also works at the ends of overlays and > text properties, according to their stickiness. This also means that it > works with empty overlays. The same hold for the `local-map' property. > > So the first issue I reported is already fixed! (In exactly the way I > suggested, which makes me suspect that future-bug might now have been > fixed too... :) However, this behaviour isn't documented in the Emacs > Lisp manual (unless I've overlooked something yet again), which *is* a > bug. > ---- No, I'd also forgotten that I wrote that :) I did test before emailing, but= didn't test with different stickiness. Making it stickiness-dependent make= s sense. > Oh, I missed the bit about the missing documentation? Is that what > you're referring to? I suppose if it was documented, I might have remembered that it was already= fixed :) Maybe it is somewhere, but I missed it? The Emacs Lisp manual cur= rently (Emacs stable) has this to say on the overlay keymap property: "This keymap is used when the character after point is within the overlay" Which is technically incorrect since that NEWS.22 item, as it doesn't cover= zero-length, null front-advance, non-null rear-advance overlays. A concise= , technically correct wording that I think covers all cases would be: "This keymap is used when a character inserted after point would be include= d within the overlay" But maybe it would be better to be less concise, and spell out the zero-len= gth overlay special case separately. Best, 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 From unknown Tue Aug 19 12:49:43 2025 X-Loop: help-debbugs@gnu.org Subject: bug#459: Zero-length overlays, overlay keymaps, and `overlays-at' Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 20 Jul 2021 15:24: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 To: Toby Cubitt Cc: Eli Zaretskii , 459@debbugs.gnu.org, Lars Ingebrigtsen Received: via spool by 459-submit@debbugs.gnu.org id=B459.16267946292546 (code B ref 459); Tue, 20 Jul 2021 15:24:02 +0000 Received: (at 459) by debbugs.gnu.org; 20 Jul 2021 15:23:49 +0000 Received: from localhost ([127.0.0.1]:35106 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5rb3-0000ez-7V for submit@debbugs.gnu.org; Tue, 20 Jul 2021 11:23:49 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:10608) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5rb1-0000eh-PQ for 459@debbugs.gnu.org; Tue, 20 Jul 2021 11:23:48 -0400 Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 4D0361001F9; Tue, 20 Jul 2021 11:23:42 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 0B2681001F3; Tue, 20 Jul 2021 11:23:41 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1626794621; bh=SwxvoNL+DdQwGtZnzZZAiAvP+UUFAw8U3jh+GNuMmtU=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=kXoVLFGWHRmuci/QyVy1gM8jsvP1qb/XLsJLzZJoKot0JSXGk9oNspkY27zU5X4o4 UOAsqYqUo9b5gmu+ZwwtDC5WTrU56pS3eh8jh6ae/0FLQy+F0Xq0YIhfEij26Jvv8Q cDh3y3LRBdZ7Q43a8iW2IuWl/eYtKvT2kchSHHqeMMHP6zacxlovJtc+VWcNcczUP0 fI/O5kDyRsA+7UWbWO4gfGZxKRJlDXyuIIeH9pbHec/fh5UuZ2xLYxy0rtneoXu8hO YaQnNSGyHLVjWghHhXLnsJNwxQa8stGg60+zCFMZc2k0Wsy6dmow2K5vXkZX2Pl2AD KHccWKempZAMA== Received: from alfajor (unknown [216.154.29.138]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id CFDBC120281; Tue, 20 Jul 2021 11:23:40 -0400 (EDT) From: Stefan Monnier Message-ID: References: <20210720124457.GA10470@bb84> Date: Tue, 20 Jul 2021 11:23:40 -0400 In-Reply-To: <20210720124457.GA10470@bb84> (Toby Cubitt's message of "Tue, 20 Jul 2021 13:34:39 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.097 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Still seems surprising to me that overlays-at won't return all > overlays "at" point, FWIW, I see nothing in the code suggesting that this was a deliberate decision. It looks much more like an accident (which I hold to be a misfeature). Stefan From unknown Tue Aug 19 12:49:43 2025 X-Loop: help-debbugs@gnu.org Subject: bug#459: Zero-length overlays, overlay keymaps, and `overlays-at' Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 21 Jul 2021 10:37: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 To: Toby Cubitt Cc: Eli Zaretskii , 459@debbugs.gnu.org, monnier@iro.umontreal.ca Received: via spool by 459-submit@debbugs.gnu.org id=B459.16268637876880 (code B ref 459); Wed, 21 Jul 2021 10:37:02 +0000 Received: (at 459) by debbugs.gnu.org; 21 Jul 2021 10:36:27 +0000 Received: from localhost ([127.0.0.1]:36169 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m69aO-0001mk-Ds for submit@debbugs.gnu.org; Wed, 21 Jul 2021 06:36:27 -0400 Received: from quimby.gnus.org ([95.216.78.240]:40726) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m69aM-0001mW-4u for 459@debbugs.gnu.org; Wed, 21 Jul 2021 06:36:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=QW6klH2LRZnM7NrB2cfIW5LOKayhVh86/OwNyb09uak=; b=Cd+zhclgRpufc4oMzoRHmj5k2T IHM1952S0Ge21t/qrcPsgDIwnH/tm2judc/RshrMQ46JdkDY2fKVuIm40xLNf8LVWtYZJwGGstiPy ylwS7NtTIXp6mere8aTYLDQUL78W0oHH1Xw2+8KSDKLg6k1q8MKew9k38E/T0jEh3Wdo=; Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m69aB-0005Sr-K7; Wed, 21 Jul 2021 12:36:10 +0200 From: Lars Ingebrigtsen References: <20210720143000.GA15534@bb84> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAGFBMVEUWFRMREA4QDw0G BgUfHh0hIB4kJCP///8ETlpUAAAAAWJLR0QHFmGI6wAAAAd0SU1FB+UHFQohMPhr+7UAAAGoSURB VDjLZVQ7lsIwDJRioJa8F8DmAiy5ANXWVNQ0y/2PsBpJzofVCwmRMqPR2AnRR6iQau+XvD3EhQUV JpISiaNnHeAHUVk5zqPCjXsLqjtOkidFmy0iKk7V/hWY2KiERb+2SqNHc0gZGYmraVUAZKWyOyeT SVl5FEDCamrERVVZEWhrwVRhiWjZ9sUZjPbjtYfK8g+QkGu2MUOS9WA4qSEXPMo2mqB/TFgWLxj1 SMKXkkyQAuqoDSrvoRHem5KqNuj0kiTA5Zb5G6biYZswAE51sQJmthzkOoAm45jnK9oyC6wNACTW WwMeR7T3zTD5YjJGY+8dFgsKYRyYAMvdM1zV4d3iJeeKuqaRFM+dm1aaMIG5dKBHej9Rv1UsP4cf 2x1TewMZZYWXQpkbbHSMLAWTa1uCYzUiHhu5rgQzmjF32heGH0LbMH7YlwPstI0lpI8AgDMfkNPY bb4iw0GLV0qy+XpdIa/TK18BlqTw0pFO73Wvu6RQe08mJxuq9oOMR0PQz/P3+Y6vhXsLlPAegZdY W++tthT8HmuZXuXzcFJkIu56mT/iD8itIv4C+SlMAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDIxLTA3 LTIxVDEwOjMzOjQ4KzAwOjAwc6H0xgAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyMS0wNy0yMVQxMDoz Mzo0OCswMDowMAL8THoAAAAASUVORK5CYII= X-Now-Playing: Orchestral Manoeuvres in the Dark's _Souvenir (1): The Singles 1979-1987_: "Electricity" Date: Wed, 21 Jul 2021 12:36:07 +0200 In-Reply-To: <20210720143000.GA15534@bb84> (Toby Cubitt's message of "Tue, 20 Jul 2021 14:30:04 +0000") Message-ID: <87r1fslzs8.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Toby Cubitt writes: > I suppose if it was documented, I might have remembered that it was > already fixed :) Maybe it is somewhere, but I missed it? The Emacs > Lisp manual currently (Emacs stable) has this to say on the [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Toby Cubitt writes: > I suppose if it was documented, I might have remembered that it was > already fixed :) Maybe it is somewhere, but I missed it? The Emacs > Lisp manual currently (Emacs stable) has this to say on the overlay > keymap property: > > "This keymap is used when the character after point is within the overlay" > > Which is technically incorrect since that NEWS.22 item, as it doesn't > cover zero-length, null front-advance, non-null rear-advance > overlays. A concise, technically correct wording that I think covers > all cases would be: > > "This keymap is used when a character inserted after point would be > included within the overlay" > > But maybe it would be better to be less concise, and spell out the > zero-length overlay special case separately. It's not just zero-length overlays -- any overlay with rear-advance has this keymap effect on the character after the end of the overlay. And in addition, zero-length overlays have to have front-advance nil for this to happen. :-/ I've now mentioned that these properties have an effect in the overlay keymap item, but punted to the "Managing Overlays" section to actually explain how these overlays behave, because it's too complicated to repeat in that item. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no