GNU bug report logs - #80973
31.0.50; cursor-sensor-mode events fire at different positions compared to Emacs 30

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Jens Schmidt <jschmidt4gnu@HIDDEN>; dated Wed, 6 May 2026 22:17:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Did not alter fixed versions and reopened. Request was from Debbugs Internal Request <help-debbugs@HIDDEN> to internal_control <at> debbugs.gnu.org. Full text available.

Message received at 80973 <at> debbugs.gnu.org:


Received: (at 80973) by debbugs.gnu.org; 23 May 2026 11:04:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 23 07:04:27 2026
Received: from localhost ([127.0.0.1]:44674 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wQk9b-00012o-93
	for submit <at> debbugs.gnu.org; Sat, 23 May 2026 07:04:27 -0400
Received: from mr6.vodafonemail.de ([145.253.228.166]:58004)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <jschmidt4gnu@HIDDEN>)
 id 1wQk9W-00012B-Pd; Sat, 23 May 2026 07:04:25 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vodafonemail.de;
 s=vfde-mb-mr2-23sep; t=1779534255;
 bh=ACPz3MagAs/NwWhHsj6gBElALsr4KFw3HdzAJjShAd4=;
 h=From:To:Subject:In-Reply-To:References:Date:Message-ID:User-Agent:
 Content-Type:From;
 b=OgBKXvG8775z00xEZWEAtiURvPEJK99wD8wkNkJM5t9MZFs2r4TV6YpiV2WY+rGTG
 KGopAtIFIlEr4M34TpekW/pghRRcPnORIcwRGXfO9k7yc8S6ZmDzotAeaWntl7Jmr+
 UE07m6yuaGI9KhADKmep3GQxqQOHR2m4U8tbx1CM=
Received: from smtp.vodafone.de (unknown [10.0.0.2])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits))
 (No client certificate requested)
 by mr6.vodafonemail.de (Postfix) with ESMTPS id 4gMzmb3pY3z3sTny;
 Sat, 23 May 2026 11:04:15 +0000 (UTC)
Received: from sappc2 (unknown [195.63.73.78])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange ECDHE (prime256v1) server-signature RSA-PSS (2048 bits)
 server-digest SHA256) (No client certificate requested)
 by smtp.vodafone.de (Postfix) with ESMTPSA id 4gMzmL2k0Nz8sXQ;
 Sat, 23 May 2026 11:03:59 +0000 (UTC)
From: Jens Schmidt <jschmidt4gnu@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Subject: Re: bug#80973: 31.0.50; cursor-sensor-mode events are still confusing?
In-Reply-To: <87lddehssk.fsf@HIDDEN>
References: <87bjesfalz.fsf@HIDDEN>
 <jwvzf2bpdvf.fsf-monnier+emacs@HIDDEN>
 <m25x4zp8pw.fsf@HIDDEN>
 <jwvo6ipadli.fsf-monnier+emacs@HIDDEN>
 <m24ik7z2bf.fsf@HIDDEN>
 <jwvpl2swczm.fsf-monnier+emacs@HIDDEN>
 <87tss3i1eu.fsf_-_@HIDDEN>
 <jwvecj7qevm.fsf-monnier+emacs@HIDDEN>
 <87lddehssk.fsf@HIDDEN>
Date: Sat, 23 May 2026 13:03:58 +0200
Message-ID: <87a4tqbd5t.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-purgate-server: smtpa04
X-purgate-type: clean
X-purgate: clean
X-purgate-size: 5425
X-purgate-ID: 155817::1779534255-674A561B-5BC78E71/0/0
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 80973
Cc: 80973 <at> debbugs.gnu.org, "J.D. Smith" <jdtsmith@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

reopen 80973
thanks

I just today noticed that Stefan re-opened my bug (confirming it) and,
10 minutes later, J.D. closed it (denying it) in what I perceive as a
mail cross-over.

TBH, I believe Stefan's judgement as cursor-sensor maintainer more than
J.D.'s, so I'm reopening again a) to get *Stefan's* final (?) opinion
and b) to kindly ask him about feedback about my questions further
below.

As it is right now, I can use stickiness to control whether text spans
are open or closed at their end, but not at their beginning.  The
documentation says otherwise:

> +Whether the boundary positions (at the beginning and end of an overlay or
> +a stretch of text-property) are considered as inside or outside follows
> +the same rules as for @code{get-pos-property}, see @pxref{Boundaries of
> +text and overlay properties}.

Thanks!

Jens Schmidt <jschmidt4gnu@HIDDEN> writes:

> Stefan Monnier <monnier@HIDDEN> writes:
>
>> In any case, the current code indeed doesn't let you control the
>> behavior at the front (it's "always sticky").
>
> Right, and that's how I came across this.
>
> Luckily, I had a rather boring meeting today that allowed me to ponder
> about this issue ...
>
>> I think if we want to fix that (and make it obey the new doc), we'd want
>> a patch like the one below.
>>
>> diff --git a/lisp/emacs-lisp/cursor-sensor.el b/lisp/emacs-lisp/cursor-sensor.el
>> index e85f0da4b48..41dc7fd9ed7 100644
>> --- a/lisp/emacs-lisp/cursor-sensor.el
>> +++ b/lisp/emacs-lisp/cursor-sensor.el
>> @@ -166,11 +166,17 @@ cursor-sensor--detect
>>                 ;; might never see it.
>>                 ;; FIXME: Combine properties from covering overlays?
>>                 (new (or (get-pos-property point 'cursor-sensor-functions window)
>> -                        (get-char-property point
>> -                                           'cursor-sensor-functions window)
>> -                        (unless (<= (point-min) point)
>> -                          (get-char-property (1- point)
>> -                                             'cursor-sensor-functions window))))
>> +                        (let ((after
>> +                               (get-char-property point
>> +                                'cursor-sensor-functions window))
>> +                              (before
>> +                               (when (< (point-min) point)
>> +                                 (get-char-property (1- point)
>> +                                                    'cursor-sensor-functions window))))
>> +                          (when (and after before)
>> +                            (if (equal after before)
>> +                                after
>> +                              (cl-intersection after before))))))
>>                 (old (window-parameter window 'cursor-sensor--last-state))
>>                 (oldposmark (car old))
>>                 (oldpos (or (if oldposmark (marker-position oldposmark))
>
> - Your patch looks OK, thanks.  IIUC after stripping safety checks and
>   optimizations it boils down to the following pseudo ELisp:
>
>     (let*
>       ((new (or [1] (get-pos-prop point 'c-s-f)
>                 [2] (intersect (get-char-prop point 'c-s-f)
>                                (get-char-prop (1- point) 'c-s-f))))
>        [...]
>
>   After some more pondering and interval scribbeling I got curious in
>   what case [1] would be nil, but [2] non-nil.  Would you have a
>   concrete example?
>
> - Regardless of that, a change like that would mean that we move all
>   cursor-sensor intervals effectively from
>
>     [ left-closed, right-opened )
>
>   to
>
>     ( left-opened, right-closed ]
>
>   , correct?  (Unless someone has happened to set stickiness for c-s-f,
>   of course.)
>
>   That also means that all ranges where c-s-f fire by default move to
>   the right by one character.  Which sounds like a rather breaking
>   change to me ...
>
> - For example, setting `elisp-fontify-semantically' to t and switching
>   on `cursor-sensor-mode' with your patch makes the local symbol
>   highlighting in Emacs 31 rather awkward, and I think the following
>   patch would be required to fix that:
>
> diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el
> index 5a550b33016..9709e2e85ae 100644
> --- a/lisp/progmodes/elisp-mode.el
> +++ b/lisp/progmodes/elisp-mode.el
> @@ -637,8 +637,11 @@ elisp-fontify-symbol
>          (elisp--annotate-symbol-with-help-echo role beg end sym)
>          (put-text-property beg end 'mouse-face `(,face elisp-symbol-at-mouse)))
>        (when (and id (bound-and-true-p cursor-sensor-mode))
> -        (put-text-property
> -         beg end 'cursor-sensor-functions (elisp-cursor-sensor beg))))))
> +        (add-text-properties
> +         beg end
> +         `( cursor-sensor-functions ,(elisp-cursor-sensor beg)
> +            front-sticky (cursor-sensor-functions)
> +            rear-nonsticky (cursor-sensor-functions)))))))
>
>  (defun elisp-fontify-symbols (end)
>    "Fontify symbols from point to END according to their role in the code."
>
> - The upshot of all that being: Wouldn't it make sense to control this
>   new (and surely useful) feature by some buffer-local opt-in variable
>   `cursor-sensor-use-stickiness' or whatever?
>
> Thanks!




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#80973; Package emacs. Full text available.

Message received at 80973 <at> debbugs.gnu.org:


Received: (at 80973) by debbugs.gnu.org; 20 May 2026 17:53:25 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed May 20 13:53:25 2026
Received: from localhost ([127.0.0.1]:57186 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wPl6i-0007fx-P5
	for submit <at> debbugs.gnu.org; Wed, 20 May 2026 13:53:25 -0400
Received: from mr5.vodafonemail.de ([145.253.228.165]:38842)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <jschmidt4gnu@HIDDEN>)
 id 1wPl6e-0007eQ-OY
 for 80973 <at> debbugs.gnu.org; Wed, 20 May 2026 13:53:22 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vodafonemail.de;
 s=vfde-mb-mr2-23sep; t=1779299593;
 bh=xsZfTx86LKh9rADd8inasiE2zESTrafi8E6OXGcGtuU=;
 h=From:To:Subject:In-Reply-To:References:Date:Message-ID:User-Agent:
 Content-Type:From;
 b=kWn3A7M2523ndI7QynQg2ffFA1chr4pnD2aho43zahfyDRAJ4mm7Af70dsDWOHP+l
 bWWWfpNdPDFucjps6J8Opv+ohvY+qXCqcxeOLawU/ALzQdTTtippUqyNEwQ+eCKhSm
 /Tz6kAVYB35hFxSAmp3Vls4ZdXiZWz1htY/MmbPY=
Received: from smtp.vodafone.de (unknown [10.0.0.2])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits))
 (No client certificate requested)
 by mr5.vodafonemail.de (Postfix) with ESMTPS id 4gLJzs0wjGz3sVyn;
 Wed, 20 May 2026 17:53:13 +0000 (UTC)
Received: from sappc2 (unknown [62.27.212.174])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange ECDHE (prime256v1) server-signature RSA-PSS (2048 bits)
 server-digest SHA256) (No client certificate requested)
 by smtp.vodafone.de (Postfix) with ESMTPSA id 4gLJzf6rsqz90qf;
 Wed, 20 May 2026 17:52:59 +0000 (UTC)
From: Jens Schmidt <jschmidt4gnu@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Subject: Re: bug#80973: 31.0.50; cursor-sensor-mode events are still confusing?
In-Reply-To: <jwvecj7qevm.fsf-monnier+emacs@HIDDEN>
References: <87bjesfalz.fsf@HIDDEN>
 <jwvzf2bpdvf.fsf-monnier+emacs@HIDDEN>
 <m25x4zp8pw.fsf@HIDDEN>
 <jwvo6ipadli.fsf-monnier+emacs@HIDDEN>
 <m24ik7z2bf.fsf@HIDDEN>
 <jwvpl2swczm.fsf-monnier+emacs@HIDDEN>
 <87tss3i1eu.fsf_-_@HIDDEN>
 <jwvecj7qevm.fsf-monnier+emacs@HIDDEN>
Date: Wed, 20 May 2026 19:52:59 +0200
Message-ID: <87lddehssk.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-purgate-server: smtpa07
X-purgate-type: clean
X-purgate: clean
X-purgate-size: 4370
X-purgate-ID: 155817::1779299592-024D8131-FD283EAB/0/0
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 80973
Cc: 80973 <at> debbugs.gnu.org, "J.D. Smith" <jdtsmith@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Stefan Monnier <monnier@HIDDEN> writes:

> In any case, the current code indeed doesn't let you control the
> behavior at the front (it's "always sticky").

Right, and that's how I came across this.

Luckily, I had a rather boring meeting today that allowed me to ponder
about this issue ...

> I think if we want to fix that (and make it obey the new doc), we'd want
> a patch like the one below.
>
> diff --git a/lisp/emacs-lisp/cursor-sensor.el b/lisp/emacs-lisp/cursor-sensor.el
> index e85f0da4b48..41dc7fd9ed7 100644
> --- a/lisp/emacs-lisp/cursor-sensor.el
> +++ b/lisp/emacs-lisp/cursor-sensor.el
> @@ -166,11 +166,17 @@ cursor-sensor--detect
>                 ;; might never see it.
>                 ;; FIXME: Combine properties from covering overlays?
>                 (new (or (get-pos-property point 'cursor-sensor-functions window)
> -                        (get-char-property point
> -                                           'cursor-sensor-functions window)
> -                        (unless (<= (point-min) point)
> -                          (get-char-property (1- point)
> -                                             'cursor-sensor-functions window))))
> +                        (let ((after
> +                               (get-char-property point
> +                                'cursor-sensor-functions window))
> +                              (before
> +                               (when (< (point-min) point)
> +                                 (get-char-property (1- point)
> +                                                    'cursor-sensor-functions window))))
> +                          (when (and after before)
> +                            (if (equal after before)
> +                                after
> +                              (cl-intersection after before))))))
>                 (old (window-parameter window 'cursor-sensor--last-state))
>                 (oldposmark (car old))
>                 (oldpos (or (if oldposmark (marker-position oldposmark))

- Your patch looks OK, thanks.  IIUC after stripping safety checks and
  optimizations it boils down to the following pseudo ELisp:

    (let*
      ((new (or [1] (get-pos-prop point 'c-s-f)
                [2] (intersect (get-char-prop point 'c-s-f)
                               (get-char-prop (1- point) 'c-s-f))))
       [...]

  After some more pondering and interval scribbeling I got curious in
  what case [1] would be nil, but [2] non-nil.  Would you have a
  concrete example?

- Regardless of that, a change like that would mean that we move all
  cursor-sensor intervals effectively from

    [ left-closed, right-opened )

  to

    ( left-opened, right-closed ]

  , correct?  (Unless someone has happened to set stickiness for c-s-f,
  of course.)

  That also means that all ranges where c-s-f fire by default move to
  the right by one character.  Which sounds like a rather breaking
  change to me ...

- For example, setting `elisp-fontify-semantically' to t and switching
  on `cursor-sensor-mode' with your patch makes the local symbol
  highlighting in Emacs 31 rather awkward, and I think the following
  patch would be required to fix that:

diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el
index 5a550b33016..9709e2e85ae 100644
--- a/lisp/progmodes/elisp-mode.el
+++ b/lisp/progmodes/elisp-mode.el
@@ -637,8 +637,11 @@ elisp-fontify-symbol
         (elisp--annotate-symbol-with-help-echo role beg end sym)
         (put-text-property beg end 'mouse-face `(,face elisp-symbol-at-mouse)))
       (when (and id (bound-and-true-p cursor-sensor-mode))
-        (put-text-property
-         beg end 'cursor-sensor-functions (elisp-cursor-sensor beg))))))
+        (add-text-properties
+         beg end
+         `( cursor-sensor-functions ,(elisp-cursor-sensor beg)
+            front-sticky (cursor-sensor-functions)
+            rear-nonsticky (cursor-sensor-functions)))))))

 (defun elisp-fontify-symbols (end)
   "Fontify symbols from point to END according to their role in the code."

- The upshot of all that being: Wouldn't it make sense to control this
  new (and surely useful) feature by some buffer-local opt-in variable
  `cursor-sensor-use-stickiness' or whatever?

Thanks!







Information forwarded to bug-gnu-emacs@HIDDEN:
bug#80973; Package emacs. Full text available.

Message received at 80973-done <at> debbugs.gnu.org:


Received: (at 80973-done) by debbugs.gnu.org; 19 May 2026 21:38:30 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 19 17:38:30 2026
Received: from localhost ([127.0.0.1]:47152 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wPS8z-00044Y-EX
	for submit <at> debbugs.gnu.org; Tue, 19 May 2026 17:38:30 -0400
Received: from mail-yw1-x112e.google.com ([2607:f8b0:4864:20::112e]:47109)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <jdtsmith@HIDDEN>)
 id 1wPS8w-00043x-1K
 for 80973-done <at> debbugs.gnu.org; Tue, 19 May 2026 17:38:27 -0400
Received: by mail-yw1-x112e.google.com with SMTP id
 00721157ae682-7b37d84a6b3so35271247b3.2
 for <80973-done <at> debbugs.gnu.org>; Tue, 19 May 2026 14:38:26 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20251104; t=1779226705; x=1779831505; darn=debbugs.gnu.org;
 h=mime-version:user-agent:message-id:date:references:in-reply-to
 :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to;
 bh=Qen9WLNAs/WIDxZ5xsvYpmdn6q3vIaLeQXump1R5TJI=;
 b=hf5deCwVWin7TkBX2uEXInY4Cf5M2oYkO+FT3v0XvYvm4vwLbYQO+istYXQIOYx753
 pqjeDhUzSRfo3PYuT1KmooHuO2G2TzpQL0DTvLmB9xlMAVzLiCGw4cpXnRIl6eTqcOIg
 yfY0lpn5LuuZEcztNmYqWJ/QrJmVMsqr3nxBzJju3ctszADh6keGYhZS+88ci/E1siQk
 AOIsRr7vsZvZenS2tayeMOLYM6LmnGL139s3MZsKetEypidT7HwkBK3oVcvj/ckpg/f7
 WqbZi8asYVGYTgPV/OC543klDFuU9MomvKi08t1jFpd2Nb52dXMHUgPDaM70kGRAbbYB
 1Few==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20251104; t=1779226705; x=1779831505;
 h=mime-version:user-agent:message-id:date:references:in-reply-to
 :subject:cc:to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject
 :date:message-id:reply-to;
 bh=Qen9WLNAs/WIDxZ5xsvYpmdn6q3vIaLeQXump1R5TJI=;
 b=Os6Vt31vm4VoEF12PAcRrkoH3gyl/i74qaVphV0/0wSrZ1zyzw/sOI3HqCTKRneM8M
 uSPWDniZv2FbKglJQQgrMIkaWbMOG27rzP5N06ZaWLfPdSBmhWfiEgadmNd47UZiSCIw
 YCkpZyTwLczjjkAb8QxGfUIh9VLZF5G1gIEFcvOJ4rEpO8nSQHWfZe1zJUTyVxwtrWy+
 EGoWDWma9MOLU9LpyFgv1jh+khJu8UhaLpFbV6rVIywzq6kZAv8YcWeAxOS/zUqEY3bK
 /LmiwBu37O/FTnBaSXaHlwg/j6/TCDoHPapHttxp28h/i8JzvH3oeI6MKsqS84WxMjFd
 Z+rQ==
X-Forwarded-Encrypted: i=1;
 AFNElJ9pNVTjgDbR4WzO5O9F9fBaDQths85rd+x4LSDyVoCzLwSj4qA8TMbj59wKrg7ZRBfoCM7yU8JKzwoz <at> debbugs.gnu.org
X-Gm-Message-State: AOJu0Yz1xDOgC3NQ/+rcgiccPVCCTz4c3YdJiKuBDQ+bNQ4pZPOYtxcg
 NExV2ZiuoKoOFuGsUVsyqUNac+nDEWkCXYVMzpLDIT6GXVosCnz5PsPN7etL1w==
X-Gm-Gg: Acq92OHDVfe2ZqXmLfgKfT/BeW73z3JPz7XEZH1Nq+TW79PfMMZv9QBBZCza8Hmt98l
 KTg3YuBXK/Lloy4V2OlxrhqQtGZDzEJI+Je0/LnIw1xi4+ftMurhwn40rxyP86HSvVNfP6ew81p
 8a92gF6IJvuPDlhWwm9JMJpanK4Ripl9zzUbvLli8Z6+FALVX0lX0Y03Lkplwkk/ba6ztBoziPW
 ZV7+E1N/mh8QwOquUQZZpEi60tKKrl8EeruSkRHjq+rAAwheP2POOQ9SlsxRLX+KZ0K+YdXO6Jk
 urdyLIgATrGJiaeARfWqGv6uqeAQv8vT8MkKP11nSIZxVIjkFA2tZy+GCiYrC31yKSNkMy1b7J9
 swmvjmEf2OuLWlkP6LEVElADNjjgC50fUXMfJUmiVRjXDB4SZhWUCz/+RNFJwe+o/U5kkj4nC5S
 uQz0/DnAg+715vRd1hfbSBPpw/0MubzfDEMQ==
X-Received: by 2002:a05:690c:c4f1:b0:7ba:d5fb:b579 with SMTP id
 00721157ae682-7c95d1d7d36mr221450057b3.36.1779226704910; 
 Tue, 19 May 2026 14:38:24 -0700 (PDT)
Received: from moss ([131.183.130.137]) by smtp.gmail.com with ESMTPSA id
 00721157ae682-7cc991c939asm43942497b3.6.2026.05.19.14.38.24
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Tue, 19 May 2026 14:38:24 -0700 (PDT)
From: "J.D. Smith" <jdtsmith@HIDDEN>
To: Jens Schmidt <jschmidt4gnu@HIDDEN>
Subject: Re: bug#80973: 31.0.50; cursor-sensor-mode events fire at different
 positions compared to Emacs 30
In-Reply-To: <87tss3i1eu.fsf_-_@HIDDEN> (Jens Schmidt's message of
 "Tue, 19 May 2026 22:34:33 +0200")
References: <87bjesfalz.fsf@HIDDEN>
 <jwvzf2bpdvf.fsf-monnier+emacs@HIDDEN>
 <m25x4zp8pw.fsf@HIDDEN>
 <jwvo6ipadli.fsf-monnier+emacs@HIDDEN>
 <m24ik7z2bf.fsf@HIDDEN>
 <jwvpl2swczm.fsf-monnier+emacs@HIDDEN>
 <87tss3i1eu.fsf_-_@HIDDEN>
Date: Tue, 19 May 2026 17:38:23 -0400
Message-ID: <m2jyszqdv4.fsf_-_@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 80973-done
Cc: 80973 <at> debbugs.gnu.org, 80973-done <at> debbugs.gnu.org,
 Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.0 (/)

Jens Schmidt <jschmidt4gnu@HIDDEN> writes:

> Stefan Monnier <monnier@HIDDEN> writes:
>
>>>> Do you think the `etc/NEWS` text below is "warning enough"?
>>> Looks good.
>>
>> Thanks, pushed to `emacs-31`, closing,
>
> Thanks for documenting the new behavior.
>
> But I'm still not out of that rabbit hole, this time approaching text
> properties from the front.  More concretely, please check the following
> example in an emacs -Q:
>
> ------------------------- test.txt -------------------------
> Foo =bar0 bar1 bar2= baz.
>
> (defun cs-foo (&rest args) (message "%d:%S" (point) args))
> (progn
>   (add-text-properties 6 20 '(cursor-sensor-functions (cs-foo)))
>
>   (cursor-sensor-mode)
>
>   (goto-char (point-min)))
> ------------------------- test.txt -------------------------
>
> C-x C-e both forms.  The fronts of text properties are non-sticky by
> default, right?  Meaning that pos 6 should not be included in the
> property span as far as `get-pos-property' is concerned.  At least

>
>   (get-pos-property 6 'cursor-sensor-functions)
>
> returns nil for me.

That's consistent with it inheriting the nil value of that property from
the prior character.  

> +Whether the boundary positions (at the beginning and end of an overlay or
> +a stretch of text-property) are considered as inside or outside follows
> +the same rules as for @code{get-pos-property}, see @pxref{Boundaries of
> +text and overlay properties}.

This should perhaps make clear the either/or behavior (see below).

> I guess that this is related to these lines from cursor-sensor.el:
>
>   ;; It's often desirable to make the
>   ;; cursor-sensor-functions property non-sticky on both
>   ;; ends, so we can't use just `get-pos-property' because it
>   ;; might never see it.
>   ;; FIXME: Combine properties from covering overlays?
>   (new (or (get-pos-property point 'cursor-sensor-functions window)
>            (get-char-property point
>                               'cursor-sensor-functions window)
>            (unless (<= (point-min) point)
>              (get-char-property (1- point)
>                                 'cursor-sensor-functions window))))
>
> but I've been in that hole for too long now to see clearly.

As you can see it's either/or.  Either the next character has the
cursor-sensor property, OR the last character does (and does not inhibit
rear stickiness).  So if pos 6 has the cursor-sensor text property, when
point is situated just before it, it sees that property and fires.

In v30 and before, there is an asymmetry for point placed after pos 20.
By the principle of "geometric symmetry" you'd expect it to fire there
as well.  It does not, because it only consults pos 21, where there is
no cursor-sensor property.

The new v31 "either/or" default behavior is more symmetric.  Imagine
coloring all the marked characters red.  In v31, if point ever falls
adjacent to a red character, the function(s) fire.  That's why I say the
new behavior is better.




Notification sent to Jens Schmidt <jschmidt4gnu@HIDDEN>:
bug acknowledged by developer. Full text available.
Reply sent to "J.D. Smith" <jdtsmith@HIDDEN>:
You have taken responsibility. Full text available.

Message received at 80973 <at> debbugs.gnu.org:


Received: (at 80973) by debbugs.gnu.org; 19 May 2026 21:38:31 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 19 17:38:31 2026
Received: from localhost ([127.0.0.1]:47154 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wPS90-00044d-Ai
	for submit <at> debbugs.gnu.org; Tue, 19 May 2026 17:38:31 -0400
Received: from mail-yw1-x1129.google.com ([2607:f8b0:4864:20::1129]:46558)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <jdtsmith@HIDDEN>)
 id 1wPS8w-00043w-09
 for 80973 <at> debbugs.gnu.org; Tue, 19 May 2026 17:38:27 -0400
Received: by mail-yw1-x1129.google.com with SMTP id
 00721157ae682-7c5d8f45465so37347887b3.1
 for <80973 <at> debbugs.gnu.org>; Tue, 19 May 2026 14:38:25 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20251104; t=1779226705; x=1779831505; darn=debbugs.gnu.org;
 h=mime-version:user-agent:message-id:date:references:in-reply-to
 :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to;
 bh=Qen9WLNAs/WIDxZ5xsvYpmdn6q3vIaLeQXump1R5TJI=;
 b=hf5deCwVWin7TkBX2uEXInY4Cf5M2oYkO+FT3v0XvYvm4vwLbYQO+istYXQIOYx753
 pqjeDhUzSRfo3PYuT1KmooHuO2G2TzpQL0DTvLmB9xlMAVzLiCGw4cpXnRIl6eTqcOIg
 yfY0lpn5LuuZEcztNmYqWJ/QrJmVMsqr3nxBzJju3ctszADh6keGYhZS+88ci/E1siQk
 AOIsRr7vsZvZenS2tayeMOLYM6LmnGL139s3MZsKetEypidT7HwkBK3oVcvj/ckpg/f7
 WqbZi8asYVGYTgPV/OC543klDFuU9MomvKi08t1jFpd2Nb52dXMHUgPDaM70kGRAbbYB
 1Few==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20251104; t=1779226705; x=1779831505;
 h=mime-version:user-agent:message-id:date:references:in-reply-to
 :subject:cc:to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject
 :date:message-id:reply-to;
 bh=Qen9WLNAs/WIDxZ5xsvYpmdn6q3vIaLeQXump1R5TJI=;
 b=sRhQeiJYthJzQdh/pl+kdEkrzLLiazJBTO2UvPbQ65rxxW2SB584Qw8LWEAEg16Kc1
 J7RLdyo3EUg0orCizgoeSD17IyicPiFL4sxAkg8NmFDdL98qOa2tjok6QNs5ppzW7whA
 jW1ivv/bCGUARY5gbA0SOYgZn0M9ZAwjxxr6hxtdrmDy1uYZmtvmjY8J2Ycee6i6wfO7
 cGcUZros4E5L/0wN6YMshS09OvEIAdbKf3QJu8k5Gsd5gY1Nd4kqzdL9/jiLGXlIAxO2
 RGOwRsI9YJoz1/8CYvBFKhtK3O4hoyQ1p8GbP2dBxIIXL9lI+h+UqT4RPaaXXjaVuzCt
 yXrg==
X-Forwarded-Encrypted: i=1;
 AFNElJ+uycj/tfoowyjdfzuugMALLY/nvrOfwu0IQwS04uvGPM7evrN8TNS3pBmLiO6D7JZram2zXg==@debbugs.gnu.org
X-Gm-Message-State: AOJu0Ywx5gJY393bUuzNfw2HwgLyj90afvhAupVm5woCL/wL8rorGTyR
 UW5km2PaJuLZF/njdKVjhTgZO2C6lHZBaku8tRg1aWjRP27XrdUMW4QB
X-Gm-Gg: Acq92OEhrbBaPEojdBxK83SF36anLkfGa68vakV/AJI6Xcu/1GCTS5P+VmLhNt4kRVb
 81UKP4MjPmQ0Mmt0N1xr1T/CF97eoW2t7ryQ7/kXY66zIishsPzDN0dWZ67V6FOdSNko6LA+N/F
 Op8521L3GZwwffoHU7jnGBY4CViejfPuwfSLJD9tVXrMRIXWFDRi9xwGkdQjq/IIQuEL9cUIQIZ
 9zUM6uirg8E1Sj06oTAWF36+/h9684i71q3B/JztmOKWsmwliCe4rBQdEo2YPM7gUAOv3V5yHO1
 LawrvVsKMroP0RMWVly2gtyr/26WqjKtVWQLUVmYpQovD8K8GQ1tkL5Ltv+HO1uPZXgt+Z/e7ZR
 NFb4VVwU7GjBxDcPWPXXOig+L7/E+8k5jIdShBbyXH7Mb441fR/sdVyTqBrIG0cnW7OBgvbjUjt
 8Bbt5Jbh5VdekG843oOi1VWYcATFnGPpayWw==
X-Received: by 2002:a05:690c:c4f1:b0:7ba:d5fb:b579 with SMTP id
 00721157ae682-7c95d1d7d36mr221450057b3.36.1779226704910; 
 Tue, 19 May 2026 14:38:24 -0700 (PDT)
Received: from moss ([131.183.130.137]) by smtp.gmail.com with ESMTPSA id
 00721157ae682-7cc991c939asm43942497b3.6.2026.05.19.14.38.24
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Tue, 19 May 2026 14:38:24 -0700 (PDT)
From: "J.D. Smith" <jdtsmith@HIDDEN>
To: Jens Schmidt <jschmidt4gnu@HIDDEN>
Subject: Re: bug#80973: 31.0.50; cursor-sensor-mode events fire at different
 positions compared to Emacs 30
In-Reply-To: <87tss3i1eu.fsf_-_@HIDDEN> (Jens Schmidt's message of
 "Tue, 19 May 2026 22:34:33 +0200")
References: <87bjesfalz.fsf@HIDDEN>
 <jwvzf2bpdvf.fsf-monnier+emacs@HIDDEN>
 <m25x4zp8pw.fsf@HIDDEN>
 <jwvo6ipadli.fsf-monnier+emacs@HIDDEN>
 <m24ik7z2bf.fsf@HIDDEN>
 <jwvpl2swczm.fsf-monnier+emacs@HIDDEN>
 <87tss3i1eu.fsf_-_@HIDDEN>
Date: Tue, 19 May 2026 17:38:23 -0400
Message-ID: <m2jyszqdv4.fsf_-_@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 80973
Cc: 80973 <at> debbugs.gnu.org, 80973-done <at> debbugs.gnu.org,
 Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.0 (/)

Jens Schmidt <jschmidt4gnu@HIDDEN> writes:

> Stefan Monnier <monnier@HIDDEN> writes:
>
>>>> Do you think the `etc/NEWS` text below is "warning enough"?
>>> Looks good.
>>
>> Thanks, pushed to `emacs-31`, closing,
>
> Thanks for documenting the new behavior.
>
> But I'm still not out of that rabbit hole, this time approaching text
> properties from the front.  More concretely, please check the following
> example in an emacs -Q:
>
> ------------------------- test.txt -------------------------
> Foo =bar0 bar1 bar2= baz.
>
> (defun cs-foo (&rest args) (message "%d:%S" (point) args))
> (progn
>   (add-text-properties 6 20 '(cursor-sensor-functions (cs-foo)))
>
>   (cursor-sensor-mode)
>
>   (goto-char (point-min)))
> ------------------------- test.txt -------------------------
>
> C-x C-e both forms.  The fronts of text properties are non-sticky by
> default, right?  Meaning that pos 6 should not be included in the
> property span as far as `get-pos-property' is concerned.  At least

>
>   (get-pos-property 6 'cursor-sensor-functions)
>
> returns nil for me.

That's consistent with it inheriting the nil value of that property from
the prior character.  

> +Whether the boundary positions (at the beginning and end of an overlay or
> +a stretch of text-property) are considered as inside or outside follows
> +the same rules as for @code{get-pos-property}, see @pxref{Boundaries of
> +text and overlay properties}.

This should perhaps make clear the either/or behavior (see below).

> I guess that this is related to these lines from cursor-sensor.el:
>
>   ;; It's often desirable to make the
>   ;; cursor-sensor-functions property non-sticky on both
>   ;; ends, so we can't use just `get-pos-property' because it
>   ;; might never see it.
>   ;; FIXME: Combine properties from covering overlays?
>   (new (or (get-pos-property point 'cursor-sensor-functions window)
>            (get-char-property point
>                               'cursor-sensor-functions window)
>            (unless (<= (point-min) point)
>              (get-char-property (1- point)
>                                 'cursor-sensor-functions window))))
>
> but I've been in that hole for too long now to see clearly.

As you can see it's either/or.  Either the next character has the
cursor-sensor property, OR the last character does (and does not inhibit
rear stickiness).  So if pos 6 has the cursor-sensor text property, when
point is situated just before it, it sees that property and fires.

In v30 and before, there is an asymmetry for point placed after pos 20.
By the principle of "geometric symmetry" you'd expect it to fire there
as well.  It does not, because it only consults pos 21, where there is
no cursor-sensor property.

The new v31 "either/or" default behavior is more symmetric.  Imagine
coloring all the marked characters red.  In v31, if point ever falls
adjacent to a red character, the function(s) fire.  That's why I say the
new behavior is better.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#80973; Package emacs. Full text available.
Did not alter fixed versions and reopened. Request was from Debbugs Internal Request <help-debbugs@HIDDEN> to internal_control <at> debbugs.gnu.org. Full text available.

Message received at 80973 <at> debbugs.gnu.org:


Received: (at 80973) by debbugs.gnu.org; 19 May 2026 21:29:29 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 19 17:29:29 2026
Received: from localhost ([127.0.0.1]:47062 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wPS0E-0003CJ-MU
	for submit <at> debbugs.gnu.org; Tue, 19 May 2026 17:29:28 -0400
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:52281)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <monnier@HIDDEN>)
 id 1wPS09-0003Au-Ey; Tue, 19 May 2026 17:29:23 -0400
Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1])
 by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 2DAA1828CB;
 Tue, 19 May 2026 17:29:15 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1779226153;
 bh=tDwLzDK1oQx94owp9IW5/4x1RbYkh2JzLyBHharLfOE=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=Rn1JxFRmsrr2FixLto4lbfYbOjKOWTOatWHS7LbtdvKkKnjkEhxiulnm1szA0Lwr9
 Ea0GRbCdqq0an2i5CPGCQMwRQokwu86/u1AeAnYCaD/qFTGMd1LGVXOWGK2diOsu/V
 mc6usxc3sTQGTLXtNIcN1PzUf63mPMjDnfBjd4cHXeUio4oJ8lgoXn8vodezczWp2j
 bfzDZeQ5hcgGO/3vY9TrjVBb4EttAsHGjE62TX1htw7hSPccfkoI0heuOBrlTt+r80
 FKCP0zY3CNSkOm7q+q2cpEr5qmyC9COrzzOcNv0YwRjovyWdaLZD3woXHz2uP8wa98
 hAUSZ2KwSTDiw==
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id DCA3C801E8;
 Tue, 19 May 2026 17:29:13 -0400 (EDT)
Received: from alfajor (modemcable181.99-80-70.mc.videotron.ca [70.80.99.181])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id B31AE1206D0;
 Tue, 19 May 2026 17:29:13 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Jens Schmidt <jschmidt4gnu@HIDDEN>
Subject: Re: bug#80973: 31.0.50; cursor-sensor-mode events are still confusing?
In-Reply-To: <87tss3i1eu.fsf_-_@HIDDEN>
Message-ID: <jwvecj7qevm.fsf-monnier+emacs@HIDDEN>
References: <87bjesfalz.fsf@HIDDEN>
 <jwvzf2bpdvf.fsf-monnier+emacs@HIDDEN>
 <m25x4zp8pw.fsf@HIDDEN>
 <jwvo6ipadli.fsf-monnier+emacs@HIDDEN>
 <m24ik7z2bf.fsf@HIDDEN>
 <jwvpl2swczm.fsf-monnier+emacs@HIDDEN>
 <87tss3i1eu.fsf_-_@HIDDEN>
Date: Tue, 19 May 2026 17:29:12 -0400
User-Agent: Gnus/5.13 (Gnus v5.13)
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.128 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
 DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 80973
Cc: 80973 <at> debbugs.gnu.org, "J.D. Smith" <jdtsmith@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

reopen 80973
thanks

> However, above cursor sensor already fires when transitioning point from
> pos 5 to 6:
>
>   6:(#<window 3 on test.txt> 5 entered)
>
> Is that intentional?  It seems to contradict this snippet:
>
> +Whether the boundary positions (at the beginning and end of an overlay or
> +a stretch of text-property) are considered as inside or outside follows
> +the same rules as for @code{get-pos-property}, see @pxref{Boundaries of
> +text and overlay properties}.

Indeed!

> I guess that this is related to these lines from cursor-sensor.el:
>
>   ;; It's often desirable to make the
>   ;; cursor-sensor-functions property non-sticky on both
>   ;; ends, so we can't use just `get-pos-property' because it
>   ;; might never see it.
>   ;; FIXME: Combine properties from covering overlays?
>   (new (or (get-pos-property point 'cursor-sensor-functions window)
>            (get-char-property point
>                               'cursor-sensor-functions window)
>            (unless (<= (point-min) point)
>              (get-char-property (1- point)
>                                 'cursor-sensor-functions window))))

Yes, I think when I added the `get-pos-property` call (commit
f4a1c006569f), I didn't pay close enough attention to the problem I was
solving because I knew `get-pos-property` was "the right way" to go and
it solved my problem.

What I overlooked was that the above has a stupid mistake: the

    (unless (<= (point-min) point)

should be

    (when (< (point-min) point)

In any case, the current code indeed doesn't let you control the
behavior at the front (it's "always sticky").  That's the same as in
older Emacsen, tho.

I think if we want to fix that (and make it obey the new doc), we'd want
a patch like the one below.


=== Stefan


diff --git a/lisp/emacs-lisp/cursor-sensor.el b/lisp/emacs-lisp/cursor-sensor.el
index e85f0da4b48..41dc7fd9ed7 100644
--- a/lisp/emacs-lisp/cursor-sensor.el
+++ b/lisp/emacs-lisp/cursor-sensor.el
@@ -166,11 +166,17 @@ cursor-sensor--detect
                ;; might never see it.
                ;; FIXME: Combine properties from covering overlays?
                (new (or (get-pos-property point 'cursor-sensor-functions window)
-                        (get-char-property point
-                                           'cursor-sensor-functions window)
-                        (unless (<= (point-min) point)
-                          (get-char-property (1- point)
-                                             'cursor-sensor-functions window))))
+                        (let ((after
+                               (get-char-property point
+                                'cursor-sensor-functions window))
+                              (before
+                               (when (< (point-min) point)
+                                 (get-char-property (1- point)
+                                                    'cursor-sensor-functions window))))
+                          (when (and after before)
+                            (if (equal after before)
+                                after
+                              (cl-intersection after before))))))
                (old (window-parameter window 'cursor-sensor--last-state))
                (oldposmark (car old))
                (oldpos (or (if oldposmark (marker-position oldposmark))





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#80973; Package emacs. Full text available.

Message received at 80973-done <at> debbugs.gnu.org:


Received: (at 80973-done) by debbugs.gnu.org; 19 May 2026 20:35:01 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 19 16:35:01 2026
Received: from localhost ([127.0.0.1]:46642 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wPR9X-0005sP-K2
	for submit <at> debbugs.gnu.org; Tue, 19 May 2026 16:35:01 -0400
Received: from mr6.vodafonemail.de ([145.253.228.166]:57632)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <jschmidt4gnu@HIDDEN>)
 id 1wPR9S-0005qY-TN
 for 80973-done <at> debbugs.gnu.org; Tue, 19 May 2026 16:34:57 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vodafonemail.de;
 s=vfde-mb-mr2-23sep; t=1779222887;
 bh=LJj1tdYIm3tdDQ+nJ8bqmDRa+d6qVSQYNuzOtzhCSZk=;
 h=From:To:Subject:In-Reply-To:References:Date:Message-ID:User-Agent:
 Content-Type:From;
 b=BsIF6gJgUg9KHP95Z2HoIHvJlSpqwXNVKGwxSyTo4QNUSQqUMAua1hsGYrOQ3w0OI
 oNF1klACxr2zn0RQkON5wgGSapVGMRAonOFqDpZSr851HSnhoIUWGmFZpVXADWNBec
 fnrAQHK1YXv3R3rjpqevyTxd5YBy0JkWjIom3OGc=
Received: from smtp.vodafone.de (unknown [10.0.0.2])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits))
 (No client certificate requested)
 by mr6.vodafonemail.de (Postfix) with ESMTPS id 4gKmcl358jz3sWbY;
 Tue, 19 May 2026 20:34:47 +0000 (UTC)
Received: from sappc2 (unknown [62.246.36.104])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange ECDHE (prime256v1) server-signature RSA-PSS (2048 bits)
 server-digest SHA256) (No client certificate requested)
 by smtp.vodafone.de (Postfix) with ESMTPSA id 4gKmcY1m0Gz92kQ;
 Tue, 19 May 2026 20:34:34 +0000 (UTC)
From: Jens Schmidt <jschmidt4gnu@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Subject: Re: bug#80973: 31.0.50; cursor-sensor-mode events are still confusing?
In-Reply-To: <jwvpl2swczm.fsf-monnier+emacs@HIDDEN>
References: <87bjesfalz.fsf@HIDDEN>
 <jwvzf2bpdvf.fsf-monnier+emacs@HIDDEN>
 <m25x4zp8pw.fsf@HIDDEN>
 <jwvo6ipadli.fsf-monnier+emacs@HIDDEN>
 <m24ik7z2bf.fsf@HIDDEN>
 <jwvpl2swczm.fsf-monnier+emacs@HIDDEN>
Date: Tue, 19 May 2026 22:34:33 +0200
Message-ID: <87tss3i1eu.fsf_-_@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-purgate-server: smtpa02
X-purgate-type: clean
X-purgate: clean
X-purgate-size: 2186
X-purgate-ID: 155817::1779222886-F57549AE-C47578F3/0/0
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 80973-done
Cc: 80973-done <at> debbugs.gnu.org, "J.D. Smith" <jdtsmith@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Stefan Monnier <monnier@HIDDEN> writes:

>>> Do you think the `etc/NEWS` text below is "warning enough"?
>> Looks good.
>
> Thanks, pushed to `emacs-31`, closing,

Thanks for documenting the new behavior.

But I'm still not out of that rabbit hole, this time approaching text
properties from the front.  More concretely, please check the following
example in an emacs -Q:

------------------------- test.txt -------------------------
Foo =bar0 bar1 bar2= baz.

(defun cs-foo (&rest args) (message "%d:%S" (point) args))
(progn
  (add-text-properties 6 20 '(cursor-sensor-functions (cs-foo)))

  (cursor-sensor-mode)

  (goto-char (point-min)))
------------------------- test.txt -------------------------

C-x C-e both forms.  The fronts of text properties are non-sticky by
default, right?  Meaning that pos 6 should not be included in the
property span as far as `get-pos-property' is concerned.  At least

  (get-pos-property 6 'cursor-sensor-functions)

returns nil for me.

However, above cursor sensor already fires when transitioning point from
pos 5 to 6:

  6:(#<window 3 on test.txt> 5 entered)

Is that intentional?  It seems to contradict this snippet:

+Whether the boundary positions (at the beginning and end of an overlay or
+a stretch of text-property) are considered as inside or outside follows
+the same rules as for @code{get-pos-property}, see @pxref{Boundaries of
+text and overlay properties}.

I guess that this is related to these lines from cursor-sensor.el:

  ;; It's often desirable to make the
  ;; cursor-sensor-functions property non-sticky on both
  ;; ends, so we can't use just `get-pos-property' because it
  ;; might never see it.
  ;; FIXME: Combine properties from covering overlays?
  (new (or (get-pos-property point 'cursor-sensor-functions window)
           (get-char-property point
                              'cursor-sensor-functions window)
           (unless (<= (point-min) point)
             (get-char-property (1- point)
                                'cursor-sensor-functions window))))

but I've been in that hole for too long now to see clearly.

Thanks!




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#80973; Package emacs. Full text available.

Message received at 80973-done <at> debbugs.gnu.org:


Received: (at 80973-done) by debbugs.gnu.org; 18 May 2026 22:49:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 18 18:49:36 2026
Received: from localhost ([127.0.0.1]:34864 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wP6mF-00032G-TH
	for submit <at> debbugs.gnu.org; Mon, 18 May 2026 18:49:36 -0400
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:22290)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <monnier@HIDDEN>)
 id 1wP6mD-00031z-5D
 for 80973-done <at> debbugs.gnu.org; Mon, 18 May 2026 18:49:33 -0400
Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1])
 by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id B6F5C1002F0;
 Mon, 18 May 2026 18:49:27 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1779144566;
 bh=tnlkkYduBgnX78YzoUUeOT5Uf6m7VvjQyNh6Lsm5wJ0=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=ORMZT97WqdjCfXp6/8PgLH+6lczQj1y/P70aec/zkCTivhd3MXoxO+gCnQ6iXQsWh
 CxiJpJ3J+bRoeo39R7OAJeIrrrBkIYhTmZmagZOFHGwiem8Z0WU7uf3ZbztAM/QL1f
 TnjX5eQKL7OFDWLpye+oGeREcNWof3zjtUnLCRgOAW3ijqpJmjiye3/TSRIgB9W2Gn
 C81OShWdqx/7GSD+yarELk6JdVUGlPkryHz4cDhP3Gji9Ohp76wVsaBjwB4aS126P3
 AsmgY3B0kBgnzyOQ1GVtOCtKU1KeF3b3G4Etemyxmc5gGWxITHB6OAmaA6zkVloqHe
 4kJY1gJsB3bJA==
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 3B1C91000BC;
 Mon, 18 May 2026 18:49:26 -0400 (EDT)
Received: from pastel (104-195-197-162.cpe.teksavvy.com [104.195.197.162])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 05A051204C5;
 Mon, 18 May 2026 18:49:25 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: "J.D. Smith" <jdtsmith@HIDDEN>
Subject: Re: bug#80973: 31.0.50; cursor-sensor-mode events fire at different
 positions compared to Emacs 30
In-Reply-To: <m24ik7z2bf.fsf@HIDDEN>
Message-ID: <jwvpl2swczm.fsf-monnier+emacs@HIDDEN>
References: <87bjesfalz.fsf@HIDDEN>
 <jwvzf2bpdvf.fsf-monnier+emacs@HIDDEN>
 <m25x4zp8pw.fsf@HIDDEN>
 <jwvo6ipadli.fsf-monnier+emacs@HIDDEN>
 <m24ik7z2bf.fsf@HIDDEN>
Date: Mon, 18 May 2026 18:49:25 -0400
User-Agent: Gnus/5.13 (Gnus v5.13)
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.166 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
 DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from
 domain
 KAM_NUMSUBJECT 0.5 Subject ends in numbers excluding current years
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 80973-done
Cc: 80973-done <at> debbugs.gnu.org, Jens Schmidt <jschmidt4gnu@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

>> Do you think the `etc/NEWS` text below is "warning enough"?
> Looks good. 

Thanks, pushed to `emacs-31`, closing,


=== Stefan





Notification sent to Jens Schmidt <jschmidt4gnu@HIDDEN>:
bug acknowledged by developer. Full text available.
Reply sent to Stefan Monnier <monnier@HIDDEN>:
You have taken responsibility. Full text available.

Message received at 80973 <at> debbugs.gnu.org:


Received: (at 80973) by debbugs.gnu.org; 16 May 2026 17:34:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 16 13:34:02 2026
Received: from localhost ([127.0.0.1]:33694 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wOItl-0007xg-2C
	for submit <at> debbugs.gnu.org; Sat, 16 May 2026 13:34:02 -0400
Received: from mail-ot1-x332.google.com ([2607:f8b0:4864:20::332]:56738)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <jdtsmith@HIDDEN>)
 id 1wOIti-0007xL-Su
 for 80973 <at> debbugs.gnu.org; Sat, 16 May 2026 13:33:59 -0400
Received: by mail-ot1-x332.google.com with SMTP id
 46e09a7af769-7dcc9b506d9so959982a34.1
 for <80973 <at> debbugs.gnu.org>; Sat, 16 May 2026 10:33:58 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20251104; t=1778952838; x=1779557638; darn=debbugs.gnu.org;
 h=mime-version:user-agent:message-id:date:references:in-reply-to
 :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to;
 bh=7BqwUn63MBFxkYbTCrWiNrfZbsPH4TDFaJY7eyLiDH0=;
 b=LeetcD8kt4lLTJOg/f56hDkwuiydmoknny6ZkpJV/YbfHGiIHsnGA2tbCMWJscUnCK
 79PCPGguKxofVwXy+6SwKgo4kXJm2PsX+7xJX7h9Vctto4dCMB5WIbsCtd9VlausgevY
 C/bz4Lu1DsCvxuztxmeDAG+bSiwD9OMYG+Pi8pwK2LslYwUTyDBZIY1FHEhZTAEmLDpA
 9D/uxjEMHN2Kna92NGwd/q96ezlhQVjzMf34iVHz2RuJhLoee8BymuOJoh3TNH2U06VU
 3MXNS2x5J+AVdrJHTdU2QKrmsDdA6qlgvb2SaAqjd6Li5gm5d49mR4Oj8WWZNaDot4/S
 nVLQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20251104; t=1778952838; x=1779557638;
 h=mime-version:user-agent:message-id:date:references:in-reply-to
 :subject:cc:to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject
 :date:message-id:reply-to;
 bh=7BqwUn63MBFxkYbTCrWiNrfZbsPH4TDFaJY7eyLiDH0=;
 b=Azdar0nY6TDL+GTmtmMFhJbLbFNykU1OnuWA+IIK3UImvoJO4WersUycc4udQNXXRG
 ydzJLZaC2/AFjJVgfoT+Gs+JID7w+sBBihslW5THLfOAWz+U+3DtH5SNnEz7SRFdM3E3
 8H7MNjNaH2Ed9eEHhNh5topQbi1S8M2xeRpiPmrJtTw+mQUKwSo/UwJ1Xv0xxs3wn9hD
 5StwyDyQxFfzlxPLKkl85z+l9KsRtJGzd91XU+LwvNr0xyjuA7WbtmUU/YpgCWV6nMyu
 fmzak4K2K/17VTkqoI8GMRgGiurFF9LhR9dozp6ss44w1ufE/SjUMuvVWfEvrP9rjSgZ
 wWfA==
X-Gm-Message-State: AOJu0Yxk5aYngAoZaDIcyr67xoQNDPfuugpJTUCr2ypSI1dcUFigWr53
 Fs9BHAbY6+iNGU+W7IhlKDZcicH+dpY3UQd7PtFXe6dYKjv1AEY7iTJG
X-Gm-Gg: Acq92OFY4CYDgJmVIR20KR3ORhZmCrTr7Kv4pj+qwmxiX1xrqurP6VNcy1/SbawTsgb
 I9BEstPK9neCNPGsY6JMtcdE6H4f+3FXkz8Iv1KD/GpHzyHhXI2GWz9M6qE00jcspqYTcUv8wQ8
 awT5IK/9sJWDLwqvRD3WlixMZqyhJsylmhb3qNQZIieBPg3mcjzFY5okBDV2hFu1vkLci1Sbj4g
 nYfonvO6j0aq4/ZPoClIjyN+CYrqdHmWUqInOvScd+ps5QAhEw24WaZqrIqqC3pW34CUDwNcy60
 9bRq87YY0dI9SwyuzAEvJDVG7k9974tFiEZbRkBLv7Yq9rhSnw7MFTMY3uZmBZf5/I5ldNMJ5P7
 V7LkSiWccxCM2Fm47BU+YEOB5dKTMvFEsmgczhmwtamcuxtvwIsY0CHa3D1zB5Hpbxo1FQZOI6L
 7DuU70eJQvpZXQWqTDNbxkzpgKoDwi64xAhoVt5fqsM42/WZ6TeibpMeuCMfE=
X-Received: by 2002:a05:6830:3591:b0:7d7:fb8c:3c29 with SMTP id
 46e09a7af769-7e4f2b93801mr6034511a34.14.1778952837904; 
 Sat, 16 May 2026 10:33:57 -0700 (PDT)
Received: from Mac-1850 (cm-24-53-187-185.buckeyecom.net. [24.53.187.185])
 by smtp.gmail.com with ESMTPSA id
 46e09a7af769-7e55b95b82fsm4554168a34.12.2026.05.16.10.33.57
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Sat, 16 May 2026 10:33:57 -0700 (PDT)
From: "J.D. Smith" <jdtsmith@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Subject: Re: bug#80973: 31.0.50; cursor-sensor-mode events fire at different
 positions compared to Emacs 30
In-Reply-To: <jwvo6ipadli.fsf-monnier+emacs@HIDDEN> (Stefan Monnier's message
 of "Fri, 08 May 2026 15:52:35 -0400")
References: <87bjesfalz.fsf@HIDDEN>
 <jwvzf2bpdvf.fsf-monnier+emacs@HIDDEN>
 <m25x4zp8pw.fsf@HIDDEN>
 <jwvo6ipadli.fsf-monnier+emacs@HIDDEN>
Date: Sat, 16 May 2026 13:33:56 -0400
Message-ID: <m24ik7z2bf.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 80973
Cc: 80973 <at> debbugs.gnu.org, Jens Schmidt <jschmidt4gnu@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.0 (/)

Stefan Monnier <monnier@HIDDEN> writes:


>> I'm not sure there is a clean a way to achieve the same behavior
>> consistently across v30 and v31 (even though I like the new behavior
>> better).
>
> I think applying the `read-nonsticky` lets v31 behave like v30.

Right.  But since rear-sticky is the default, existing code that is
unaware of this change will fire at a new location, starting in v31.
Since it's improved behavior, it's my opinion that the temporary pain is
worth it.

>> Since cursor-sensor-functions properties are sticky by default, this
>> will certainty change the positions where sensor functions fire, as Jens
>> discovered.  Some warning about that would be appropriate I think.
>
> Do you think the `etc/NEWS` text below is "warning enough"?

Looks good. 

> === Stefan
>
>
> diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi
> index 22bce370197..7f43c631482 100644
> --- a/doc/lispref/text.texi
> +++ b/doc/lispref/text.texi
> @@ -3042,6 +3042,7 @@ Examining Properties
>  text properties are considered, since strings never have overlays.
>  @end defun
>  
> +@anchor{Boundaries of text and overlay properties}
>  @defun get-pos-property position prop &optional object
>  This function is like @code{get-char-property}, except that it pays
>  attention to properties' stickiness and overlays' advancement settings
> @@ -4019,6 +4020,10 @@ Special Properties
>  the cursor is entering the text that has this property or leaving it, or
>  @code{moved} when the cursor moved within that text.
>  Other values for the direction should be ignored.
> +Whether the boundary positions (at the beginning and end of an overlay or
> +a stretch of text-property) are considered as inside or outside follows
> +the same rules as for @code{get-pos-property}, see @pxref{Boundaries of
> +text and overlay properties}.
>  The functions are called only when the minor mode
>  @code{cursor-sensor-mode} is turned on.
>  
> diff --git a/etc/NEWS b/etc/NEWS
> index 0c221d049e0..cbffb21d33c 100644
> --- a/etc/NEWS
> +++ b/etc/NEWS
> @@ -3969,6 +3969,21 @@ all versions, sleep events require Windows 8 or later).
>  
>  * Incompatible Lisp Changes in Emacs 31.1
>  
> ++++
> +** Boundaries of 'cursor-sensor-functions' now obey stickiness.
> +'cursor-sensor-mode' now uses 'get-pos-property' to decide whether a
> +boundary is considered as inside or outside.
> +
> +This means that by default, the boundaries have changed: the end
> +position of a stretch of a 'cursor-sensor-functions' text property
> +used to be considered outside of the stretch whereas it is now
> +considered as inside.  You can recover the previous behavior by
> +controlling the stickiness, for example with a call like:
> +
> +    (add-text-properties BEG END
> +                         '(cursor-sensor-functions (MY-FUNCTION)
> +                           rear-nonsticky (cursor-sensor-functions)))
> +
>  +++
>  ** 'makunbound' on a variable alias undoes the alias.
>  Previously, it had the effect of applying the 'makunbound' on the




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#80973; Package emacs. Full text available.

Message received at 80973 <at> debbugs.gnu.org:


Received: (at 80973) by debbugs.gnu.org; 8 May 2026 19:52:55 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri May 08 15:52:54 2026
Received: from localhost ([127.0.0.1]:42473 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wLRFi-0005fl-6Y
	for submit <at> debbugs.gnu.org; Fri, 08 May 2026 15:52:54 -0400
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:27537)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <monnier@HIDDEN>)
 id 1wLRFd-0005dn-6q
 for 80973 <at> debbugs.gnu.org; Fri, 08 May 2026 15:52:47 -0400
Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1])
 by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 845501000BC;
 Fri,  8 May 2026 15:52:38 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1778269957;
 bh=0zY1x6fH5ywUhEzgcqyu3dWFy64jwei5K65iHkMC+ME=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=VZCmJnr8utwne7voEQebQr93qzXRGei/QEFxK3EXNuK3BSoXFQ/T1lrw6NshdGAtV
 cP/NkxNCpXSUblEsnLrbXRqq25TLkFY0UXhJTdUDxMbewMM9zKRBhI87BMGyH2hbjH
 Lfte8BAGrvFep36N8mSpSfAZjQFH7rRLjdGhs8yX2ngCWt1Nshm/49gX0zXjG8xH3m
 EYxCvUrXhlsoyXoKYYcUMQs2MXC+jiEVDHHg1AxCAtPUUhC9PgPapy5R7H0UGxMI3l
 ZbvZRCeNmz9re3o5wzR9s+s16yI0oKniLd42gOFtx0vxZ89p24KzvcBAVdjth3zGeE
 zRn1ltB04RE6Q==
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 0712B10002D;
 Fri,  8 May 2026 15:52:37 -0400 (EDT)
Received: from alfajor (unknown [192.197.121.20])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id E589F1205CC;
 Fri,  8 May 2026 15:52:36 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: "J.D. Smith" <jdtsmith@HIDDEN>
Subject: Re: bug#80973: 31.0.50; cursor-sensor-mode events fire at different
 positions compared to Emacs 30
In-Reply-To: <m25x4zp8pw.fsf@HIDDEN>
Message-ID: <jwvo6ipadli.fsf-monnier+emacs@HIDDEN>
References: <87bjesfalz.fsf@HIDDEN>
 <jwvzf2bpdvf.fsf-monnier+emacs@HIDDEN>
 <m25x4zp8pw.fsf@HIDDEN>
Date: Fri, 08 May 2026 15:52:35 -0400
User-Agent: Gnus/5.13 (Gnus v5.13)
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.250 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
 DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from
 domain
 KAM_NUMSUBJECT 0.5 Subject ends in numbers excluding current years
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 80973
Cc: 80973 <at> debbugs.gnu.org, Jens Schmidt <jschmidt4gnu@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Eli Zaretskii [2026-05-07 17:01:04] wrote:
> Please add a cross-reference here to where get-pos-property is
> described.
> Maybe we should also add an example, to show how to control this.

I added a cross-reference to the Texi and an example in NEWS.

J.D. Smith [2026-05-07 10:58:35] wrote:
>>     (add-text-properties 6 20 '(cursor-sensor-functions (cs-foo)
>>                                 rear-sticky (cursor-sensor-functions)))
>
> Aha, this sounds likely.  Isn't everything rear-sticky by default unless
> disabled by rear-nonsticky?

Oops, that's right, thanks.

> To summarize my understanding, in v30,
> stickiness is _not_ considered when checking for "inside": point has to
> move before a character marked with an explicit cursor-sensor-functions
> property.  In v31, if a character would have inherited
> cursor-sensor-functions there (due to default stickiness), the cursor
> sensor is fired there.

That's right.

> I'm not sure there is a clean a way to achieve the same behavior
> consistently across v30 and v31 (even though I like the new behavior
> better).

I think applying the `read-nonsticky` lets v31 behave like v30.

> Since cursor-sensor-functions properties are sticky by default, this
> will certainty change the positions where sensor functions fire, as Jens
> discovered.  Some warning about that would be appropriate I think.

Do you think the `etc/NEWS` text below is "warning enough"?


=== Stefan


diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi
index 22bce370197..7f43c631482 100644
--- a/doc/lispref/text.texi
+++ b/doc/lispref/text.texi
@@ -3042,6 +3042,7 @@ Examining Properties
 text properties are considered, since strings never have overlays.
 @end defun
 
+@anchor{Boundaries of text and overlay properties}
 @defun get-pos-property position prop &optional object
 This function is like @code{get-char-property}, except that it pays
 attention to properties' stickiness and overlays' advancement settings
@@ -4019,6 +4020,10 @@ Special Properties
 the cursor is entering the text that has this property or leaving it, or
 @code{moved} when the cursor moved within that text.
 Other values for the direction should be ignored.
+Whether the boundary positions (at the beginning and end of an overlay or
+a stretch of text-property) are considered as inside or outside follows
+the same rules as for @code{get-pos-property}, see @pxref{Boundaries of
+text and overlay properties}.
 The functions are called only when the minor mode
 @code{cursor-sensor-mode} is turned on.
 
diff --git a/etc/NEWS b/etc/NEWS
index 0c221d049e0..cbffb21d33c 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -3969,6 +3969,21 @@ all versions, sleep events require Windows 8 or later).
 
 * Incompatible Lisp Changes in Emacs 31.1
 
++++
+** Boundaries of 'cursor-sensor-functions' now obey stickiness.
+'cursor-sensor-mode' now uses 'get-pos-property' to decide whether a
+boundary is considered as inside or outside.
+
+This means that by default, the boundaries have changed: the end
+position of a stretch of a 'cursor-sensor-functions' text property
+used to be considered outside of the stretch whereas it is now
+considered as inside.  You can recover the previous behavior by
+controlling the stickiness, for example with a call like:
+
+    (add-text-properties BEG END
+                         '(cursor-sensor-functions (MY-FUNCTION)
+                           rear-nonsticky (cursor-sensor-functions)))
+
 +++
 ** 'makunbound' on a variable alias undoes the alias.
 Previously, it had the effect of applying the 'makunbound' on the





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#80973; Package emacs. Full text available.

Message received at 80973 <at> debbugs.gnu.org:


Received: (at 80973) by debbugs.gnu.org; 8 May 2026 18:38:39 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri May 08 14:38:39 2026
Received: from localhost ([127.0.0.1]:41560 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wLQ5t-0002oy-Js
	for submit <at> debbugs.gnu.org; Fri, 08 May 2026 14:38:39 -0400
Received: from mr6.vodafonemail.de ([145.253.228.166]:40860)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <jschmidt4gnu@HIDDEN>)
 id 1wLQ5o-0002nx-Mr
 for 80973 <at> debbugs.gnu.org; Fri, 08 May 2026 14:38:35 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vodafonemail.de;
 s=vfde-mb-mr2-23sep; t=1778265510;
 bh=s6IESduMw+zBsiETbyNn5OVV1DSwTnvu32WDJyn5qpE=;
 h=From:To:Subject:In-Reply-To:References:Date:Message-ID:User-Agent:
 Content-Type:From;
 b=UnEtLEPp0AHfUyF6fUrx3PendmWGM1Q50qPW/VfFsSEo2K13HfJEUwoi0FwKoft4O
 PiCn/64b1UUbcgm/Nj78+g9REd9YFbIYHX+dYqjwJrOJlDxgrvocxtVql5MnyA6tzu
 hjDaKlTwJYNcJpmDKrxhp8389bou9r7mpirV9EAA=
Received: from smtp.vodafone.de (unknown [10.0.0.2])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits))
 (No client certificate requested)
 by mr6.vodafonemail.de (Postfix) with ESMTPS id 4gByYd74NPz3sV5g;
 Fri,  8 May 2026 18:38:29 +0000 (UTC)
Received: from sappc2 (unknown [195.52.133.38])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange ECDHE (prime256v1) server-signature RSA-PSS (2048 bits)
 server-digest SHA256) (No client certificate requested)
 by smtp.vodafone.de (Postfix) with ESMTPSA id 4gByYR4xxPz9rwG;
 Fri,  8 May 2026 18:38:16 +0000 (UTC)
From: Jens Schmidt <jschmidt4gnu@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Subject: Re: bug#80973: 31.0.50; cursor-sensor-mode events fire at different
 positions compared to Emacs 30
In-Reply-To: <jwvzf2bpdvf.fsf-monnier+emacs@HIDDEN>
References: <87bjesfalz.fsf@HIDDEN>
 <jwvzf2bpdvf.fsf-monnier+emacs@HIDDEN>
Date: Fri, 08 May 2026 20:38:15 +0200
Message-ID: <87lddtrbl4.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-purgate-server: smtpa01
X-purgate-type: clean
X-purgate: clean
X-purgate-size: 1175
X-purgate-ID: 155817::1778265509-ACEF1866-B2267E0B/0/0
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 80973
Cc: 80973 <at> debbugs.gnu.org, "J.D. Smith" <jdtsmith@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Stefan Monnier <monnier@HIDDEN> writes:

> I think you can recover the previous behavior in your above case with
> something like:
>
>     (add-text-properties 6 20 '(cursor-sensor-functions (cs-foo)
>                                 rear-sticky (cursor-sensor-functions)))
>
> So I think the bug here is that this change is not documented.

Minor nit, as also J.D. has noted: I think it should be
rear-*non*sticky, actually.

> ++++
> +** Boundaries of 'cursor-sensor-functions' now obey stickiness.
> +'cursor-sensor-mode' now uses 'get-pos-property' to decide whether a
> +boundary is considered as inside or outside.

I tried to be a bit more explicit about symptomps and cure, but that got
admittedly lengthy:

** Boundaries of 'cursor-sensor-functions' now obey stickiness.
'cursor-sensor-mode' now uses 'get-pos-property' to decide whether a
boundary is considered as inside or outside.  As a result Emacs can now
call cursor sensor functions at different positions compared to previous
versions.  To get the old behavior back, it should usually suffice to
make text property 'cursor-sensor-functions' rear-nonsticky.


Thanks!




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#80973; Package emacs. Full text available.

Message received at 80973 <at> debbugs.gnu.org:


Received: (at 80973) by debbugs.gnu.org; 7 May 2026 14:58:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu May 07 10:58:46 2026
Received: from localhost ([127.0.0.1]:54877 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wL0BW-00038X-MK
	for submit <at> debbugs.gnu.org; Thu, 07 May 2026 10:58:46 -0400
Received: from mail-oa1-x2e.google.com ([2001:4860:4864:20::2e]:59879)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <jdtsmith@HIDDEN>)
 id 1wL0BS-00037i-OH
 for 80973 <at> debbugs.gnu.org; Thu, 07 May 2026 10:58:40 -0400
Received: by mail-oa1-x2e.google.com with SMTP id
 586e51a60fabf-40ea36b56b7so639309fac.3
 for <80973 <at> debbugs.gnu.org>; Thu, 07 May 2026 07:58:38 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20251104; t=1778165917; x=1778770717; darn=debbugs.gnu.org;
 h=mime-version:user-agent:message-id:date:references:in-reply-to
 :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to;
 bh=9H3tR8wvrNo1WKQCWTdvKl9ATGo+s9nTEwado6/hXcs=;
 b=lh+bp5AtmBFs1cheQlc8DEd9eqr/fVmldKhqwZ2pE61A4v4q5dN9BSZaWCEZlIE2u9
 silu3CMIYL1vzKIwrI/L54UiCRIJ4d5EHqgo+pK7J54dbAT9FQ3fEE9IhcI1smCSFRzh
 V/E2OXSm/0aUGXnKdixxalS8ARWMxvXzdMRlGA6FkRPqvfujVCV8TN2AdIw+H42Aop+N
 leQS79gBjVJ8Y8JumIBXcvBdDg/iTq+/xKIowB7bVdThj/ry6UE+7jU4dBRCtBboRsQG
 C17UWQlV1gSHQrQEmKZ1mI79kr0vgCASOUlcQn4ZXqhrpTqlsVodP/kIvRmM7XjoiUfq
 df9A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20251104; t=1778165917; x=1778770717;
 h=mime-version:user-agent:message-id:date:references:in-reply-to
 :subject:cc:to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject
 :date:message-id:reply-to;
 bh=9H3tR8wvrNo1WKQCWTdvKl9ATGo+s9nTEwado6/hXcs=;
 b=QiAFm0KGJl0YNBuAUO+OiDtR9wVN9ADUjJRTSDsW24D2ffyOY+LbWhawmswxtB9Lyq
 khQwp+S/vyISGCi4ghKmArKBGZT28+EGRBjvC5sHOOZ3s0rrGYyWC5vyJ3JTfFKaHgRR
 Efrkjl/joXZ+4K6LGpywafMXVhJ9/uD7yHj5DpRSZqeEM31/QwuvRVIuFhu0g9oJNfmj
 evxvqgRyOBSQutVp494EzdQgqpbRht2MpirFe454Udlr+/DiHeEJlMGcsFhGvG2co/Uh
 x22I088Vl+7ZVmK8q1ziryK4+LWyA8QR+bSPrAlCsyNchf5EScglX/qGfvKbNLTM8QtJ
 KZVg==
X-Forwarded-Encrypted: i=1;
 AFNElJ9Ykh+VV5ewhlUdj52YamgAtHrhO2NFFyVrDzrgdN2R7d3ExynsHBqcxedvT7SEmTGFacKFdw==@debbugs.gnu.org
X-Gm-Message-State: AOJu0Yw++hcoPU7WyU+rzm20XiF10/DOGxvUiOiBkmlBoaqpFCiD1l32
 pE1CYBJfydSew8Nt1D+PNbyso74/AzIMYlJZZoAlEcz8xplI3IPohBA/+0CIig==
X-Gm-Gg: AeBDiesiAPOcCvkDBsnBAyHlEIbP9kpivaflev576cJOLPm38zFRamn9rOyv6sMOSPV
 e0rPMRyLslpde6hIvW+tlKH8chv+0hGbdMDHEdyrsmc5/s49ePhZ7kulTzZzDhtmLuD3QwpGb1G
 x/qTQlkI06eu9McZLRwK8EtXd1WYbT6rsmmpcaYn/1CeMHK8ri9Vj6p2P0H8eV52z3Bl9zH9qNk
 WpZkYevDy3wBsinPIgPb921FRZRVPhJ7nriyWY32l6RuT6inFezARXNw+RStUOQwTXc/FNPP1KG
 YrZh+PMeLN0JV4XVGathmXdgelz8K0LLBywYrwXpo30a/qeDD6wFsdmzqAUMJfUmGca6812CzsH
 umz6WZ/GK0Hmfb7vZ2BbPKmLh9Y5PO8do3HlkVAZWPh8lqf4BpEa8tIUrAA9McuaIHE2ZmbFyjV
 tWxZuzWf8f1eY10nLyV5SJs2C01La/v+U1PJS88gEAkA==
X-Received: by 2002:a05:6870:390c:b0:430:a6e:4730 with SMTP id
 586e51a60fabf-434f663b642mr5382557fac.24.1778165917391; 
 Thu, 07 May 2026 07:58:37 -0700 (PDT)
Received: from moss-93 ([12.1.245.2]) by smtp.gmail.com with ESMTPSA id
 586e51a60fabf-43454cbd8dbsm19699646fac.11.2026.05.07.07.58.36
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Thu, 07 May 2026 07:58:36 -0700 (PDT)
From: "J.D. Smith" <jdtsmith@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Subject: Re: bug#80973: 31.0.50; cursor-sensor-mode events fire at different
 positions compared to Emacs 30
In-Reply-To: <jwvzf2bpdvf.fsf-monnier+emacs@HIDDEN> (Stefan Monnier's message
 of "Thu, 07 May 2026 09:24:46 -0400")
References: <87bjesfalz.fsf@HIDDEN>
 <jwvzf2bpdvf.fsf-monnier+emacs@HIDDEN>
Date: Thu, 07 May 2026 10:58:35 -0400
Message-ID: <m25x4zp8pw.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 80973
Cc: 80973 <at> debbugs.gnu.org, Jens Schmidt <jschmidt4gnu@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.0 (/)

Stefan Monnier <monnier@HIDDEN> writes:

>> ------------------------- test.txt -------------------------
>> Foo =bar0 bar1 bar2= baz.
>>
>> (defun cs-foo (&rest args) (message "%d:%S" (point) args))
>> (progn
>>   (add-text-properties 5 6 '(invisible t))
>>   (add-text-properties 20 21 '(invisible t))
>>   (add-text-properties 6 20 '(cursor-sensor-functions (cs-foo)))
>>
>>   (cursor-sensor-mode)
>>
>>   (goto-char 26))
>> ------------------------- test.txt -------------------------
>>
>> Then C-x C-e both forms, the latter of which should render the equal
>> signs invisble and leave point at EOL in line 1.  Then move backwards
>> a couple of times with C-b.
>>
>> In Emacs master, this results in the message
>>
>>   20:(#<window 3 on test.txt> 21 entered)
>>
>> meaning that the sensor function is called first when moving point from
>> position 21 to 20.
>>
>> In Emacs 30, the sensor function is called one position later:
>>
>>   19:(#<window 3 on test.txt> 20 entered)
>
> I think this is the result of commit f4a1c006569f which changed the
> detail of the handling of `cursor-sensors-mode` where we now make it
> possible to control whether the boundary is considered "inside" or
> "outside", depending on the stickiness.
>
> I think you can recover the previous behavior in your above case with
> something like:
>
>     (add-text-properties 6 20 '(cursor-sensor-functions (cs-foo)
>                                 rear-sticky (cursor-sensor-functions)))

Aha, this sounds likely.  Isn't everything rear-sticky by default unless
disabled by rear-nonsticky?  To summarize my understanding, in v30,
stickiness is _not_ considered when checking for "inside": point has to
move before a character marked with an explicit cursor-sensor-functions
property.  In v31, if a character would have inherited
cursor-sensor-functions there (due to default stickiness), the cursor
sensor is fired there.

I think the new behavior is absolutely preferable.  Ideally I could
place the 'cursor-sensor-functions on the inner text (`HIDDEN_MARKERS')
within:

  ~HIDDEN_MARKERS~

and just leave it rear-sticky, so the sensor function would fire when
point moves in from the right to the position between the `S' and the
final `~'.  Perhaps situations like these are what led to the new
behavior.

To achieve equivalent behavior in v30 I had to set
'cursor-sensor-functions on `HIDDEN_MARKERS~' (_including_ the final
marker character), and add rear-nonsticky 'cursor-sensor-functions
there, so that this property won't extend past the final `~' if text is
inserted after it.

I'm not sure there is a clean a way to achieve the same behavior
consistently across v30 and v31 (even though I like the new behavior
better). I suppose I could hard-code a version test in the font-lock
code which applies the properties while v29 & v30 are supported by org.

> === Stefan
> diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi
> index 22bce370197..6c06840b737 100644
> --- a/doc/lispref/text.texi
> +++ b/doc/lispref/text.texi
> @@ -4019,6 +4019,9 @@ Special Properties
>  the cursor is entering the text that has this property or leaving it, or
>  @code{moved} when the cursor moved within that text.
>  Other values for the direction should be ignored.
> +Whether the boundary positions (at the beginning and end of an overlay or
> +a stretch of text-property) are considered as inside or outside follows
> +the same rules as for @code{get-pos-property}.
>  The functions are called only when the minor mode
>  @code{cursor-sensor-mode} is turned on.

Since cursor-sensor-functions properties are sticky by default, this
will certainty change the positions where sensor functions fire, as Jens
discovered.  Some warning about that would be appropriate I think.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#80973; Package emacs. Full text available.

Message received at 80973 <at> debbugs.gnu.org:


Received: (at 80973) by debbugs.gnu.org; 7 May 2026 14:01:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu May 07 10:01:38 2026
Received: from localhost ([127.0.0.1]:54336 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wKzIH-0002oB-8d
	for submit <at> debbugs.gnu.org; Thu, 07 May 2026 10:01:38 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:39802)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1wKzID-0002mb-11
 for 80973 <at> debbugs.gnu.org; Thu, 07 May 2026 10:01:35 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1wKzI5-0007Xq-0s; Thu, 07 May 2026 10:01:25 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=WTlK6DsXqYJ4gJfh3WC3CkE6vk++orP99RPO7yBcpzE=; b=VlsWluiev4lr
 ITLznEN0sLOt6tOq0sXQvxOfDech3NeGiz6aPr5HW+GS6ewK6H5duB81Ojef89tvKL34oFjE5pg4+
 Fk8quvyoNrVDBoo2ZAWLw1b/XZNl56jTKOPDvwDlWqSiqDjJB1CBTuq23UvhAjR86spKK5iX/ynxC
 kKYRqvKfKOpou4aXP5eFyPGd1bTFXjtYYkSMkRVocFwi/fJnQA9KZHoya1FsJLzT9v44LDeUFd40G
 MC5vvLxWfEtGEPPcuoiSuRyZnQdML7O3MevUgpDb7jNyM5RrNTDCcdKRN/59IUgnFeJrQpvNCRKem
 nxvJ1KsINxnj9yRB6I2BmQ==;
Date: Thu, 07 May 2026 17:01:04 +0300
Message-Id: <864ikj8gkf.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
In-Reply-To: <jwvzf2bpdvf.fsf-monnier+emacs@HIDDEN> (bug-gnu-emacs@HIDDEN)
Subject: Re: bug#80973: 31.0.50;
 cursor-sensor-mode events fire at different positions compared to
 Emacs 30
References: <87bjesfalz.fsf@HIDDEN>
 <jwvzf2bpdvf.fsf-monnier+emacs@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 80973
Cc: 80973 <at> debbugs.gnu.org, jschmidt4gnu@HIDDEN, jdtsmith@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Cc: 80973 <at> debbugs.gnu.org, "J.D. Smith" <jdtsmith@HIDDEN>
> Date: Thu, 07 May 2026 09:24:46 -0400
> From:  Stefan Monnier via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs@HIDDEN>
> 
> diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi
> index 22bce370197..6c06840b737 100644
> --- a/doc/lispref/text.texi
> +++ b/doc/lispref/text.texi
> @@ -4019,6 +4019,9 @@ Special Properties
>  the cursor is entering the text that has this property or leaving it, or
>  @code{moved} when the cursor moved within that text.
>  Other values for the direction should be ignored.
> +Whether the boundary positions (at the beginning and end of an overlay or
> +a stretch of text-property) are considered as inside or outside follows
> +the same rules as for @code{get-pos-property}.

Please add a cross-reference here to where get-pos-property is
described.

Maybe we should also add an example, to show how to control this.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#80973; Package emacs. Full text available.

Message received at 80973 <at> debbugs.gnu.org:


Received: (at 80973) by debbugs.gnu.org; 7 May 2026 13:25:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu May 07 09:25:08 2026
Received: from localhost ([127.0.0.1]:54208 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wKyiu-0007UP-74
	for submit <at> debbugs.gnu.org; Thu, 07 May 2026 09:25:08 -0400
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:40520)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <monnier@HIDDEN>)
 id 1wKyim-0007S9-Tz
 for 80973 <at> debbugs.gnu.org; Thu, 07 May 2026 09:25:01 -0400
Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1])
 by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id D553B441CAC;
 Thu,  7 May 2026 09:24:49 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1778160288;
 bh=LdwF3bRNVlKfXSQJtPF/4rXRa7dVwgibGbqdSEaS2M4=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=ZhD7BhC4Dhq+xrjZhGUus539xjlbfHSxhHGEQseNUBztdfmZ8U7rT0QJ9MZ+uq9BY
 S3JJ0eiOrrzx4ZKFSVLuVBQg3UikFQ+lvbb4OoIPhZ8kK6rib6kJZVaqRP04j8t/mN
 mVnB+cdunV+T3uiJxVC5gV0lPP6Lql1MHNc1NnPzWVfwCJ2DG/N60fnTuJ7udx7JD9
 01tpvQDreBMfIevil96PvLWwOZKDjgyco7MF6OLPHl8VR/+7gvPf8opo3WCxaBHPSv
 K6ZeyaQTPtpqVyRc1ckRxCfvPvelA43X9FXqX7v3IYM6DJuYCo21cOUQD2w3c4zzHC
 OfuXfOQCuP/UQ==
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 67ACD441CD2;
 Thu,  7 May 2026 09:24:48 -0400 (EDT)
Received: from pastel (104-195-197-162.cpe.teksavvy.com [104.195.197.162])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 33BAB120323;
 Thu,  7 May 2026 09:24:48 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Jens Schmidt <jschmidt4gnu@HIDDEN>
Subject: Re: bug#80973: 31.0.50; cursor-sensor-mode events fire at different
 positions compared to Emacs 30
In-Reply-To: <87bjesfalz.fsf@HIDDEN>
Message-ID: <jwvzf2bpdvf.fsf-monnier+emacs@HIDDEN>
References: <87bjesfalz.fsf@HIDDEN>
Date: Thu, 07 May 2026 09:24:46 -0400
User-Agent: Gnus/5.13 (Gnus v5.13)
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.596 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
 DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from
 domain
 KAM_ASCII_DIVIDERS 0.8 Email that uses ascii formatting dividers and possible
 spam tricks
 KAM_NUMSUBJECT 0.5 Subject ends in numbers excluding current years
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 80973
Cc: 80973 <at> debbugs.gnu.org, "J.D. Smith" <jdtsmith@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> This should be related to Stefan's recent changes in cursor-sensor.el,
> and I hope this issue reaches him and bug-gnu-emacs in time before the
> Emacs 31 cut.

Emacs-31 is still not ready for release, so there's no rush here, we
have ample time to fix this one way or another.

> ------------------------- test.txt -------------------------
> Foo =bar0 bar1 bar2= baz.
>
> (defun cs-foo (&rest args) (message "%d:%S" (point) args))
> (progn
>   (add-text-properties 5 6 '(invisible t))
>   (add-text-properties 20 21 '(invisible t))
>   (add-text-properties 6 20 '(cursor-sensor-functions (cs-foo)))
>
>   (cursor-sensor-mode)
>
>   (goto-char 26))
> ------------------------- test.txt -------------------------
>
> Then C-x C-e both forms, the latter of which should render the equal
> signs invisble and leave point at EOL in line 1.  Then move backwards
> a couple of times with C-b.
>
> In Emacs master, this results in the message
>
>   20:(#<window 3 on test.txt> 21 entered)
>
> meaning that the sensor function is called first when moving point from
> position 21 to 20.
>
> In Emacs 30, the sensor function is called one position later:
>
>   19:(#<window 3 on test.txt> 20 entered)

I think this is the result of commit f4a1c006569f which changed the
detail of the handling of `cursor-sensors-mode` where we now make it
possible to control whether the boundary is considered "inside" or
"outside", depending on the stickiness.

I think you can recover the previous behavior in your above case with
something like:

    (add-text-properties 6 20 '(cursor-sensor-functions (cs-foo)
                                rear-sticky (cursor-sensor-functions)))

So I think the bug here is that this change is not documented.


=== Stefan
diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi
index 22bce370197..6c06840b737 100644
--- a/doc/lispref/text.texi
+++ b/doc/lispref/text.texi
@@ -4019,6 +4019,9 @@ Special Properties
 the cursor is entering the text that has this property or leaving it, or
 @code{moved} when the cursor moved within that text.
 Other values for the direction should be ignored.
+Whether the boundary positions (at the beginning and end of an overlay or
+a stretch of text-property) are considered as inside or outside follows
+the same rules as for @code{get-pos-property}.
 The functions are called only when the minor mode
 @code{cursor-sensor-mode} is turned on.
 
diff --git a/etc/NEWS b/etc/NEWS
index 0c221d049e0..13a3f0d0465 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -3969,6 +3969,11 @@ all versions, sleep events require Windows 8 or later).
 
 * Incompatible Lisp Changes in Emacs 31.1
 
++++
+** Boundaries of 'cursor-sensor-functions' now obey stickiness.
+'cursor-sensor-mode' now uses 'get-pos-property' to decide whether a
+boundary is considered as inside or outside.
+
 +++
 ** 'makunbound' on a variable alias undoes the alias.
 Previously, it had the effect of applying the 'makunbound' on the





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#80973; Package emacs. Full text available.

Message received at 80973 <at> debbugs.gnu.org:


Received: (at 80973) by debbugs.gnu.org; 7 May 2026 12:52:02 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu May 07 08:52:02 2026
Received: from localhost ([127.0.0.1]:53828 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wKyCv-0002Px-Mo
	for submit <at> debbugs.gnu.org; Thu, 07 May 2026 08:52:02 -0400
Received: from mail-qv1-xf2a.google.com ([2607:f8b0:4864:20::f2a]:43039)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <jdtsmith@HIDDEN>)
 id 1wKyCs-0002PR-GN
 for 80973 <at> debbugs.gnu.org; Thu, 07 May 2026 08:51:59 -0400
Received: by mail-qv1-xf2a.google.com with SMTP id
 6a1803df08f44-8b5cda2dab9so17296996d6.0
 for <80973 <at> debbugs.gnu.org>; Thu, 07 May 2026 05:51:58 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20251104; t=1778158318; x=1778763118; darn=debbugs.gnu.org;
 h=to:in-reply-to:cc:references:message-id:date:subject:mime-version
 :from:content-transfer-encoding:from:to:cc:subject:date:message-id
 :reply-to; bh=g8cForgKQElun9bDTtJ0Te8SR+lVxA3bM4k01G5wznA=;
 b=Gb/a6jOEd4yIxywWm14gB7cHHz8Y7tv2YGdq70BlvON8NmQNARoBMFLWKL3WFRsNqm
 FNHc2nZCwVsjqMsgec08XZyvSjsd2w2oLhxNLtzhZuPqWjXxXLXUiZjYHcDtItqeOgrM
 /sv6elxmOoXRJ151xflHESv694TpXluaHnt//dG9F/SQOhovHeW7N7HfV0W3A/XYTutB
 EhbdrJvZ+PI1RrKrR3bv1sVpg99xSKdi2xcuzVvTr0crGWjB4/cVQGJ0ZnaBGQJdF9u7
 Lmz6YHIim6NDup749WeemL3c2gG+iuwSbmAIPW3TRxAb7d/fH9plLZKFO9cU3a2UEmUv
 cw+g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20251104; t=1778158318; x=1778763118;
 h=to:in-reply-to:cc:references:message-id:date:subject:mime-version
 :from:content-transfer-encoding:x-gm-gg:x-gm-message-state:from:to
 :cc:subject:date:message-id:reply-to;
 bh=g8cForgKQElun9bDTtJ0Te8SR+lVxA3bM4k01G5wznA=;
 b=PEu/MWcWnfhMFfyFwvkOPLmPeHlLfi9fjIPZ0VCo/q1lIsBGO0shUKq5c71MrimRKK
 KCzeAZeJb2j728QlXQok8zpdM1MjVjy8pOCU/22bOykqO2oQtRpa+RGAxePLNJNlHsDz
 Uj+2E7xjzG8GdzcZaxJx9iamM1H6WNALd+XOrwnRG60y1SAudyNIyLbJwSfHXdLkueUl
 RPKH3BnbX9KlN7ycMn+6FPdlFGn9DAriE6bmSFwqakFh5LGOYTpypa8FbXnOKL3XNd7O
 3qHixQj0qUyMIDd3Yeket1GkCpf6eW8Q/R9E/eZdG5yC7MHhbzRKLzAaQWOwn32qKm0U
 vqUA==
X-Gm-Message-State: AOJu0Yz/Od1MOhRvZX3eqd3HE+W5sDmTo+v9NsuXvIX+Bt+F4XWssNPf
 OYyhI0EO1lMUTibWkH9OhT6697x+2sbJx8Ai3FAscLHQCpGQrFdm+MPQ
X-Gm-Gg: AeBDies0pI+TbDp7nlW0tFfbzxWcyLoAzS3wb8/iVq9ZZoN2SE5zp+NAIOgwL9IDx0U
 W+5BrhZZPihc7uhhwRkQ2m6NBseaICnFvEkLYzczmMSWIPspGDHvNjkua5cH+XVid/TyISZjeor
 fmVzYknEf7eB3JuTKL+NmYCKvcMiOr0cs0Z5l7ZJjk8hRgTYIw6uW41fHPJnWOoxKqw/zhOHUw0
 opRSfsiygEmakcvIso16KHQzouCWriRYLYcSxC3kBUc90Tf+6aqZHjmObSbqlpALsL7Jwjgfiuh
 F8EF2IeHCz4O20yYovfOBg/3IJfFNUfUa3U25mwsb/1SOq8Vu49L8KXXaKC09OthUrvdIV5SYV5
 nYa4D1z/D95i5RFBY/fShcd+1PmZ7lXaNRQfcL+Irrt2MoDQadtR6grKtBbxYLk9dIG2EU2ANQ9
 uhq57jzod3sXZLzs1lfwIKvoBRwEGbiRY+D0q2LDOxEIpN6rqOyGti/rBfLv2V+Fdr2fId2/wfX
 w==
X-Received: by 2002:ac8:59cc:0:b0:50f:b7b3:2ec4 with SMTP id
 d75a77b69052e-51475c4a0c9mr28200671cf.25.1778158317699; 
 Thu, 07 May 2026 05:51:57 -0700 (PDT)
Received: from smtpclient.apple ([2600:1009:b0a9:b47:7c66:4f22:7b29:574c])
 by smtp.gmail.com with ESMTPSA id
 d75a77b69052e-51040b5b6c9sm176550521cf.21.2026.05.07.05.51.56
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Thu, 07 May 2026 05:51:57 -0700 (PDT)
Content-Type: multipart/alternative;
 boundary=Apple-Mail-CE920A5F-FD80-4D19-A93F-64A394FC3360
Content-Transfer-Encoding: 7bit
From: JD Smith <jdtsmith@HIDDEN>
Mime-Version: 1.0 (1.0)
Subject: Re: bug#80973: 31.0.50;
 cursor-sensor-mode events fire at different positions compared to
 Emacs 30
Date: Thu, 7 May 2026 08:51:45 -0400
Message-Id: <2A206A19-E770-4DE0-B214-9AAB362FF6AA@HIDDEN>
References: <7E12D050-EE60-4617-BCBA-5801DF4544F7@HIDDEN>
In-Reply-To: <7E12D050-EE60-4617-BCBA-5801DF4544F7@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>, Jens Schmidt <jschmidt4gnu@HIDDEN>
X-Mailer: iPhone Mail (23D8133)
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 80973
Cc: 80973 <at> debbugs.gnu.org, monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.0 (/)


--Apple-Mail-CE920A5F-FD80-4D19-A93F-64A394FC3360
Content-Type: text/plain;
	charset=utf-8
Content-Transfer-Encoding: quoted-printable


--

> On May 7, 2026, at 7:17=E2=80=AFAM, JD Smith <jdtsmith@HIDDEN> wrote:
>=20
> =EF=BB=BF
>=20
>>> On May 7, 2026, at 1:40=E2=80=AFAM, Eli Zaretskii <eliz@HIDDEN> wrote:
>>>=20
>>> Cc: Stefan Monnier <monnier@HIDDEN>,
>>> "J.D. Smith" <jdtsmith@HIDDEN>
>>> Date: Thu, 07 May 2026 00:15:36 +0200
>>> From:  Jens Schmidt via "Bug reports for GNU Emacs,
>>> the Swiss army knife of text editors" <bug-gnu-emacs@HIDDEN>
>>>=20
>>>=20
>>> This should be related to Stefan's recent changes in cursor-sensor.el,
>>> and I hope this issue reaches him and bug-gnu-emacs in time before the
>>> Emacs 31 cut.  J.D., have you already opened a bug w.r.t. this issue?
>>> Then we could close this one.
>>>=20
>>> Please save the snippet below as test.txt and open it in Emacs 30.2 vs
>>> Emacs master as "emacs -Q test.txt".
>>>=20
>>> ------------------------- test.txt -------------------------
>>> Foo =3Dbar0 bar1 bar2=3D baz.
>>>=20
>>> (defun cs-foo (&rest args) (message "%d:%S" (point) args))
>>> (progn
>>> (add-text-properties 5 6 '(invisible t))
>>> (add-text-properties 20 21 '(invisible t))
>>> (add-text-properties 6 20 '(cursor-sensor-functions (cs-foo)))
>>>=20
>>> (cursor-sensor-mode)
>>>=20
>>> (goto-char 26))
>>> ------------------------- test.txt -------------------------
>>>=20
>>> Then C-x C-e both forms, the latter of which should render the equal
>>> signs invisble and leave point at EOL in line 1.  Then move backwards
>>> a couple of times with C-b.
>>>=20
>>> In Emacs master, this results in the message
>>>=20
>>> 20:(#<window 3 on test.txt> 21 entered)
>>>=20
>>> meaning that the sensor function is called first when moving point from
>>> position 21 to 20.
>>>=20
>>> In Emacs 30, the sensor function is called one position later:
>>>=20
>>> 19:(#<window 3 on test.txt> 20 entered)
>>>=20
>>> This causes trouble in J.D.'s org-inside, planned for Org 10 (IIRC), but=

>>> I guess other packages will also have trouble with the new behavior. =20=

>=20
> So I set the latter now in a run-at-time 0.  So this could be what is happ=
ening here, and why Jens you noticed v30 vs v31 differences: slightly differ=
ent race conditions.

Sorry please disregard that.  I see your snippet does _not_ alter invisibili=
ty in the sensor function, so it cannot be due to such a race.  If indeed v3=
0 and v31 fire the cursor sensor at different locations given the same text a=
nd properties, this would obviously be problematic. =20


--Apple-Mail-CE920A5F-FD80-4D19-A93F-64A394FC3360
Content-Type: text/html;
	charset=utf-8
Content-Transfer-Encoding: quoted-printable

<html class=3D"apple-mail-supports-explicit-dark-mode"><head><meta http-equi=
v=3D"content-type" content=3D"text/html; charset=3Dutf-8"></head><body dir=3D=
"auto"><br id=3D"lineBreakAtBeginningOfSignature"><div dir=3D"ltr">--</div><=
div dir=3D"ltr"><br><blockquote type=3D"cite">On May 7, 2026, at 7:17=E2=80=AF=
AM, JD Smith &lt;jdtsmith@HIDDEN&gt; wrote:<br><br></blockquote></div><bl=
ockquote type=3D"cite"><div dir=3D"ltr">=EF=BB=BF<span></span><br><span></sp=
an><br><blockquote type=3D"cite"><span>On May 7, 2026, at 1:40=E2=80=AFAM, E=
li Zaretskii &lt;eliz@HIDDEN&gt; wrote:</span><br></blockquote><blockquote t=
ype=3D"cite"><span></span><br></blockquote><blockquote type=3D"cite"><blockq=
uote type=3D"cite"><span>Cc: Stefan Monnier &lt;monnier@HIDDEN&gt;=
,</span><br></blockquote></blockquote><blockquote type=3D"cite"><blockquote t=
ype=3D"cite"><span>"J.D. Smith" &lt;jdtsmith@HIDDEN&gt;</span><br></block=
quote></blockquote><blockquote type=3D"cite"><blockquote type=3D"cite"><span=
>Date: Thu, 07 May 2026 00:15:36 +0200</span><br></blockquote></blockquote><=
blockquote type=3D"cite"><blockquote type=3D"cite"><span>From: &nbsp;Jens Sc=
hmidt via "Bug reports for GNU Emacs,</span><br></blockquote></blockquote><b=
lockquote type=3D"cite"><blockquote type=3D"cite"><span>the Swiss army knife=
 of text editors" &lt;bug-gnu-emacs@HIDDEN&gt;</span><br></blockquote></blo=
ckquote><blockquote type=3D"cite"><blockquote type=3D"cite"><span></span><br=
></blockquote></blockquote><blockquote type=3D"cite"><blockquote type=3D"cit=
e"><span></span><br></blockquote></blockquote><blockquote type=3D"cite"><blo=
ckquote type=3D"cite"><span>This should be related to Stefan's recent change=
s in cursor-sensor.el,</span><br></blockquote></blockquote><blockquote type=3D=
"cite"><blockquote type=3D"cite"><span>and I hope this issue reaches him and=
 bug-gnu-emacs in time before the</span><br></blockquote></blockquote><block=
quote type=3D"cite"><blockquote type=3D"cite"><span>Emacs 31 cut. &nbsp;J.D.=
, have you already opened a bug w.r.t. this issue?</span><br></blockquote></=
blockquote><blockquote type=3D"cite"><blockquote type=3D"cite"><span>Then we=
 could close this one.</span><br></blockquote></blockquote><blockquote type=3D=
"cite"><blockquote type=3D"cite"><span></span><br></blockquote></blockquote>=
<blockquote type=3D"cite"><blockquote type=3D"cite"><span>Please save the sn=
ippet below as test.txt and open it in Emacs 30.2 vs</span><br></blockquote>=
</blockquote><blockquote type=3D"cite"><blockquote type=3D"cite"><span>Emacs=
 master as "emacs -Q test.txt".</span><br></blockquote></blockquote><blockqu=
ote type=3D"cite"><blockquote type=3D"cite"><span></span><br></blockquote></=
blockquote><blockquote type=3D"cite"><blockquote type=3D"cite"><span>-------=
------------------ test.txt -------------------------</span><br></blockquote=
></blockquote><blockquote type=3D"cite"><blockquote type=3D"cite"><span>Foo =3D=
bar0 bar1 bar2=3D baz.</span><br></blockquote></blockquote><blockquote type=3D=
"cite"><blockquote type=3D"cite"><span></span><br></blockquote></blockquote>=
<blockquote type=3D"cite"><blockquote type=3D"cite"><span>(defun cs-foo (&am=
p;rest args) (message "%d:%S" (point) args))</span><br></blockquote></blockq=
uote><blockquote type=3D"cite"><blockquote type=3D"cite"><span>(progn</span>=
<br></blockquote></blockquote><blockquote type=3D"cite"><blockquote type=3D"=
cite"><span> (add-text-properties 5 6 '(invisible t))</span><br></blockquote=
></blockquote><blockquote type=3D"cite"><blockquote type=3D"cite"><span> (ad=
d-text-properties 20 21 '(invisible t))</span><br></blockquote></blockquote>=
<blockquote type=3D"cite"><blockquote type=3D"cite"><span> (add-text-propert=
ies 6 20 '(cursor-sensor-functions (cs-foo)))</span><br></blockquote></block=
quote><blockquote type=3D"cite"><blockquote type=3D"cite"><span></span><br><=
/blockquote></blockquote><blockquote type=3D"cite"><blockquote type=3D"cite"=
><span> (cursor-sensor-mode)</span><br></blockquote></blockquote><blockquote=
 type=3D"cite"><blockquote type=3D"cite"><span></span><br></blockquote></blo=
ckquote><blockquote type=3D"cite"><blockquote type=3D"cite"><span> (goto-cha=
r 26))</span><br></blockquote></blockquote><blockquote type=3D"cite"><blockq=
uote type=3D"cite"><span>------------------------- test.txt ----------------=
---------</span><br></blockquote></blockquote><blockquote type=3D"cite"><blo=
ckquote type=3D"cite"><span></span><br></blockquote></blockquote><blockquote=
 type=3D"cite"><blockquote type=3D"cite"><span>Then C-x C-e both forms, the l=
atter of which should render the equal</span><br></blockquote></blockquote><=
blockquote type=3D"cite"><blockquote type=3D"cite"><span>signs invisble and l=
eave point at EOL in line 1. &nbsp;Then move backwards</span><br></blockquot=
e></blockquote><blockquote type=3D"cite"><blockquote type=3D"cite"><span>a c=
ouple of times with C-b.</span><br></blockquote></blockquote><blockquote typ=
e=3D"cite"><blockquote type=3D"cite"><span></span><br></blockquote></blockqu=
ote><blockquote type=3D"cite"><blockquote type=3D"cite"><span>In Emacs maste=
r, this results in the message</span><br></blockquote></blockquote><blockquo=
te type=3D"cite"><blockquote type=3D"cite"><span></span><br></blockquote></b=
lockquote><blockquote type=3D"cite"><blockquote type=3D"cite"><span> 20:(#&l=
t;window 3 on test.txt&gt; 21 entered)</span><br></blockquote></blockquote><=
blockquote type=3D"cite"><blockquote type=3D"cite"><span></span><br></blockq=
uote></blockquote><blockquote type=3D"cite"><blockquote type=3D"cite"><span>=
meaning that the sensor function is called first when moving point from</spa=
n><br></blockquote></blockquote><blockquote type=3D"cite"><blockquote type=3D=
"cite"><span>position 21 to 20.</span><br></blockquote></blockquote><blockqu=
ote type=3D"cite"><blockquote type=3D"cite"><span></span><br></blockquote></=
blockquote><blockquote type=3D"cite"><blockquote type=3D"cite"><span>In Emac=
s 30, the sensor function is called one position later:</span><br></blockquo=
te></blockquote><blockquote type=3D"cite"><blockquote type=3D"cite"><span></=
span><br></blockquote></blockquote><blockquote type=3D"cite"><blockquote typ=
e=3D"cite"><span> 19:(#&lt;window 3 on test.txt&gt; 20 entered)</span><br></=
blockquote></blockquote><blockquote type=3D"cite"><blockquote type=3D"cite">=
<span></span><br></blockquote></blockquote><blockquote type=3D"cite"><blockq=
uote type=3D"cite"><span>This causes trouble in J.D.'s org-inside, planned f=
or Org 10 (IIRC), but</span><br></blockquote></blockquote><blockquote type=3D=
"cite"><blockquote type=3D"cite"><span>I guess other packages will also have=
 trouble with the new behavior.</span>&nbsp;&nbsp;</blockquote></blockquote>=
<blockquote type=3D"cite"><span></span></blockquote><span></span><br><span>S=
o I set the latter now in a run-at-time 0. &nbsp;So this could be what is ha=
ppening here, and why Jens you noticed v30 vs v31 differences: slightly diff=
erent race conditions.</span><br></div></blockquote><div><br></div><div><spa=
n style=3D"-webkit-text-size-adjust: auto; font-family: Helvetica; font-size=
: 12px;">Sorry please disregard that. &nbsp;I see your snippet does _not_ al=
ter invisibility in the sensor function, so it cannot be due to such a race.=
 &nbsp;If indeed v30 and v31 fire the cursor sensor at different locations g=
iven the same text and properties, this would obviously be problematic. &nbs=
p;</span></div><br><blockquote type=3D"cite"><div dir=3D"ltr"><span></span><=
/div></blockquote></body></html>=

--Apple-Mail-CE920A5F-FD80-4D19-A93F-64A394FC3360--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#80973; Package emacs. Full text available.

Message received at 80973 <at> debbugs.gnu.org:


Received: (at 80973) by debbugs.gnu.org; 7 May 2026 11:17:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu May 07 07:17:44 2026
Received: from localhost ([127.0.0.1]:52968 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wKwjb-00036b-OO
	for submit <at> debbugs.gnu.org; Thu, 07 May 2026 07:17:44 -0400
Received: from mail-oi1-x235.google.com ([2607:f8b0:4864:20::235]:50184)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <jdtsmith@HIDDEN>)
 id 1wKwjT-000359-Di
 for 80973 <at> debbugs.gnu.org; Thu, 07 May 2026 07:17:36 -0400
Received: by mail-oi1-x235.google.com with SMTP id
 5614622812f47-479aa2dbea2so256030b6e.0
 for <80973 <at> debbugs.gnu.org>; Thu, 07 May 2026 04:17:31 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20251104; t=1778152650; x=1778757450; darn=debbugs.gnu.org;
 h=to:references:message-id:content-transfer-encoding:cc:date
 :in-reply-to:from:subject:mime-version:from:to:cc:subject:date
 :message-id:reply-to;
 bh=omz1ed6Px6110WO/MDdLzNupGzWjcRp66c33j3dDD9Q=;
 b=Pf7NLAewb7krh9saQv0uGk1sNhiLFQg/IssO64fWs6VN/FDG0Zv6c5QXCfXUFWHQUe
 DpOMPqFGA2m742abyQr+xpRDAbsw6vt36fASEw7KvcD9lo4lG0WMu99k/VtdZSNL03Wx
 XpcYxnQjhVvDk1/b9C8ZnTLVI+EbajBrUusyoX1qILc23LLQJuSrbm5eZattf6GS9+5w
 R9ZOLc/gnbJoyREsJqCNoTfBQejHCqmQ0fjv4fLwohqj989qifEkW8dKrTva+pvC6TG5
 Ku1tqkLGNPYFNSgfCrm3DWLivWYQZSAKc+/nGkofYLDNn47T6Kmwar0e6djGVQiGWV2U
 rC/A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20251104; t=1778152650; x=1778757450;
 h=to:references:message-id:content-transfer-encoding:cc:date
 :in-reply-to:from:subject:mime-version:x-gm-gg:x-gm-message-state
 :from:to:cc:subject:date:message-id:reply-to;
 bh=omz1ed6Px6110WO/MDdLzNupGzWjcRp66c33j3dDD9Q=;
 b=K/R+cGwzt6qCgFXSpLSpeeb4zQzGAsfTVPxDzicAgmeestM5U+8YF29xVxRToHxv6n
 jk2lG/Pa4CLq7Oiu7Ll5nDWkmKhn5Nkr4rI7peQhM3XUCsSHj16mBiV/Z36AGRiLTqm3
 ASoqT9f6eOs8/o3P6zriBCf3gCOwN1nfM0su+nwcwyHzfpFba5e0FcshWUO+4QF1nwfO
 UM5jsOjLV17FWIAL1BjFrBsbHuLFlmW+yx4VgKOcuWRQNj2DbYdX4y9paMq0tXWJuqub
 68Bo3aBQw59CUHIFnNPgHMBVuCdrXm+4WC94qSCkVfpmbNktxooKPQEUQeki1DITY/17
 c20w==
X-Gm-Message-State: AOJu0YwvT+7ZZ3yxotWsQ3+xiJObiNjLih7QQVAFi61znoMUqcCjRHLy
 3f7G/9fDZLX1TaLWDzRreT39PxNueKv+PtzQ+CyTwVBkOz1890RnRTjQ
X-Gm-Gg: AeBDietYXhWWjHWaGzPTaTTwpWqlYqqvAVwzjS6H1laFwIf8tqhh7HtcQk/v5tQtmQx
 ZvcaxEup1bgT0F3fXgdpo8iqRUVc2D1nR0FUuud5ERkrYDKa6x8SgLJ5yqGiY3cxY5cSJuSIjOg
 S6KX/O4BUQbCojtTOSgQfhe60xO1M8xDw/LYyxs8bPDn22ulG5yST7dbKGr3Y+3InjVLGn/t8ak
 DVdW03gOlsIkUQeqAlRt1FO/WrxApScxjS7Zv/clBA+laarjbEEg2yRTECoVnr5MzMxqESYQYXc
 DoRlwsvm7dzUZWf/SpdgXqRQ9eg0cNV306RfZdVyuur1nm/clTCdeU74/ppbs5lH9EH/y7OqKIm
 w8Spw+lCcCjS7yPcyBQhaNDQ4TpugFbRksFm+6NNKs30WU7wkJxovQexr0AmskxMj1crh6+uS52
 W/a8nJX09AfR8Xj64oIen6mlfGw6xJ5I9821z7NnilZknzB5qOGF71eiKP45jgYDEeEWRMrl28A
 A+/GPS0
X-Received: by 2002:a05:6808:308f:b0:479:ac7d:6d8a with SMTP id
 5614622812f47-4804249ea68mr5048545b6e.24.1778152650013; 
 Thu, 07 May 2026 04:17:30 -0700 (PDT)
Received: from smtpclient.apple (cm-24-53-187-185.buckeyecom.net.
 [24.53.187.185]) by smtp.gmail.com with ESMTPSA id
 5614622812f47-47c7640069csm12304985b6e.8.2026.05.07.04.17.29
 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
 Thu, 07 May 2026 04:17:29 -0700 (PDT)
Content-Type: text/plain;
	charset=utf-8
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.700.81.1.4\))
Subject: Re: bug#80973: 31.0.50; cursor-sensor-mode events fire at different
 positions compared to Emacs 30
From: JD Smith <jdtsmith@HIDDEN>
In-Reply-To: <86ik8z93qe.fsf@HIDDEN>
Date: Thu, 7 May 2026 07:17:18 -0400
Content-Transfer-Encoding: quoted-printable
Message-Id: <7E12D050-EE60-4617-BCBA-5801DF4544F7@HIDDEN>
References: <87bjesfalz.fsf@HIDDEN> <86ik8z93qe.fsf@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>, Jens Schmidt <jschmidt4gnu@HIDDEN>
X-Mailer: Apple Mail (2.3826.700.81.1.4)
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 80973
Cc: 80973 <at> debbugs.gnu.org, monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.0 (/)



> On May 7, 2026, at 1:40=E2=80=AFAM, Eli Zaretskii <eliz@HIDDEN> =
wrote:
>=20
>> Cc: Stefan Monnier <monnier@HIDDEN>,
>> "J.D. Smith" <jdtsmith@HIDDEN>
>> Date: Thu, 07 May 2026 00:15:36 +0200
>> From:  Jens Schmidt via "Bug reports for GNU Emacs,
>> the Swiss army knife of text editors" <bug-gnu-emacs@HIDDEN>
>>=20
>>=20
>> This should be related to Stefan's recent changes in =
cursor-sensor.el,
>> and I hope this issue reaches him and bug-gnu-emacs in time before =
the
>> Emacs 31 cut.  J.D., have you already opened a bug w.r.t. this issue?
>> Then we could close this one.
>>=20
>> Please save the snippet below as test.txt and open it in Emacs 30.2 =
vs
>> Emacs master as "emacs -Q test.txt".
>>=20
>> ------------------------- test.txt -------------------------
>> Foo =3Dbar0 bar1 bar2=3D baz.
>>=20
>> (defun cs-foo (&rest args) (message "%d:%S" (point) args))
>> (progn
>>  (add-text-properties 5 6 '(invisible t))
>>  (add-text-properties 20 21 '(invisible t))
>>  (add-text-properties 6 20 '(cursor-sensor-functions (cs-foo)))
>>=20
>>  (cursor-sensor-mode)
>>=20
>>  (goto-char 26))
>> ------------------------- test.txt -------------------------
>>=20
>> Then C-x C-e both forms, the latter of which should render the equal
>> signs invisble and leave point at EOL in line 1.  Then move backwards
>> a couple of times with C-b.
>>=20
>> In Emacs master, this results in the message
>>=20
>>  20:(#<window 3 on test.txt> 21 entered)
>>=20
>> meaning that the sensor function is called first when moving point =
from
>> position 21 to 20.
>>=20
>> In Emacs 30, the sensor function is called one position later:
>>=20
>>  19:(#<window 3 on test.txt> 20 entered)
>>=20
>> This causes trouble in J.D.'s org-inside, planned for Org 10 (IIRC), =
but
>> I guess other packages will also have trouble with the new behavior.
>=20
> The latest changes by Stefan to which you seem to allude just added a
> WINDOW arguments to the various APIs used by cursor-sensor-mode.  So
> how could those changes cause a behavior change wrt buffer position?
> Do you perhaps mean older changes in cursor-sensor.el?  Or what am I
> missing?

Thanks for the note.  I'm traveling and won't be able to check until =
later.  Question: do cursor-sensor functions now fire when the point is =
before OR after a character with a cursor-sensor-functions property?  In =
emacs 30 and before this occurs only when point moves before such a =
character.  If not, I think this is a likely a race between altering =
invisibility and performing point adjustment to skip invisible chars.

I have found such a race condition between setting a character =
hidden/unhidden in a cursor-sensor-functions, when using an overlay to =
"override" the invisible property. =20

So I set the latter now in a run-at-time 0.  So this could be what is =
happening here, and why Jens you noticed v30 vs v31 differences: =
slightly different race conditions.

JD





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#80973; Package emacs. Full text available.

Message received at 80973 <at> debbugs.gnu.org:


Received: (at 80973) by debbugs.gnu.org; 7 May 2026 05:40:55 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu May 07 01:40:55 2026
Received: from localhost ([127.0.0.1]:49650 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wKrTi-0002y5-UO
	for submit <at> debbugs.gnu.org; Thu, 07 May 2026 01:40:55 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:53604)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1wKrTh-0002xW-10
 for 80973 <at> debbugs.gnu.org; Thu, 07 May 2026 01:40:53 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1wKrTa-0007g1-94; Thu, 07 May 2026 01:40:46 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=zylCv9HWIMxx4dFiD9qwK3bSMoUvaV+YEqJxPSfqEcM=; b=GiLrIQT3+BKA
 lU7ndoo7VBMeQnAA4n3AGAGCGX7zLjnsMmXaYr9z33Xkfk1qUqNe9DU2VtLJGfb7SxWlkXFOljfVU
 id2r5rJ/dIW1cXiPIyFRXCUD7Kg9l4Gggx02eVeT1SPG9064JuA7fboSuWXPU+1RLge1bTZs4G0C1
 Y0+Ncj3f6CKd7hgdCJ2HCVoFVbzK7ZxLUtKfb1V4mVXCqNsMmK8SrSwUcc/IOhgFOSV3g18WuQKYY
 FAFw1UiytXQmT31cjz52KA5XxKH9hxMb2ggGMrOBaGk9gpkCqx5FRQ3dA8RSJX9YEv4D8o3Ou+8m5
 ddlVV6lFi/zZXvjKAzvjEw==;
Date: Thu, 07 May 2026 08:40:41 +0300
Message-Id: <86ik8z93qe.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Jens Schmidt <jschmidt4gnu@HIDDEN>
In-Reply-To: <87bjesfalz.fsf@HIDDEN> (bug-gnu-emacs@HIDDEN)
Subject: Re: bug#80973: 31.0.50;
 cursor-sensor-mode events fire at different positions compared to
 Emacs 30
References: <87bjesfalz.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 80973
Cc: 80973 <at> debbugs.gnu.org, monnier@HIDDEN, jdtsmith@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Cc: Stefan Monnier <monnier@HIDDEN>,
>  "J.D. Smith" <jdtsmith@HIDDEN>
> Date: Thu, 07 May 2026 00:15:36 +0200
> From:  Jens Schmidt via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs@HIDDEN>
> 
> 
> This should be related to Stefan's recent changes in cursor-sensor.el,
> and I hope this issue reaches him and bug-gnu-emacs in time before the
> Emacs 31 cut.  J.D., have you already opened a bug w.r.t. this issue?
> Then we could close this one.
> 
> Please save the snippet below as test.txt and open it in Emacs 30.2 vs
> Emacs master as "emacs -Q test.txt".
> 
> ------------------------- test.txt -------------------------
> Foo =bar0 bar1 bar2= baz.
> 
> (defun cs-foo (&rest args) (message "%d:%S" (point) args))
> (progn
>   (add-text-properties 5 6 '(invisible t))
>   (add-text-properties 20 21 '(invisible t))
>   (add-text-properties 6 20 '(cursor-sensor-functions (cs-foo)))
> 
>   (cursor-sensor-mode)
> 
>   (goto-char 26))
> ------------------------- test.txt -------------------------
> 
> Then C-x C-e both forms, the latter of which should render the equal
> signs invisble and leave point at EOL in line 1.  Then move backwards
> a couple of times with C-b.
> 
> In Emacs master, this results in the message
> 
>   20:(#<window 3 on test.txt> 21 entered)
> 
> meaning that the sensor function is called first when moving point from
> position 21 to 20.
> 
> In Emacs 30, the sensor function is called one position later:
> 
>   19:(#<window 3 on test.txt> 20 entered)
> 
> This causes trouble in J.D.'s org-inside, planned for Org 10 (IIRC), but
> I guess other packages will also have trouble with the new behavior.

The latest changes by Stefan to which you seem to allude just added a
WINDOW arguments to the various APIs used by cursor-sensor-mode.  So
how could those changes cause a behavior change wrt buffer position?
Do you perhaps mean older changes in cursor-sensor.el?  Or what am I
missing?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#80973; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 6 May 2026 22:16:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed May 06 18:16:05 2026
Received: from localhost ([127.0.0.1]:44682 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wKkXD-0000YW-LK
	for submit <at> debbugs.gnu.org; Wed, 06 May 2026 18:16:04 -0400
Received: from lists1p.gnu.org ([2001:470:142::17]:50980)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <jschmidt4gnu@HIDDEN>)
 id 1wKkX9-0000Wy-Mw
 for submit <at> debbugs.gnu.org; Wed, 06 May 2026 18:16:01 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <jschmidt4gnu@HIDDEN>)
 id 1wKkWz-00005a-V4
 for bug-gnu-emacs@HIDDEN; Wed, 06 May 2026 18:15:51 -0400
Received: from mr3.vodafonemail.de ([145.253.228.163])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <jschmidt4gnu@HIDDEN>)
 id 1wKkWv-0002pL-Si
 for bug-gnu-emacs@HIDDEN; Wed, 06 May 2026 18:15:49 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vodafonemail.de;
 s=vfde-mb-mr2-23sep; t=1778105743;
 bh=hxurIjyBP1Dc/l67ay9DyI5P/iantmNwGMOZ+NNbJVY=;
 h=From:To:Subject:Date:Message-ID:Content-Type:From;
 b=08hTc0Ixu6+/TGme6jmAdWXQ9siW4w+plb5cMUs0zuZDzM8LTWNK91f13r6xuN7IZ
 oPeUxxv2XOCNMLvxOV+6RncYQqzGYSwXBQ4xk09MXNlYPFldVe3iz3KtOwb4Udj5xg
 NQOdpsr2FAGXWwaDymHyMSwdNN843HjYH99U9D3I=
Received: from smtp.vodafone.de (unknown [10.0.0.2])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits))
 (No client certificate requested)
 by mr3.vodafonemail.de (Postfix) with ESMTPS id 4g9qTC3mTMz3sW0l
 for <bug-gnu-emacs@HIDDEN>; Wed,  6 May 2026 22:15:43 +0000 (UTC)
Received: from sappc2 (unknown [62.144.243.220])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange ECDHE (prime256v1) server-signature RSA-PSS (2048 bits)
 server-digest SHA256) (No client certificate requested)
 by smtp.vodafone.de (Postfix) with ESMTPSA id 4g9qT75NNNz99Vt;
 Wed,  6 May 2026 22:15:36 +0000 (UTC)
From: Jens Schmidt <jschmidt4gnu@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 31.0.50; cursor-sensor-mode events fire at different positions
 compared to Emacs 30
X-Debbugs-Cc: Stefan Monnier <monnier@HIDDEN>, "J.D. Smith"
 <jdtsmith@HIDDEN>
Date: Thu, 07 May 2026 00:15:36 +0200
Message-ID: <87bjesfalz.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-purgate-server: smtpa05
X-purgate-type: clean
X-purgate: clean
X-purgate-size: 19331
X-purgate-ID: 155817::1778105743-F571521E-3A6B3AB1/0/0
Received-SPF: pass client-ip=145.253.228.163;
 envelope-from=jschmidt4gnu@HIDDEN; helo=mr3.vodafonemail.de
X-Spam_score_int: -27
X-Spam_score: -2.8
X-Spam_bar: --
X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


This should be related to Stefan's recent changes in cursor-sensor.el,
and I hope this issue reaches him and bug-gnu-emacs in time before the
Emacs 31 cut.  J.D., have you already opened a bug w.r.t. this issue?
Then we could close this one.

Please save the snippet below as test.txt and open it in Emacs 30.2 vs
Emacs master as "emacs -Q test.txt".

------------------------- test.txt -------------------------
Foo =bar0 bar1 bar2= baz.

(defun cs-foo (&rest args) (message "%d:%S" (point) args))
(progn
  (add-text-properties 5 6 '(invisible t))
  (add-text-properties 20 21 '(invisible t))
  (add-text-properties 6 20 '(cursor-sensor-functions (cs-foo)))

  (cursor-sensor-mode)

  (goto-char 26))
------------------------- test.txt -------------------------

Then C-x C-e both forms, the latter of which should render the equal
signs invisble and leave point at EOL in line 1.  Then move backwards
a couple of times with C-b.

In Emacs master, this results in the message

  20:(#<window 3 on test.txt> 21 entered)

meaning that the sensor function is called first when moving point from
position 21 to 20.

In Emacs 30, the sensor function is called one position later:

  19:(#<window 3 on test.txt> 20 entered)

This causes trouble in J.D.'s org-inside, planned for Org 10 (IIRC), but
I guess other packages will also have trouble with the new behavior.

Thanks!


In GNU Emacs 31.0.50 (build 21, x86_64-pc-linux-gnu, GTK+ Version
 3.24.49, cairo version 1.18.4) of 2026-05-07 built on sappc2
Repository revision: 187efe4e312f48c93a8afd406997acd4aaf8c0db
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12401006
System Description: Debian GNU/Linux 13 (trixie)

Configured using:
 'configure -C --build x86_64-linux-gnu --sharedstatedir=/var/lib
 --localstatedir=/var/lib --with-libsystemd --with-pop=yes
 --with-sound=alsa --without-gconf --with-mailutils --with-cairo
 --with-x=yes --with-x-toolkit=gtk3 --with-toolkit-scroll-bars
 build_alias=x86_64-linux-gnu'

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
LCMS2 LIBOTF LIBSYSTEMD LIBXML2 M17N_FLT MODULES NATIVE_COMP NOTIFY
INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF
TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XDBE XIM XINERAMA XINPUT2 XPM
XRANDR GTK3 ZLIB

Important settings:
  value of $LC_COLLATE: POSIX
  value of $LC_CTYPE: en_US.UTF-8
  value of $LC_MESSAGES: en_US.UTF-8
  value of $LC_MONETARY: de_DE.UTF-8
  value of $LC_NUMERIC: POSIX
  value of $LC_TIME: POSIX
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  magit-auto-revert-mode: t
  display-time-mode: t
  delete-selection-mode: t
  show-paren-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  minibuffer-nonselected-mode: t
  minibuffer-regexp-mode: t
  line-number-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
/home/jschmidt/.emacs.d/elpa-31.0.50/transient-20260323.23/transient hides /home/jschmidt/work/emacs-master/lisp/transient
/home/jschmidt/work/org-mode/lisp/org-element-ast hides /home/jschmidt/work/emacs-master/lisp/org/org-element-ast
/home/jschmidt/work/org-mode/lisp/org-attach hides /home/jschmidt/work/emacs-master/lisp/org/org-attach
/home/jschmidt/work/org-mode/lisp/ob-scheme hides /home/jschmidt/work/emacs-master/lisp/org/ob-scheme
/home/jschmidt/work/org-mode/lisp/ob-processing hides /home/jschmidt/work/emacs-master/lisp/org/ob-processing
/home/jschmidt/work/org-mode/lisp/ob-gnuplot hides /home/jschmidt/work/emacs-master/lisp/org/ob-gnuplot
/home/jschmidt/work/org-mode/lisp/org-element hides /home/jschmidt/work/emacs-master/lisp/org/org-element
/home/jschmidt/work/org-mode/lisp/ob-org hides /home/jschmidt/work/emacs-master/lisp/org/ob-org
/home/jschmidt/work/org-mode/lisp/ob-sql hides /home/jschmidt/work/emacs-master/lisp/org/ob-sql
/home/jschmidt/work/org-mode/lisp/oc-bibtex hides /home/jschmidt/work/emacs-master/lisp/org/oc-bibtex
/home/jschmidt/work/org-mode/lisp/ox-koma-letter hides /home/jschmidt/work/emacs-master/lisp/org/ox-koma-letter
/home/jschmidt/work/org-mode/lisp/ox-icalendar hides /home/jschmidt/work/emacs-master/lisp/org/ox-icalendar
/home/jschmidt/work/org-mode/lisp/ol-gnus hides /home/jschmidt/work/emacs-master/lisp/org/ol-gnus
/home/jschmidt/work/org-mode/lisp/ob-csharp hides /home/jschmidt/work/emacs-master/lisp/org/ob-csharp
/home/jschmidt/work/org-mode/lisp/ob-sqlite hides /home/jschmidt/work/emacs-master/lisp/org/ob-sqlite
/home/jschmidt/work/org-mode/lisp/ob-clojure hides /home/jschmidt/work/emacs-master/lisp/org/ob-clojure
/home/jschmidt/work/org-mode/lisp/org-indent hides /home/jschmidt/work/emacs-master/lisp/org/org-indent
/home/jschmidt/work/org-mode/lisp/org-persist hides /home/jschmidt/work/emacs-master/lisp/org/org-persist
/home/jschmidt/work/org-mode/lisp/ol-eww hides /home/jschmidt/work/emacs-master/lisp/org/ol-eww
/home/jschmidt/work/org-mode/lisp/ol-info hides /home/jschmidt/work/emacs-master/lisp/org/ol-info
/home/jschmidt/work/org-mode/lisp/ol-rmail hides /home/jschmidt/work/emacs-master/lisp/org/ol-rmail
/home/jschmidt/work/org-mode/lisp/oc-basic hides /home/jschmidt/work/emacs-master/lisp/org/oc-basic
/home/jschmidt/work/org-mode/lisp/ob-forth hides /home/jschmidt/work/emacs-master/lisp/org/ob-forth
/home/jschmidt/work/org-mode/lisp/org-timer hides /home/jschmidt/work/emacs-master/lisp/org/org-timer
/home/jschmidt/work/org-mode/lisp/ob-makefile hides /home/jschmidt/work/emacs-master/lisp/org/ob-makefile
/home/jschmidt/work/org-mode/lisp/ob-fortran hides /home/jschmidt/work/emacs-master/lisp/org/ob-fortran
/home/jschmidt/work/org-mode/lisp/ox-html hides /home/jschmidt/work/emacs-master/lisp/org/ox-html
/home/jschmidt/work/org-mode/lisp/ob-lob hides /home/jschmidt/work/emacs-master/lisp/org/ob-lob
/home/jschmidt/work/org-mode/lisp/org-plot hides /home/jschmidt/work/emacs-master/lisp/org/org-plot
/home/jschmidt/work/org-mode/lisp/ob-js hides /home/jschmidt/work/emacs-master/lisp/org/ob-js
/home/jschmidt/work/org-mode/lisp/ob-R hides /home/jschmidt/work/emacs-master/lisp/org/ob-R
/home/jschmidt/work/org-mode/lisp/org-inlinetask hides /home/jschmidt/work/emacs-master/lisp/org/org-inlinetask
/home/jschmidt/work/org-mode/lisp/ol-mhe hides /home/jschmidt/work/emacs-master/lisp/org/ol-mhe
/home/jschmidt/work/org-mode/lisp/ob-dot hides /home/jschmidt/work/emacs-master/lisp/org/ob-dot
/home/jschmidt/work/org-mode/lisp/ol-docview hides /home/jschmidt/work/emacs-master/lisp/org/ol-docview
/home/jschmidt/work/org-mode/lisp/ob-C hides /home/jschmidt/work/emacs-master/lisp/org/ob-C
/home/jschmidt/work/org-mode/lisp/ol-man hides /home/jschmidt/work/emacs-master/lisp/org/ol-man
/home/jschmidt/work/org-mode/lisp/org-cycle hides /home/jschmidt/work/emacs-master/lisp/org/org-cycle
/home/jschmidt/work/org-mode/lisp/org-pcomplete hides /home/jschmidt/work/emacs-master/lisp/org/org-pcomplete
/home/jschmidt/work/org-mode/lisp/org-faces hides /home/jschmidt/work/emacs-master/lisp/org/org-faces
/home/jschmidt/work/org-mode/lisp/org hides /home/jschmidt/work/emacs-master/lisp/org/org
/home/jschmidt/work/org-mode/lisp/ol hides /home/jschmidt/work/emacs-master/lisp/org/ol
/home/jschmidt/work/org-mode/lisp/ob-haskell hides /home/jschmidt/work/emacs-master/lisp/org/ob-haskell
/home/jschmidt/work/org-mode/lisp/ob-lisp hides /home/jschmidt/work/emacs-master/lisp/org/ob-lisp
/home/jschmidt/work/org-mode/lisp/org-mobile hides /home/jschmidt/work/emacs-master/lisp/org/org-mobile
/home/jschmidt/work/org-mode/lisp/org-agenda hides /home/jschmidt/work/emacs-master/lisp/org/org-agenda
/home/jschmidt/work/org-mode/lisp/ob-perl hides /home/jschmidt/work/emacs-master/lisp/org/ob-perl
/home/jschmidt/work/org-mode/lisp/org-lint hides /home/jschmidt/work/emacs-master/lisp/org/org-lint
/home/jschmidt/work/org-mode/lisp/org-id hides /home/jschmidt/work/emacs-master/lisp/org/org-id
/home/jschmidt/work/org-mode/lisp/ox-man hides /home/jschmidt/work/emacs-master/lisp/org/ox-man
/home/jschmidt/work/org-mode/lisp/ol-bbdb hides /home/jschmidt/work/emacs-master/lisp/org/ol-bbdb
/home/jschmidt/work/org-mode/lisp/ob-lilypond hides /home/jschmidt/work/emacs-master/lisp/org/ob-lilypond
/home/jschmidt/work/org-mode/lisp/org-archive hides /home/jschmidt/work/emacs-master/lisp/org/org-archive
/home/jschmidt/work/org-mode/lisp/ox-publish hides /home/jschmidt/work/emacs-master/lisp/org/ox-publish
/home/jschmidt/work/org-mode/lisp/ob-core hides /home/jschmidt/work/emacs-master/lisp/org/ob-core
/home/jschmidt/work/org-mode/lisp/ob-groovy hides /home/jschmidt/work/emacs-master/lisp/org/ob-groovy
/home/jschmidt/work/org-mode/lisp/ox-org hides /home/jschmidt/work/emacs-master/lisp/org/ox-org
/home/jschmidt/work/org-mode/lisp/org-entities hides /home/jschmidt/work/emacs-master/lisp/org/org-entities
/home/jschmidt/work/org-mode/lisp/org-goto hides /home/jschmidt/work/emacs-master/lisp/org/org-goto
/home/jschmidt/work/org-mode/lisp/ob-awk hides /home/jschmidt/work/emacs-master/lisp/org/ob-awk
/home/jschmidt/work/org-mode/lisp/ol-eshell hides /home/jschmidt/work/emacs-master/lisp/org/ol-eshell
/home/jschmidt/work/org-mode/lisp/org-num hides /home/jschmidt/work/emacs-master/lisp/org/org-num
/home/jschmidt/work/org-mode/lisp/oc-csl hides /home/jschmidt/work/emacs-master/lisp/org/oc-csl
/home/jschmidt/work/org-mode/lisp/org-capture hides /home/jschmidt/work/emacs-master/lisp/org/org-capture
/home/jschmidt/work/org-mode/lisp/ob-ref hides /home/jschmidt/work/emacs-master/lisp/org/ob-ref
/home/jschmidt/work/org-mode/lisp/org-list hides /home/jschmidt/work/emacs-master/lisp/org/org-list
/home/jschmidt/work/org-mode/lisp/org-macro hides /home/jschmidt/work/emacs-master/lisp/org/org-macro
/home/jschmidt/work/org-mode/lisp/org-clock hides /home/jschmidt/work/emacs-master/lisp/org/org-clock
/home/jschmidt/work/org-mode/lisp/ob-table hides /home/jschmidt/work/emacs-master/lisp/org/ob-table
/home/jschmidt/work/org-mode/lisp/org-datetree hides /home/jschmidt/work/emacs-master/lisp/org/org-datetree
/home/jschmidt/work/org-mode/lisp/org-mouse hides /home/jschmidt/work/emacs-master/lisp/org/org-mouse
/home/jschmidt/work/org-mode/lisp/ob-latex hides /home/jschmidt/work/emacs-master/lisp/org/ob-latex
/home/jschmidt/work/org-mode/lisp/org-keys hides /home/jschmidt/work/emacs-master/lisp/org/org-keys
/home/jschmidt/work/org-mode/lisp/org-compat hides /home/jschmidt/work/emacs-master/lisp/org/org-compat
/home/jschmidt/work/org-mode/lisp/org-habit hides /home/jschmidt/work/emacs-master/lisp/org/org-habit
/home/jschmidt/work/org-mode/lisp/org-tempo hides /home/jschmidt/work/emacs-master/lisp/org/org-tempo
/home/jschmidt/work/org-mode/lisp/org-refile hides /home/jschmidt/work/emacs-master/lisp/org/org-refile
/home/jschmidt/work/org-mode/lisp/ob-ruby hides /home/jschmidt/work/emacs-master/lisp/org/ob-ruby
/home/jschmidt/work/org-mode/lisp/org-attach-git hides /home/jschmidt/work/emacs-master/lisp/org/org-attach-git
/home/jschmidt/work/org-mode/lisp/org-loaddefs hides /home/jschmidt/work/emacs-master/lisp/org/org-loaddefs
/home/jschmidt/work/org-mode/lisp/org-duration hides /home/jschmidt/work/emacs-master/lisp/org/org-duration
/home/jschmidt/work/org-mode/lisp/ob-ocaml hides /home/jschmidt/work/emacs-master/lisp/org/ob-ocaml
/home/jschmidt/work/org-mode/lisp/org-fold hides /home/jschmidt/work/emacs-master/lisp/org/org-fold
/home/jschmidt/work/org-mode/lisp/ox-ascii hides /home/jschmidt/work/emacs-master/lisp/org/ox-ascii
/home/jschmidt/work/org-mode/lisp/ob-css hides /home/jschmidt/work/emacs-master/lisp/org/ob-css
/home/jschmidt/work/org-mode/lisp/ob-tangle hides /home/jschmidt/work/emacs-master/lisp/org/ob-tangle
/home/jschmidt/work/org-mode/lisp/ob-python hides /home/jschmidt/work/emacs-master/lisp/org/ob-python
/home/jschmidt/work/org-mode/lisp/org-crypt hides /home/jschmidt/work/emacs-master/lisp/org/org-crypt
/home/jschmidt/work/org-mode/lisp/ol-bibtex hides /home/jschmidt/work/emacs-master/lisp/org/ol-bibtex
/home/jschmidt/work/org-mode/lisp/oc-biblatex hides /home/jschmidt/work/emacs-master/lisp/org/oc-biblatex
/home/jschmidt/work/org-mode/lisp/org-protocol hides /home/jschmidt/work/emacs-master/lisp/org/org-protocol
/home/jschmidt/work/org-mode/lisp/org-feed hides /home/jschmidt/work/emacs-master/lisp/org/org-feed
/home/jschmidt/work/org-mode/lisp/ob-maxima hides /home/jschmidt/work/emacs-master/lisp/org/ob-maxima
/home/jschmidt/work/org-mode/lisp/org-colview hides /home/jschmidt/work/emacs-master/lisp/org/org-colview
/home/jschmidt/work/org-mode/lisp/ol-w3m hides /home/jschmidt/work/emacs-master/lisp/org/ol-w3m
/home/jschmidt/work/org-mode/lisp/ob-ditaa hides /home/jschmidt/work/emacs-master/lisp/org/ob-ditaa
/home/jschmidt/work/org-mode/lisp/ob-plantuml hides /home/jschmidt/work/emacs-master/lisp/org/ob-plantuml
/home/jschmidt/work/org-mode/lisp/org-src hides /home/jschmidt/work/emacs-master/lisp/org/org-src
/home/jschmidt/work/org-mode/lisp/ob-sed hides /home/jschmidt/work/emacs-master/lisp/org/ob-sed
/home/jschmidt/work/org-mode/lisp/ox-latex hides /home/jschmidt/work/emacs-master/lisp/org/ox-latex
/home/jschmidt/work/org-mode/lisp/ob-exp hides /home/jschmidt/work/emacs-master/lisp/org/ob-exp
/home/jschmidt/work/org-mode/lisp/ob-lua hides /home/jschmidt/work/emacs-master/lisp/org/ob-lua
/home/jschmidt/work/org-mode/lisp/ox hides /home/jschmidt/work/emacs-master/lisp/org/ox
/home/jschmidt/work/org-mode/lisp/org-footnote hides /home/jschmidt/work/emacs-master/lisp/org/org-footnote
/home/jschmidt/work/org-mode/lisp/ol-doi hides /home/jschmidt/work/emacs-master/lisp/org/ol-doi
/home/jschmidt/work/org-mode/lisp/ob-emacs-lisp hides /home/jschmidt/work/emacs-master/lisp/org/ob-emacs-lisp
/home/jschmidt/work/org-mode/lisp/ox-odt hides /home/jschmidt/work/emacs-master/lisp/org/ox-odt
/home/jschmidt/work/org-mode/lisp/ob-eval hides /home/jschmidt/work/emacs-master/lisp/org/ob-eval
/home/jschmidt/work/org-mode/lisp/ob-matlab hides /home/jschmidt/work/emacs-master/lisp/org/ob-matlab
/home/jschmidt/work/org-mode/lisp/ob-sass hides /home/jschmidt/work/emacs-master/lisp/org/ob-sass
/home/jschmidt/work/org-mode/lisp/ob-java hides /home/jschmidt/work/emacs-master/lisp/org/ob-java
/home/jschmidt/work/org-mode/lisp/ob-julia hides /home/jschmidt/work/emacs-master/lisp/org/ob-julia
/home/jschmidt/work/org-mode/lisp/org-version hides /home/jschmidt/work/emacs-master/lisp/org/org-version
/home/jschmidt/work/org-mode/lisp/ob-calc hides /home/jschmidt/work/emacs-master/lisp/org/ob-calc
/home/jschmidt/work/org-mode/lisp/org-table hides /home/jschmidt/work/emacs-master/lisp/org/org-table
/home/jschmidt/work/org-mode/lisp/ol-irc hides /home/jschmidt/work/emacs-master/lisp/org/ol-irc
/home/jschmidt/work/org-mode/lisp/ob-eshell hides /home/jschmidt/work/emacs-master/lisp/org/ob-eshell
/home/jschmidt/work/org-mode/lisp/org-fold-core hides /home/jschmidt/work/emacs-master/lisp/org/org-fold-core
/home/jschmidt/work/org-mode/lisp/org-macs hides /home/jschmidt/work/emacs-master/lisp/org/org-macs
/home/jschmidt/work/org-mode/lisp/ob-comint hides /home/jschmidt/work/emacs-master/lisp/org/ob-comint
/home/jschmidt/work/org-mode/lisp/ox-texinfo hides /home/jschmidt/work/emacs-master/lisp/org/ox-texinfo
/home/jschmidt/work/org-mode/lisp/oc-natbib hides /home/jschmidt/work/emacs-master/lisp/org/oc-natbib
/home/jschmidt/work/org-mode/lisp/ob-screen hides /home/jschmidt/work/emacs-master/lisp/org/ob-screen
/home/jschmidt/work/org-mode/lisp/ox-beamer hides /home/jschmidt/work/emacs-master/lisp/org/ox-beamer
/home/jschmidt/work/org-mode/lisp/ob-octave hides /home/jschmidt/work/emacs-master/lisp/org/ob-octave
/home/jschmidt/work/org-mode/lisp/ob hides /home/jschmidt/work/emacs-master/lisp/org/ob
/home/jschmidt/work/org-mode/lisp/ob-shell hides /home/jschmidt/work/emacs-master/lisp/org/ob-shell
/home/jschmidt/work/org-mode/lisp/ox-md hides /home/jschmidt/work/emacs-master/lisp/org/ox-md
/home/jschmidt/work/org-mode/lisp/oc hides /home/jschmidt/work/emacs-master/lisp/org/oc
/home/jschmidt/work/org-mode/lisp/org-ctags hides /home/jschmidt/work/emacs-master/lisp/org/org-ctags

Features:
(shadow sort mail-extr emacsbug lisp-mnt message yank-media puny dired
dired-loaddefs rfc822 mml mml-sec epa derived epg rfc6068 epg-config
gnus-util time-date mm-decode mm-bodies mm-encode mailabbrev gmm-utils
mailheader sendmail mail-parse rfc2231 rfc2047 rfc2045 ietf-drums
mm-util mail-prsvr mail-utils comp-run comp-common rx magit-autorevert
autorevert filenotify time delsel cus-start cus-load vc-git diff-mode
track-changes easy-mmode vc-dispatcher bug-reference go-mode find-file
ffap thingatpt etags fileloop generator xref project compile
text-property-search comint ansi-osc ansi-color ring files-x
bc-dot-emacs warnings loadhist help-fns radix-tree help-mode bytecomp
byte-compile patch find-func csv-mode-autoloads debbugs-autoloads
git-modes-autoloads gnu-elpa-keyring-update-autoloads
gnuplot-mode-autoloads go-mode-autoloads goto-last-change-autoloads
graphql-mode-autoloads htmlize-autoloads magit-autoloads pcase
magit-section-autoloads llama-autoloads markdown-mode-autoloads
org-appear-autoloads polymode-autoloads simple-httpd-autoloads
smart-tabs-mode-autoloads transient-autoloads cond-let-autoloads
with-editor-autoloads yaml-mode-autoloads package browse-url xdg url
url-proxy url-privacy url-expand url-methods url-history url-cookie
generate-lisp-file url-domsuf url-util mailcap url-handlers url-parse
auth-source cl-seq eieio eieio-core cl-macs gv icons password-cache json
subr-x mule-util map url-vars cl-loaddefs cl-lib package-activate rmc
iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook
vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win
term/common-win x-dnd touch-screen tool-bar dnd fontset image regexp-opt
fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode
register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select
scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors
frame minibuffer nadvice seq simple cl-generic indonesian philippine
cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese composite emoji-zwj charscript
charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure
cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp
files window text-properties overlay sha1 md5 base64 format env
code-pages mule custom widget keymap hashtable-print-readable backquote
threads dbusbind inotify lcms2 dynamic-setting system-font-setting
font-render-setting cairo gtk x-toolkit xinput2 x multi-tty move-toolbar
make-network-process tty-child-frames native-compile emacs)

Memory information:
((conses 16 164017 12889) (symbols 48 30672 0)
 (strings 32 114082 2757) (string-bytes 1 2981377)
 (vectors 16 25991) (vector-slots 8 369115 5957) (floats 8 55 34)
 (intervals 56 395 0) (buffers 1064 12))




Acknowledgement sent to Jens Schmidt <jschmidt4gnu@HIDDEN>:
New bug report received and forwarded. Copy sent to monnier@HIDDEN, jdtsmith@HIDDEN, bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to monnier@HIDDEN, jdtsmith@HIDDEN, bug-gnu-emacs@HIDDEN:
bug#80973; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sat, 23 May 2026 11:15:01 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.