GNU bug report logs - #66711
treesit-default-defun-skipper moves to bol if there is any whitespace

Previous Next

Package: emacs;

Reported by: Dominik Honnef <dominik <at> honnef.co>

Date: Mon, 23 Oct 2023 18:43:04 UTC

Severity: normal

Done: Yuan Fu <casouri <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Yuan Fu <casouri <at> gmail.com>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#66711: closed (treesit-default-defun-skipper moves to bol if
 there is any whitespace)
Date: Mon, 11 Dec 2023 01:46:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Sun, 10 Dec 2023 17:45:18 -0800
with message-id <b5a5ed82-0cca-4fb5-8b59-dee7546b47c9 <at> gmail.com>
and subject line Re: bug#66711: treesit-default-defun-skipper moves to bol if there is any whitespace
has caused the debbugs.gnu.org bug report #66711,
regarding treesit-default-defun-skipper moves to bol if there is any whitespace
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
66711: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=66711
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Dominik Honnef <dominik <at> honnef.co>
To: bug-gnu-emacs <at> gnu.org
Subject: treesit-default-defun-skipper moves to bol if there is any whitespace
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.


[Message part 3 (message/rfc822, inline)]
From: Yuan Fu <casouri <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 66711-done <at> debbugs.gnu.org, dominik <at> honnef.co
Subject: Re: bug#66711: treesit-default-defun-skipper moves to bol if there is
 any whitespace
Date: Sun, 10 Dec 2023 17:45:18 -0800

On 11/18/23 12:36 AM, Eli Zaretskii wrote:
> Ping!  Yuan, any comments?
>
>> Cc: 66711 <at> debbugs.gnu.org
>> Date: Sun, 29 Oct 2023 13:53:27 +0200
>> From: Eli Zaretskii <eliz <at> gnu.org>
>>
>>> From: Dominik Honnef <dominik <at> honnef.co>
>>> 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


This bug report was last modified 1 year and 167 days ago.

Previous Next


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