From: Yang Yingchao via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: "Jostein Kjønigsen" <jostein@secure.kjonigsen.net>
Cc: "Eli Zaretskii" <eliz@gnu.org>,
"Mr. Jostein Kjønigsen" <jostein@kjonigsen.net>,
72489@debbugs.gnu.org
Subject: bug#72489: 29.4.50; forward-comment not working as expected in toml-ts-mode
Date: Wed, 07 Aug 2024 09:02:31 +0800 [thread overview]
Message-ID: <tencent_D6A1E1E7A494E9511E7F0B19A600F1B65606@qq.com> (raw)
In-Reply-To: <2BD4ADA2-2D9D-4D63-B08F-668EDF22193F@secure.kjonigsen.net> ("Jostein Kjønigsen"'s message of "Tue, 6 Aug 2024 15:06:03 +0200")
[-- Attachment #1: Type: text/plain, Size: 1434 bytes --]
> Just to be clear I understand the issue and how to reproduce it:
>
> 1. you create an empty buffer and activate toml-ts-mode
> 2. you paste in the supplied text, which is all comments according to TOML syntax
> 3. first line is actually a commented out emacs-lisp command.
> 4. you use (eval-last-sexp) to invoke the command emacs-lisp (forward-comment 1)
>
> And once you do that, the expected outcome would be to jump to next comment-line (ie each commented line is considered its own comment-block)?
>
> I ask, because if I do that, I get an *error* about reaching the end of file, so it seems like
> whatever I'm doing I'm getting slightly different results than you are. Applying the suggested fix
> does not seem to change behaviour either?
I think the error in your case also proves the misbehavior of forward-comment, and it breaks `uncomment-region' in my case. And with the suggested fix applied, and then recompile/evaluate, `uncomment-region' works as expected.
> Yang: Have you loaded/compiled/provided the toml typescript-grammar before using this mode?
>
> The *-ts-modes depends on external grammar in order to properly initialize the major-mode and provide correct highlighting and indentation.
I only have the required shared libraries (libtree-sitter.so & libtree-sitter-toml.so) installed. This should be enough, right? At least `treesit-explore-mode' works fine in toml buffer.
Regards,
-- *Yang Yingchao*
next prev parent reply other threads:[~2024-08-07 1:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-06 5:57 bug#72489: 29.4.50; forward-comment not working as expected in toml-ts-mode Yang Yingchao via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-08-06 11:50 ` Eli Zaretskii
2024-08-06 13:06 ` Jostein Kjønigsen
2024-08-07 1:02 ` Yang Yingchao via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2024-08-15 10:10 ` Jostein Kjønigsen
2024-08-17 9:31 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tencent_D6A1E1E7A494E9511E7F0B19A600F1B65606@qq.com \
--to=bug-gnu-emacs@gnu.org \
--cc=72489@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=jostein@kjonigsen.net \
--cc=jostein@secure.kjonigsen.net \
--cc=yang.yingchao@qq.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).