From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#62238: 30.0.50; Unusual interpretation of "S-expressions" in c-ts-mode Date: Mon, 20 Mar 2023 20:13:00 +0200 Organization: LINKOV.NET Message-ID: <86lejrtifn.fsf@mail.linkov.net> References: <87ilezg0wo.fsf@posteo.net> <7FDC4392-AC34-4EA2-A166-AB10755361CD@gmail.com> <83jzzeb2v6.fsf@gnu.org> <83fsa2as1a.fsf@gnu.org> <86edplupr9.fsf@mail.linkov.net> <834jqga9md.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28542"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) Cc: 62238@debbugs.gnu.org, casouri@gmail.com, theo@thornhill.no, philipk@posteo.net, mardani29@yahoo.es To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Mar 20 19:22:29 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 1peK9N-0007Du-2d for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 20 Mar 2023 19:22:29 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1peK8y-0006Du-OJ; Mon, 20 Mar 2023 14:22:04 -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 1peK8w-0006DB-Qf for bug-gnu-emacs@gnu.org; Mon, 20 Mar 2023 14:22:02 -0400 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 1peK8w-0004Mz-E0 for bug-gnu-emacs@gnu.org; Mon, 20 Mar 2023 14:22:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1peK8w-0007WD-9N for bug-gnu-emacs@gnu.org; Mon, 20 Mar 2023 14:22:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 20 Mar 2023 18:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62238 X-GNU-PR-Package: emacs Original-Received: via spool by 62238-submit@debbugs.gnu.org id=B62238.167933647128842 (code B ref 62238); Mon, 20 Mar 2023 18:22:02 +0000 Original-Received: (at 62238) by debbugs.gnu.org; 20 Mar 2023 18:21:11 +0000 Original-Received: from localhost ([127.0.0.1]:56766 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1peK87-0007V7-7w for submit@debbugs.gnu.org; Mon, 20 Mar 2023 14:21:11 -0400 Original-Received: from relay6-d.mail.gandi.net ([217.70.183.198]:33225) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1peK85-0007Ui-9M for 62238@debbugs.gnu.org; Mon, 20 Mar 2023 14:21:09 -0400 Original-Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id E4B2BC0007; Mon, 20 Mar 2023 18:21:00 +0000 (UTC) In-Reply-To: <834jqga9md.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 19 Mar 2023 20:17:46 +0200") 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:258307 Archived-At: >> After trying to tweak treesit-sexp-type-regexp a few times >> I become convinced it is not up to the task of properly handling >> all sexp operations. It seems the existing functions that >> implement C-M-f (forward-sexp), C-M-u (backward-up-list), etc. >> should remain in place, and the role of the tree-sitter would be >> only to provide syntax information for them, i.e. just to replace >> syntax tables with tree-sitter wrappers. > > It would be good if you could tell more about what you tried and what > you saw, and how you reached this quite radical conclusion. Maybe you > are right, but without knowing the details, how can we possibly > discuss it and try to reach a common conclusion? Up front, the > conclusion sounds almost incredible: after all, how can a compiler > recognize blocks and defuns if not by parsing the program source? If > the compiler does it, why cannot we do the same using the parsing > products? Ideally, the existing syntax tables should still be used, and tree-sitter could provide an additional support for "implicit parens" as mentioned in bug#62086. "Implicit parens" are such constructs that are not defined by syntax tables, but perceived as invisible parens. > So please consider making the discussion more useful by telling more. > (Perhaps on emacs-devel, not here.) I could provide more feedback when someone will start a discussion on emacs-devel.