From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Make all tree-sitter modes optional Date: Tue, 17 Jan 2023 19:02:44 +0200 Message-ID: <83mt6h2ix7.fsf@gnu.org> References: <84973.1672843723@hassadar.pretzelnet.org> <83wn62xi3k.fsf@gnu.org> <83o7rexe2n.fsf@gnu.org> <83h6x5xym7.fsf@gnu.org> <83h6wr6gmz.fsf@gnu.org> <831qnu64la.fsf@gnu.org> <83o7qy4l2v.fsf@gnu.org> <55d39dcb-de2f-fe02-e069-f1dd1e50e59b@yandex.ru> <83edru4jaj.fsf@gnu.org> <83sfg92ryn.fsf@gnu.org> <83pmbd2oy6.fsf@gnu.org> <0380a032-bca0-4225-6f9d-853de49f100f@yandex.ru> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33366"; mail-complaints-to="usenet@ciao.gmane.io" Cc: casouri@gmail.com, monnier@iro.umontreal.ca, larsi@gnus.org, theo@thornhill.no, jostein@secure.kjonigsen.net, emacs-devel@gnu.org To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Jan 17 18:04:13 2023 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 1pHpNc-0008Sa-1U for ged-emacs-devel@m.gmane-mx.org; Tue, 17 Jan 2023 18:04:12 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pHpM7-0002is-6Z; Tue, 17 Jan 2023 12:02:39 -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 1pHpM4-0002af-MJ for emacs-devel@gnu.org; Tue, 17 Jan 2023 12:02:36 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pHpM3-0003QY-6Y; Tue, 17 Jan 2023 12:02:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=L8khKtCOLnvBfDaNlGBxmroraTmjcXtz9DvJOIizDSA=; b=Zw0ia1uFxDVO 5rNS9jfLMYNOyxHRTmre92M3F5ZCIdfd+wsNlBFAgfnqdLvMi68poDdfMWDuQltm2U20xok4V6c1I umawc4jB8bxBRTGH+jeNAnT8sPjDscJTB77HRub4WmfyZPE5JN5CVqQ0osTg+hYqO0gw6Y5YZoMJw c980eTlSVm7UiyT9JNBPkZsvBM1T8UdUOn6h54HUKj5IqttgxjF1iqjA34Hi+vYW9sQNTXdhmSvaG vph+9cUzBPrvTOgHrvSMpvLg7cOEqjM9E9iVwLOow0ux94FY4lLZ7+V9xU108XOM7o54UIESLc7DC 5ONQFkBSsNfT4uXokLmmqg==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pHpM2-0004wu-L9; Tue, 17 Jan 2023 12:02:34 -0500 In-Reply-To: <0380a032-bca0-4225-6f9d-853de49f100f@yandex.ru> (message from Dmitry Gutov on Tue, 17 Jan 2023 17:22:05 +0200) 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:302481 Archived-At: > Date: Tue, 17 Jan 2023 17:22:05 +0200 > Cc: casouri@gmail.com, monnier@iro.umontreal.ca, larsi@gnus.org, > theo@thornhill.no, jostein@secure.kjonigsen.net, emacs-devel@gnu.org > From: Dmitry Gutov > > > I'm frankly surprised that this is not what you do in your testing. I > > was quite sure that everyone who does any serious development or > > maintenance work in Emacs does something like that. How else is it > > possible to, e.g., load some obscure package someone says is necessary > > for reproducing a problem? > > > > So in your case, when I'm done with testing whatever I need to test in > > ruby-ts-mode, I ether shut down that session, or start another one in > > parallel if I need to compare it with, say, ruby-mode. > > That's untenable. > > Running a benchmark is evaluating a form like > > (benchmark-run 1000 (progn (font-lock-mode -1) (font-lock-mode 1) > (font-lock-ensure))) > > I can start a new session for an investigation, but I'm not going to > restart Emacs every time I evaluate a form. Why not? It's easy and quick and solves all the problems you mentioned (and then some). Like I said: I'm using this myself all the time. > Doing the benchmarks in a different order (e.g. go through the files > with one mode and then restart and go with another) is also only an > option if I were to note the numbers on e.g. a piece of paper. I rarely > do that; that would also slow me down compared to the current practice. No need for paper: just M-w the data and yank into your production session (which stays up and running all the time). Again, I'm doing this all the time in my work on Emacs. > And also speaking of using 'emacs -Q', that's well-suited to testing > some classes of bugs, and not so much for others. You can start from "emacs -Q" and load whatever is needed. You can make an ad-hoc init file that loads everything you need automatically, to save manual typing. I'm doing this all the time when the setup is complicated. > >> (require 'ruby-ts-mode) > >> (add-to-list 'auto-mode-alist <...huge regexp from ruby-mode.el...>) > >> > >> ...and then update it over the years if new entries are added there over > >> the years -- by the way, having a separate regexp in ruby-ts-mode.el is > >> an unfortunate duplication. > > > > If this is about the difference between the regexps, we can fix that, > > I don't object to have both modes handle the same files. > > A common constant would help, with that particular aspect. Consider it done.