From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Theodor Thornhill via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#60983: 29.0.60; Tree-sitter user-level control Date: Thu, 26 Jan 2023 07:25:37 +0100 Message-ID: <2591E7A2-261F-462C-B865-D46B00C5DF7C@thornhill.no> References: <83tu0kkuqo.fsf@gnu.org> <87tu0k3y6t.fsf@thornhill.no> <83mt6ckqts.fsf@gnu.org> <87zgacgiwe.fsf@thornhill.no> <834jshhvjh.fsf@gnu.org> <806A8560-A675-423F-9CFC-67D50D14E304@thornhill.no> <833580ipdo.fsf@gnu.org> <87lelq8jay.fsf@thornhill.no> <83bkmlg74u.fsf@gnu.org> Reply-To: Theodor Thornhill Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="948"; mail-complaints-to="usenet@ciao.gmane.io" Cc: casouri@gmail.com, 60983@debbugs.gnu.org, monnier@iro.umontreal.ca To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jan 26 07:26:25 2023 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 1pKviK-000Ad8-VR for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 26 Jan 2023 07:26:25 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pKvi0-0005LT-8k; Thu, 26 Jan 2023 01:26:04 -0500 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 1pKvhy-0005LL-TM for bug-gnu-emacs@gnu.org; Thu, 26 Jan 2023 01:26:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pKvhy-0006uf-Kt for bug-gnu-emacs@gnu.org; Thu, 26 Jan 2023 01:26:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pKvhy-0003K3-7C for bug-gnu-emacs@gnu.org; Thu, 26 Jan 2023 01:26:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Theodor Thornhill Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 26 Jan 2023 06:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60983 X-GNU-PR-Package: emacs X-Debbugs-Original-Cc: casouri@gmail.com, bug-gnu-emacs@gnu.org, monnier@iro.umontreal.ca Original-Received: via spool by submit@debbugs.gnu.org id=B.167471435712759 (code B ref -1); Thu, 26 Jan 2023 06:26:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 26 Jan 2023 06:25:57 +0000 Original-Received: from localhost ([127.0.0.1]:60403 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pKvhp-0003Jc-Gz for submit@debbugs.gnu.org; Thu, 26 Jan 2023 01:25:57 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:44630) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pKvhl-0003JQ-Go for submit@debbugs.gnu.org; Thu, 26 Jan 2023 01:25:51 -0500 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 1pKvhl-0005Kh-Aa for bug-gnu-emacs@gnu.org; Thu, 26 Jan 2023 01:25:49 -0500 Original-Received: from out-117.mta0.migadu.com ([2001:41d0:1004:224b::75]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pKvhj-0006qQ-4k for bug-gnu-emacs@gnu.org; Thu, 26 Jan 2023 01:25:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thornhill.no; s=key1; t=1674714342; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ou5jrDbjHF2w8ztCkAW3xNoiqs4L+mX6x1qmXL/AtD0=; b=yIuircoriDYqr3xqtzsK1omGThLPnSSqpH6YSvwrRgSh8hop1E3Dn/VTup9i7bat2RvjiD rVWTPzVeliWjYbKRcCki3V2pbcbg4eRdJuUuyea+fYCwrBXq+PMmd9/W/jE7/sQuick4aP 52lSBaYGRmCHpysp60Blj8l2Z6WOVjTXmOkCoDJ3V2OVPg9p10AL5L+SYtC2QaV4H8bmJO hCiTCYqod4D04xupCx1gzXsRenek+9O9kVBx985EkNJ6erY//GAB11I7UEQwo0N8dlbiKY U3U0ZjU1m3omNts7bYBIFOM/bOlHl457qKEt+Qj2gOZGGT/BomJSJACWkncBJw== X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. In-Reply-To: <83bkmlg74u.fsf@gnu.org> X-Migadu-Flow: FLOW_OUT Received-SPF: pass client-ip=2001:41d0:1004:224b::75; envelope-from=theo@thornhill.no; helo=out-117.mta0.migadu.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:254169 Archived-At: On 26 January 2023 07:08:33 CET, Eli Zaretskii wrote: >> From: Theodor Thornhill >> Cc: casouri@gmail=2Ecom, bug-gnu-emacs@gnu=2Eorg >> Date: Wed, 25 Jan 2023 21:12:53 +0100 >>=20 >> > Adding Stefan in case he has some advice=2E >>=20 >> Ok, I added a patch below=2E >>=20 >>=20 >> try: >>=20 >> 1=2E open some c buffer and make some edits, for example >> ``` >> void >> main() >> { >> if (x) >> { >> } >> } >> ``` >>=20 >> This should be the expected output when using the gnu style=2E >>=20 >> 2=2E M-x c-ts-mode-set-style "bsd" RET >>=20 >> 3=2E C-h o c-ts-mode-indent-style RET >> Observe variable has changed, but indenting the code does not=2E >>=20 >> 4 C-h o treesit-simple-indent-rules RET >> Observe variable keeps old value >>=20 >> 5=2E C-x x g >>=20 >> Now the bsd style takes effect, and the treesit-simple-indent-rules >> variable has changed=2E >>=20 >> I'm sure the fix is easy, but I don't see it=2E I purposely kept the >> functions simple until I know what approach is best:) > >Thanks, I'll wait until you adapt the changes to Stefan's comments, >and try the new code then=2E If that doesn't fix the above problem, ask >the question again at that time=2E Yeah, thanks both :) Theo