From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jostein =?UTF-8?Q?Kj=C3=B8nigsen?= Newsgroups: gmane.emacs.bugs Subject: bug#72489: 29.4.50; forward-comment not working as expected in toml-ts-mode Date: Thu, 15 Aug 2024 12:10:46 +0200 Message-ID: <52D8946D-CABF-413B-977E-F5FD96586509@secure.kjonigsen.net> References: <86cymlq38q.fsf@gnu.org> <2BD4ADA2-2D9D-4D63-B08F-668EDF22193F@secure.kjonigsen.net> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.500.171.1.1\)) Content-Type: multipart/alternative; boundary="Apple-Mail=_41A633E4-62C8-43B0-AD1A-6F4EAA81156B" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36278"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , "Mr. Jostein =?UTF-8?Q?Kj=C3=B8nigsen?=" , 72489@debbugs.gnu.org To: Yang Yingchao Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Aug 15 12:11:48 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1seXSN-0009F4-2M for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 15 Aug 2024 12:11:48 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1seXS5-00007O-F6; Thu, 15 Aug 2024 06:11:29 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1seXS3-00006y-Lp for bug-gnu-emacs@gnu.org; Thu, 15 Aug 2024 06:11:27 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1seXS3-0003RU-Cc for bug-gnu-emacs@gnu.org; Thu, 15 Aug 2024 06:11:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=References:In-Reply-To:Date:Mime-Version:From:To:Subject; bh=jRrwCS9GTSOxManI90RMYVpyGVCZKgyx7jlKDK4ikNI=; b=nNT6DCzfGM3M26yPC0SLEjXOaYL+cU9BMu//jUbhI+u9/c1MvCN+vTxhY5BKl8lUCw0RDisdFHlkHSIknTs4FU0lw9+/PRdddNG06Kl2wRr+hHVf76fZgnmsMzCE2cVZ1ghTnLGfAjpFqHgsRSEKGVPldD9CTq+mtxKDC47Pq6zpAxrq1DTW6csF+jtMyWEyk0hUErzocL+2oe2yhLLAnjiDQNrmuUtY+y4yLTOEclrid+gSTC3VzCa4OKLvaZB9iDorQqnWZ7hMBtsRZTLjwshOmTFecj8aI93nQmiwCF9XwJJWpbuNzYXR7IbwMJmnprRgY8BcC9mZS45IjiyHGg==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1seXSc-0008WM-AM for bug-gnu-emacs@gnu.org; Thu, 15 Aug 2024 06:12:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jostein =?UTF-8?Q?Kj=C3=B8nigsen?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 15 Aug 2024 10:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72489 X-GNU-PR-Package: emacs Original-Received: via spool by 72489-submit@debbugs.gnu.org id=B72489.172371670432711 (code B ref 72489); Thu, 15 Aug 2024 10:12:02 +0000 Original-Received: (at 72489) by debbugs.gnu.org; 15 Aug 2024 10:11:44 +0000 Original-Received: from localhost ([127.0.0.1]:48381 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1seXSJ-0008VU-QC for submit@debbugs.gnu.org; Thu, 15 Aug 2024 06:11:44 -0400 Original-Received: from fhigh4-smtp.messagingengine.com ([103.168.172.155]:57739) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1seXSG-0008VD-MU for 72489@debbugs.gnu.org; Thu, 15 Aug 2024 06:11:41 -0400 Original-Received: from phl-compute-01.internal (phl-compute-01.nyi.internal [10.202.2.41]) by mailfhigh.nyi.internal (Postfix) with ESMTP id 802A61151CBD; Thu, 15 Aug 2024 06:10:59 -0400 (EDT) Original-Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-01.internal (MEProxy); Thu, 15 Aug 2024 06:10:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= secure.kjonigsen.net; h=cc:cc:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1723716659; x=1723803059; bh=jRrwCS9GTSOxManI90RMYVpyGVCZKgyx7jlKDK4ikNI=; b= LF9wpwtlSydzd0oSGZB+x9Qkk9+YB5UY5B+bH4EYuCMuYayGlw/7RBkE8hgXgHEH 7695nJfACTyo2OsfBb8CsHD3N3sKrWYSTGNjW2PZrbLW9QzF2KoxnuHL1ShCOy2e UihpmXkw05QSs9SmimR7D4sQajSw/pFvvq6QR/QQJcyhZZxfeH71oshoOk+We9xR kII4+Nnbw81axPw+qRYUoYN8EHpey7w+FC0JBkp7M7o5amEYnzRiQRCqyYHFSsP1 oemwETU/HJmpkOIlvDDAd2FlhuBz7Vy5pTgdT7+FPfZHLy/q1MNnKEoAHjBE6Zm0 G2Mz1exOZwpg2greV/VQIA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; t=1723716659; x=1723803059; bh=jRrwCS9GTSOxManI90RMYVpyGVCZ Kgyx7jlKDK4ikNI=; b=fpLJWy5NRUkG5qeNNI9VspFe9W9QLpFfKf24XewGxMsw FwYjqbMXDN5p/C18A1sD8ojLlrGEWYs6OOjrzG4upgZ4VhUW1vgx5jPjgndqaM/h dgEakpeKfXKDI+8+drbwudfdUyNp1AndBbypuJ8f5lJmafxpkAq/v5a2j+Z0Vs0C R3hk9klXVcfR70Z2x0f5rbKKPKmvUc7WP5Z4NiH9kbOmRMhdI8xA5CAGabL+WDmE oVCLKkKqcF30pEvYAcw3B8gFgFgJLSTsigV9GT1o3Lrn0x3dltK0pOGmFbCJfj8l LkGIm/N1Vp/djQ3+RCj1JdfRF8Ifa/AEputfd3IRLQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddruddtiedgvdefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhephffktgggufffjgevvfhfofesrgdtmherhhdtvden ucfhrhhomheplfhoshhtvghinhcumfhjpphnihhgshgvnhcuoehjohhsthgvihhnsehsvg gtuhhrvgdrkhhjohhnihhgshgvnhdrnhgvtheqnecuggftrfgrthhtvghrnhepueeuteef ffeigfdtffdvjeduuedtveetleeutdeifeeludegvdeugfeugfefjeeknecuffhomhgrih hnpehgihhthhhusgdrtghomhenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhep mhgrihhlfhhrohhmpehjohhsthgvihhnsehsvggtuhhrvgdrkhhjohhnihhgshgvnhdrnh gvthdpnhgspghrtghpthhtohepgedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohep higrnhhgrdihihhnghgthhgrohesqhhqrdgtohhmpdhrtghpthhtohepvghlihiisehgnh hurdhorhhgpdhrtghpthhtohepjhhoshhtvghinheskhhjohhnihhgshgvnhdrnhgvthdp rhgtphhtthhopeejvd X-ME-Proxy: Feedback-ID: ib2f84088:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 15 Aug 2024 06:10:58 -0400 (EDT) In-Reply-To: X-Mailer: Apple Mail (2.3774.500.171.1.1) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:290177 Archived-At: --Apple-Mail=_41A633E4-62C8-43B0-AD1A-6F4EAA81156B Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On 7 Aug 2024, at 03:02, Yang Yingchao wrote: >=20 > 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. >=20 >> Yang: Have you loaded/compiled/provided the toml typescript-grammar = before using this mode? >>=20 >> The *-ts-modes depends on external grammar in order to properly = initialize the major-mode and provide correct highlighting and = indentation. >=20 > 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. >=20 > Regards, >=20 > -- *Yang Yingchao* I've recompiled from scratch and confirm this indeed fixes all issues = mentioned. Eli: Feel free to apply the supplied patch. I still don't have commit = access :) = https://github.com/emacs-mirror/emacs/blob/e993e479c324bb720bca3f1cf194e55= e32f01ccd/lisp/textmodes/toml-ts-mode.el#L53 > ``` > - (modify-syntax-entry ?\n "> b" table) > + (modify-syntax-entry ?\n ">" table) > ``` --Apple-Mail=_41A633E4-62C8-43B0-AD1A-6F4EAA81156B Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii
On 7 Aug = 2024, at 03:02, Yang Yingchao <yang.yingchao@qq.com> = wrote:

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*

I've recompiled = from scratch and confirm this indeed fixes all issues = mentioned.

Eli: Feel free to apply the supplied = patch. I still don't have commit access :)

```
- =    (modify-syntax-entry ?\n "> b" =  table)
+ =    (modify-syntax-entry ?\n ">" =  table)
```

= --Apple-Mail=_41A633E4-62C8-43B0-AD1A-6F4EAA81156B--