Subject: Re: bug#76679: 31.0.50; forward-sentence not working in the narrowed buffer under c-ts-mode

From: Eli Zaretskii <[email-masked]>
Date: Sun, 09 Mar 2025 11:57:29 +0200

> From: lorniu <[email-masked]>
> Date: Sun, 02 Mar 2025 15:44:48 +0800
> 
> 
> The code `(forward-thing 'sentence)' is not working in narrowed region
> under c-ts-mode.
> 
> For example, open file `test.c`, then turn on `c-ts-mode', what in the
> buffer is:
> 
>     int main () { return 0; }
>   
> Now select word `return' and execute `narrow-to-region', then in buffer:
> 
>     Ireturn
> 
> where `I' represent the cursor. Now execute:
> 
>     (forward-thing 'sentence)
> 
> Then you will find that the cursor is stay still, not moving to the
> end. This behavior is not like the ones anywhere else, I think it's a bug.

I'm not sure the notion of a "sentence" is well defined in C-like
languages.

Yuan and Juri, any comments or suggestions?