Subject: bug#66711: closed (Re: bug#66711: treesit-default-defun-skipper moves to bol if there is any whitespace)

From: [email-masked] (GNU bug Tracking System)
Date: Mon, 11 Dec 2023 01:46:02 +0000

Your bug report

#66711: treesit-default-defun-skipper moves to bol if there is any whitespace

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
66711: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=66711
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#66711: treesit-default-defun-skipper moves to bol if there is any whitespace
From: Yuan Fu <[email-masked]>
To: Eli Zaretskii <[email-masked]>
Cc: [email-masked], [email-masked]
Date: Sun, 10 Dec 2023 17:45:18 -0800
List-Id: <debbugs-submit.debbugs.gnu.org>

On 11/18/23 12:36 AM, Eli Zaretskii wrote:
> Ping!  Yuan, any comments?
>
>> Cc: [email-masked]
>> Date: Sun, 29 Oct 2023 13:53:27 +0200
>> From: Eli Zaretskii <[email-masked]>
>>
>>> From: Dominik Honnef <[email-masked]>
>>> Date: Mon, 23 Oct 2023 19:41:24 +0200
>>>
>>> treesit-default-defun-skipper has the following bit of code:
>>>
>>>      ;; Moving backward, but there are some whitespace (and only
>>>      ;; whitespace) between point and BOL: go back to BOL.
>>>      ((looking-back (rx (+ (or " " "\t")))
>>>                     (line-beginning-position))
>>>       (beginning-of-line))))
>>>
>>> However, as written, the regexp matches if there is any whitespace
>>> before point, not if there is only whitespace.
>> Yuan, any comments?

Thanks, Dominik and Eli. I applied a patch that should fix the regexp.

Yuan

Subject: treesit-default-defun-skipper moves to bol if there is any whitespace
From: Dominik Honnef <[email-masked]>
To: [email-masked]
Date: Mon, 23 Oct 2023 19:41:24 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

treesit-default-defun-skipper has the following bit of code:

    ;; Moving backward, but there are some whitespace (and only
    ;; whitespace) between point and BOL: go back to BOL.
    ((looking-back (rx (+ (or " " "\t")))
                   (line-beginning-position))
     (beginning-of-line))))

However, as written, the regexp matches if there is any whitespace
before point, not if there is only whitespace.