unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#66711: treesit-default-defun-skipper moves to bol if there is any whitespace
@ 2023-10-23 17:41 Dominik Honnef
  2023-10-29 11:53 ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Dominik Honnef @ 2023-10-23 17:41 UTC (permalink / raw)
  To: 66711

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.





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#66711: treesit-default-defun-skipper moves to bol if there is any whitespace
  2023-10-23 17:41 bug#66711: treesit-default-defun-skipper moves to bol if there is any whitespace Dominik Honnef
@ 2023-10-29 11:53 ` Eli Zaretskii
  2023-11-18  8:36   ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2023-10-29 11:53 UTC (permalink / raw)
  To: Dominik Honnef, Yuan Fu; +Cc: 66711

> From: Dominik Honnef <dominik@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?





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#66711: treesit-default-defun-skipper moves to bol if there is any whitespace
  2023-10-29 11:53 ` Eli Zaretskii
@ 2023-11-18  8:36   ` Eli Zaretskii
  2023-12-11  1:45     ` Yuan Fu
  0 siblings, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2023-11-18  8:36 UTC (permalink / raw)
  To: casouri; +Cc: 66711, dominik

Ping!  Yuan, any comments?

> Cc: 66711@debbugs.gnu.org
> Date: Sun, 29 Oct 2023 13:53:27 +0200
> From: Eli Zaretskii <eliz@gnu.org>
> 
> > From: Dominik Honnef <dominik@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?
> 
> 
> 
> 





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#66711: treesit-default-defun-skipper moves to bol if there is any whitespace
  2023-11-18  8:36   ` Eli Zaretskii
@ 2023-12-11  1:45     ` Yuan Fu
  0 siblings, 0 replies; 4+ messages in thread
From: Yuan Fu @ 2023-12-11  1:45 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 66711-done, dominik



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





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-12-11  1:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-23 17:41 bug#66711: treesit-default-defun-skipper moves to bol if there is any whitespace Dominik Honnef
2023-10-29 11:53 ` Eli Zaretskii
2023-11-18  8:36   ` Eli Zaretskii
2023-12-11  1:45     ` Yuan Fu

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).