GNU bug report logs - #72116
30.0.60; Filling c-ts-mode documentation is broken

Previous Next

Package: emacs;

Reported by: Damien Cassou <damien <at> cassou.me>

Date: Sun, 14 Jul 2024 18:24:02 UTC

Severity: normal

Found in version 30.0.60

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

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 72116 in the body.
You can then email your comments to 72116 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#72116; Package emacs. (Sun, 14 Jul 2024 18:24:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Damien Cassou <damien <at> cassou.me>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 14 Jul 2024 18:24:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Damien Cassou <damien <at> cassou.me>
To: bug-gnu-emacs <at> gnu.org
Subject: 30.0.60; Filling c-ts-mode documentation is broken
Date: Sun, 14 Jul 2024 20:23:09 +0200
[Message part 1 (text/plain, inline)]
Filling documentation in a c-ts-mode buffer doesn't insert the " * "
prefix. It works fine in c-mode. How to reproduce:

1. Install the C treesitter grammar
2. Start emacs with "emacs -Q"
3. Open the attached file in a new buffer
4. Run M-x c-ts-mode
5. Move point to the middle of line 2
6. Press M-q

Expected: 2 lines of documentation, each one starting with " * "

Actual: 2 lines of documentation, only the first one starting
with " * "

If you remove step 4 from the above instructions, c-mode will do the
work just fine.

The solution to this bug could help solve bug#71760.

-- 
Damien Cassou

"Success is the ability to go from one failure to another without
losing enthusiasm." --Winston Churchill
[foo.c (text/plain, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#72116; Package emacs. (Sun, 14 Jul 2024 18:45:02 GMT) Full text and rfc822 format available.

Message #8 received at 72116 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Damien Cassou <damien <at> cassou.me>, Yuan Fu <casouri <at> gmail.com>
Cc: 72116 <at> debbugs.gnu.org
Subject: Re: bug#72116: 30.0.60; Filling c-ts-mode documentation is broken
Date: Sun, 14 Jul 2024 21:44:32 +0300
> From: Damien Cassou <damien <at> cassou.me>
> Date: Sun, 14 Jul 2024 20:23:09 +0200
> 
> Filling documentation in a c-ts-mode buffer doesn't insert the " * "
> prefix. It works fine in c-mode. How to reproduce:
> 
> 1. Install the C treesitter grammar
> 2. Start emacs with "emacs -Q"
> 3. Open the attached file in a new buffer
> 4. Run M-x c-ts-mode
> 5. Move point to the middle of line 2
> 6. Press M-q

You can work around this by enabling auto-fill-mode.  Then typing SPC
at the end of the long line will produce the effect you want.

Yuan, can you please look into this?

> If you remove step 4 from the above instructions, c-mode will do the
> work just fine.

In c-mode, M-q is bound to a c-mode specific function, which makes no
sens in c-ts-mode.  We need a ts-specific solution (and we already
seem to have it, it just isn't working in this case for some reason).




Reply sent to Yuan Fu <casouri <at> gmail.com>:
You have taken responsibility. (Wed, 17 Jul 2024 04:20:01 GMT) Full text and rfc822 format available.

Notification sent to Damien Cassou <damien <at> cassou.me>:
bug acknowledged by developer. (Wed, 17 Jul 2024 04:20:01 GMT) Full text and rfc822 format available.

Message #13 received at 72116-done <at> debbugs.gnu.org (full text, mbox):

From: Yuan Fu <casouri <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Damien Cassou <damien <at> cassou.me>, 72116-done <at> debbugs.gnu.org
Subject: Re: bug#72116: 30.0.60; Filling c-ts-mode documentation is broken
Date: Tue, 16 Jul 2024 21:18:27 -0700

> On Jul 14, 2024, at 11:44 AM, Eli Zaretskii <eliz <at> gnu.org> wrote:
> 
>> From: Damien Cassou <damien <at> cassou.me>
>> Date: Sun, 14 Jul 2024 20:23:09 +0200
>> 
>> Filling documentation in a c-ts-mode buffer doesn't insert the " * "
>> prefix. It works fine in c-mode. How to reproduce:
>> 
>> 1. Install the C treesitter grammar
>> 2. Start emacs with "emacs -Q"
>> 3. Open the attached file in a new buffer
>> 4. Run M-x c-ts-mode
>> 5. Move point to the middle of line 2
>> 6. Press M-q
> 
> You can work around this by enabling auto-fill-mode.  Then typing SPC
> at the end of the long line will produce the effect you want.
> 
> Yuan, can you please look into this?

Fixed and pushed to master. I didn’t push this to emacs-30 since adaptive-filling is a fragile being, so let’s wait and see :-)

> 
>> If you remove step 4 from the above instructions, c-mode will do the
>> work just fine.
> 
> In c-mode, M-q is bound to a c-mode specific function, which makes no
> sens in c-ts-mode.  We need a ts-specific solution (and we already
> seem to have it, it just isn't working in this case for some reason).

In c-ts-mode, M-q jumps a few hops, but it eventually calls c-ts-mode’s filling function (c-ts-common--fill-paragraph).

Yuan



bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 14 Aug 2024 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 64 days ago.

Previous Next


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