From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Payas Relekar Newsgroups: gmane.emacs.devel Subject: Re: Call for volunteers: add tree-sitter support to major modes Date: Wed, 12 Oct 2022 12:48:44 +0530 Message-ID: <87tu497bf5.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10651"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.8.10; emacs 29.0.50 To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Oct 12 09:36:55 2022 Return-path: Envelope-to: ged-emacs-devel@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 1oiWIR-0002Xb-FF for ged-emacs-devel@m.gmane-mx.org; Wed, 12 Oct 2022 09:36:55 +0200 Original-Received: from localhost ([::1]:45980 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oiWIP-0006yx-Tc for ged-emacs-devel@m.gmane-mx.org; Wed, 12 Oct 2022 03:36:53 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56842) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oiW5a-0007Sk-RB for emacs-devel@gnu.org; Wed, 12 Oct 2022 03:23:38 -0400 Original-Received: from mail-pl1-x636.google.com ([2607:f8b0:4864:20::636]:35835) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oiW5U-000229-UC for emacs-devel@gnu.org; Wed, 12 Oct 2022 03:23:38 -0400 Original-Received: by mail-pl1-x636.google.com with SMTP id h10so15484671plb.2 for ; Wed, 12 Oct 2022 00:23:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:date:subject:to:from:user-agent:from:to:cc :subject:date:message-id:reply-to; bh=Rhu79u5rWVMT4IFutsaUlYM9fukhwMpvIJnDQW0GTcQ=; b=jNERhCmIkgmZG0P0DV7kP9huiiRiAmEh4AH+eiqEV+8cmnPESNsH0dfDmWJmQqYuP1 XRy1QLHDcpjNa4Ib1jfZT5h+5bx8jkKAJ5LytKk5T8C3+BnnizHMO45k9YA51WupRUyd HBkuNJTA3x0lnmmIuKINGCqwyciNgJZ+zPIeljoVXvX2MxfKx85N3P/W7BEgC7xMk6jm 5xlc2+9YLoA+J4nbNAi+NZPZ7Le5ont+nJj85JzfvvH1+TOlKWgxmFpgQv8st55UKXPo QSUwg3CXNcYCPApJEXMWWpvJmmDFxehIl4QFU9s495n4KuWRGhJAkb+xoIDmih2tfteO VeEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:subject:to:from:user-agent :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Rhu79u5rWVMT4IFutsaUlYM9fukhwMpvIJnDQW0GTcQ=; b=uXBXD+UpOfizYDJGTMmoXcSOdLpe/JV/KrDsgayIAJob6GlUlspIsGyiQu9tBgfcW2 s3WHN3NasrxzW4Dm4qb3f6K1xmifoVK+wxsJpUGSOXXOroZQscIjlskSx9rXWQr8MkrB PiJSmLuWAhjdQNExPptLse6A8uNCVS8TzDxloKbGpfrokSvGlmCy/nOcR/Y/SwK3I1jU NiD2ZR8IQ3WLJD/1oTHaL7sBvmLeqXzC0OGcrbmsXYbIsAFrt9TV0XnLM7bj8TLtsm59 0RWCbpEhjAtvbPhqpHdHpVqhfN9GzR2qmoCp6zJ+qKSKrjUiHQ7ocz0NMkSElIcFgmXZ Akpg== X-Gm-Message-State: ACrzQf3ZtwxP2oB5mDJf4WLtG0MMB02gkLny3+2BcAQcCcV/1vsykxGp j2zvxPppF7i5t8aqqYT10lHcBhD7f0s= X-Google-Smtp-Source: AMsMyM4+a17Y08NVUm/Cmp4iL/AgUDSQEYEFtqjYet1QomiMXiDunzf7TtU8PRMk1otMSylXnPvo+w== X-Received: by 2002:a17:90b:4d8b:b0:20a:e256:fdd8 with SMTP id oj11-20020a17090b4d8b00b0020ae256fdd8mr3562511pjb.4.1665559410720; Wed, 12 Oct 2022 00:23:30 -0700 (PDT) Original-Received: from localhost ([150.107.26.19]) by smtp.gmail.com with ESMTPSA id f13-20020a170902f38d00b00172fc5b0764sm9714961ple.270.2022.10.12.00.23.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Oct 2022 00:23:30 -0700 (PDT) Received-SPF: pass client-ip=2607:f8b0:4864:20::636; envelope-from=relekarpayas@gmail.com; helo=mail-pl1-x636.google.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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, T_SPF_HELO_TEMPERROR=0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Wed, 12 Oct 2022 03:32:35 -0400 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:297584 Archived-At: Po Lu writes: > Lars Ingebrigtsen writes: > >> Yes, more of an Emacs 30 thing, so 2024-ish. >> >> That is, during the next year, I'm guessing that we'll be gaining >> tree-sitter support for all the major programming languages, and when >> that is better than what we already have, we should consider making >> tree-sitter a prerequisite for Emacs (and these modes) and rapidly phase >> out the old code. > > I and many others will _very_ strongly object to removing the build > without tree-sitter. Emacs has never needed a non-system library to > edit text, and that should not start now. > > On X, we even support the build without XCB, as even though it has been > ubitous for decades, it is not specified in any document and cannot be > implemented by third parties. Unlike Xlib, which is part of the > specifications for release 6 of the X Window System, version 11, > published by the X Consortium. > >> It's also a question of how much user breakage we'll tolerate/aim for. >> That is, there's a gazillion tuning knobs all over the modes to tweak >> stuff that will be rendered obsolete by tree-sitter, and which people >> may be fond of. > > It will certainly break a lot. Last I heard tree-sitter itself has > problems with complex macro constructs in C and C++ code. > > CC Mode has less, because it is too dumb to try to parse them. Currently, the 'dumb' implementation is default and tree-sitter based one needs to be setup and enabled by the user (however easy it may be). If the tree-sitter is in core, and the old 'dumb' way is no longer in core, can the current way be done the other way around? i.e. disable tree-sitter from core for cc-mode and add current cc-mode as extra package and use that the way currently external tree-sitter mode is used? This way even if tree-sitter is build-time dependency, it won't affect runtime. C++ is notoriously difficult to parse for something like tree-sitter due to context sensitiveness of operators, and I understand your pain. But for languages with better syntax and semantics, it has been immense improvement in performance and usefulness over the 'dumb' regex parsing. --