From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuan Fu Newsgroups: gmane.emacs.devel Subject: Re: Average-user-facing interface for tree-sitter Date: Wed, 19 Oct 2022 17:28:47 -0700 Message-ID: <7E474686-A204-493C-A168-48EE4856DC8A@gmail.com> References: <3A7E7CD1-74A7-4352-9DFE-FC982EAA398E@gmail.com> <87ilko9r9e.fsf@gnus.org> <9794E2EF-4DB5-4A04-90F0-3EB51E6BE008@gmail.com> <87977C2D-844B-4F4E-BEA4-8BCBFC8AE354@gmail.com> <6A0F847F-910D-449B-B461-466493CC9847@gmail.com> <87sfjmg69q.fsf@gnus.org> <21B2ADDF-70BC-46D4-98D6-41C5D0EF7D40@gmail.com> <87edv4l6iw.fsf@thornhill.no> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) 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="25646"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Stefan Monnier , Lars Ingebrigtsen , emacs-devel To: Theodor Thornhill Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Oct 20 02:29:47 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 1olJRT-0006T2-Fw for ged-emacs-devel@m.gmane-mx.org; Thu, 20 Oct 2022 02:29:47 +0200 Original-Received: from localhost ([::1]:40146 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1olJRS-0006WP-4W for ged-emacs-devel@m.gmane-mx.org; Wed, 19 Oct 2022 20:29:46 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35096) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1olJQc-0005Oh-1a for emacs-devel@gnu.org; Wed, 19 Oct 2022 20:28:54 -0400 Original-Received: from mail-pf1-x42f.google.com ([2607:f8b0:4864:20::42f]:46025) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1olJQa-0008I6-GE for emacs-devel@gnu.org; Wed, 19 Oct 2022 20:28:53 -0400 Original-Received: by mail-pf1-x42f.google.com with SMTP id 67so18748498pfz.12 for ; Wed, 19 Oct 2022 17:28:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=QSENmhZmbqHDZgUoPll2CGqdM9qwwN90/C2d49SxwRM=; b=H6kIkG1tYnrmamjk3w1FCP1kaDc3EFhg7ScQ5HP3czXykcRwf53QKzWS3KXls5C2OX 4kNvN1f6efzcKV46ibtg2FlUJmLUPctmbnBJjJSlZiUTdCFEfqj21MHIrIIfuJOZAERs Ivx75u/u82TCNyZp1BPBkHfkLAtg/7zYJm6eeIQ6o8Ns5DH14Nr8AdaUUtE1d1noJ8/0 5KJehbLiKGc3lwNGoDwtcQ/kYYPZhKDWgD+B5xSNbQivhTAME0O62yBM2I1wid8VvQHZ LUTUMu5qCbXJfIHFyUwCwwM2u25gNiuHw7GaPIc+5agvy7M7cSYk4xtCo+IanM5nFYdO fNxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=QSENmhZmbqHDZgUoPll2CGqdM9qwwN90/C2d49SxwRM=; b=OL+/JRYH/hTzLMuXCRYcngja5zKXKV+O03iomx8V3PvS3sfyenLvvyVT0hWuXgmcBp gWrSUATvBY+/td02wLlTMQu8BAjLEGFwF8H3SnrZCQXjWnNHYyGI230caBSfCVdq51/v Jv1mog7unWXxrQEOHGFjRhh1i9da0DJmhR6inSQwLEc03hVMNYa3KN7YmiK03G/Xi6CJ S29gAWhwDHcMGrAYCaXBo+0lTowB+lqk3PY0sI7iRMjlkBnClhZDLi540vYLnnuV5PeL 4yJaJDlat3ECDt+/G/QWQQyzw2pQ6fuwYlr1m3SnW+jGwTrTx1I0ifTSwHRw0+8/8k+T nRGA== X-Gm-Message-State: ACrzQf1LYS8e1DRaFq1BlJiAurFH2hghP0x65ufMeRfpxPleWzbacxvE MmTeEJhMZNGRCfxQfjZcJPo= X-Google-Smtp-Source: AMsMyM7miAU5Uaa0BhMMrlwjpvo/3OwIAwXcle1bfqvv+AjKAlEjidEhYeOn8+/ImQynpCQukD7BZA== X-Received: by 2002:a05:6a00:4c84:b0:562:ed08:599a with SMTP id eb4-20020a056a004c8400b00562ed08599amr11371826pfb.64.1666225729076; Wed, 19 Oct 2022 17:28:49 -0700 (PDT) Original-Received: from smtpclient.apple (cpe-172-117-161-177.socal.res.rr.com. [172.117.161.177]) by smtp.gmail.com with ESMTPSA id y1-20020a170902ed4100b00177e5d83d3dsm11260464plb.170.2022.10.19.17.28.48 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 19 Oct 2022 17:28:48 -0700 (PDT) In-Reply-To: <87edv4l6iw.fsf@thornhill.no> X-Mailer: Apple Mail (2.3696.120.41.1.1) Received-SPF: pass client-ip=2607:f8b0:4864:20::42f; envelope-from=casouri@gmail.com; helo=mail-pf1-x42f.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_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:298131 Archived-At: > On Oct 18, 2022, at 10:35 PM, Theodor Thornhill = wrote: >=20 > Hi Yuan! >=20 > Yuan Fu writes: >>>>=20 >>>> And remove treesit-remapped-major-mode-alist? >>>=20 >>> That's I'd do, yes. >>>=20 >>> It's much easier to add features later (if they prove to satisfy >>> a common need) than to remove unused features. >>>=20 >>> BTW, I see that `global-treesit-mode--turn-on` is currently a (non >>> official) alias of `treesit-mode`, but I think it should only call >>> `treesit-mode` in those buffers where there is some indication that = the >>> major mode provides some treesit-mode support (e.g., currently that >>> could be if `major-mode-backend-function` is set). >>=20 >> I=E2=80=99m changing it to what you described in another email. (So = major-mode-backend-function is goner). I can use = treesit-font-lock-settings as the minimum criterion. >>=20 >=20 > It seems we've had some regressions _after_ > 851a8f65e9a6b00b51f6a41f4c8f2ec2a797862b, I presume with the major = mode > toggles, so font-locking has ceased to work properly. One thing I see > is that the "warn" isn't a symbol in the new toggle mechanism, so it > errors out. But even after that has been fixed it still doesn't work. >=20 > Why would we want to init the whole js-mode if we already know that we > don't want to use it? Yes, sorry, I made some further changes to js-mode. Could you have a = look and see if it makes sense? Thanks, Yuan