From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu Newsgroups: gmane.emacs.devel Subject: Re: Make all tree-sitter modes optional Date: Fri, 17 Feb 2023 21:37:59 +0800 Message-ID: <87y1owl8eg.fsf@yahoo.com> References: <83h6x5xym7.fsf@gnu.org> <83h6wr6gmz.fsf@gnu.org> <868ri140sr.fsf@mail.linkov.net> <83fsc92gbz.fsf@gnu.org> <83cz6ccagy.fsf@gnu.org> <838rgzaqmj.fsf@gnu.org> <83pmaaaicy.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="9382"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , juri@linkov.net, casouri@gmail.com, monnier@iro.umontreal.ca, larsi@gnus.org, theo@thornhill.no, jostein@secure.kjonigsen.net, emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Feb 17 14:41:27 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 1pT0zP-0002EJ-2t for ged-emacs-devel@m.gmane-mx.org; Fri, 17 Feb 2023 14:41:27 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pT0yZ-00050T-Qf; Fri, 17 Feb 2023 08:40:35 -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 1pT0yX-00050H-QJ for emacs-devel@gnu.org; Fri, 17 Feb 2023 08:40:33 -0500 Original-Received: from sonic311-50.consmr.mail.ne1.yahoo.com ([66.163.188.231]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pT0yS-0000dZ-Cl for emacs-devel@gnu.org; Fri, 17 Feb 2023 08:40:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1676641224; bh=zWNfaxYWhgqjRRqzk64p4mtgIacRUk7xMFFUJsoHKfQ=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=UXt1kTBwHHLWf3Ko0EAXsgahWAA3MR/UsGUIPqU6Q5i8TSv2PXSFy/f5z9YG5pnCxZ46x5eTVMPqRZephYVNHE3+137kveRLQ66k4oygt9Yjxz/BftXfC7RTZMZDKVAVQj36h3aRX4tN0uOu0B2w1dhvAnNAnBckaOuXV/F1/z3WPUpXo5phEymBHQyaBMlXjVmAjM84Nnuja/jVRrq4wOsDb0ITfFDL4fOBRD9/qaQU6TBt0RRYO0GvYz70dvM9k2jnavexXkAUZD2YqJ0hIxummeoSQ/ULa6lsprWXOQscbDFH6ZZ8N2UMpyaAaQeb7daeOqEC+zjC3BIKGP+2Gw== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1676641224; bh=mnS8etp23S7hHxYDpJ5a6sEkHoRZEnimVkdgN5cDJ3Z=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=WaD1pVexT7o6aQyFheZ7dGgylNdcWtt4K7COq15yXnW3AyU4IekLEjQ9VAFM1K2ydKq4FhTUQTCIrnkKes6lh9RttGdT4tOVZW5c8LgGko2Y2UH3R0N9c5immJxaiWDZ77I3LdTJb1Kl+4uFzY8336Q6glZLB0uoG8N0AXC9lq7UoOexVDzb8VnOc6RItLnfzqYE8n34Pgu0wIcAl4pvUJu4IV/z7RNG9KHyYVGOKCYVKPebvsRCuaaWEMHZdcLxSs4ln9q2EblKhbb1XFd3EW+dv421G4MQNgDtc9Xp57YtBQFGLQ+DPmcBMZd4e95K2Q57wQtXvRZTB2ya+pAsoQ== X-YMail-OSG: RuKadBMVM1mK8lTksJpvGQ6sWFM17gO0.6KP5haQbDzgDoT9daKRJsuh0QX2yZg 8nlmP3KPA0JOKLkB0Sw.RZCUsmfAQPxHfQA7ppUkGdOngYjA94HdHElZlR4KQ9ogZCwpf4L7iv0F VpdYzGClvklzInuIRf7W1O6qatRwU2WXs2UTjaesJlnIQ.kdAtVqhcXFZJ8agqHUNVgm3sPbhxXA SPLuNgWuWQ4ovbPrKSPZUoy20rzkXQY7w_nMk_f5W39PS93CUYk45cHoAFJFyEkGq70N3tUJWVDS 18_HNfj1wHzgvSpWykfRb9Ot.zF3TQQZotbcSRCNYNXLnLc2_oEXzCX7jim7qnWyVKMAYCmm2j3Y vIpct8N_bgeUc4JtqdlwPBOcxQ21AgTV8haYg.pxBgPnn10gMHMN060OTQ7ab93PUWHmHG3jqZTG gg5xW51khn0HX6597pCZTzqppuwLwnbPzYVErMYBEmbBYThgIgnOzBooi0uFsmWXXY2cmspqjSE3 WFQwvIdJ_FK722hNXcXNWmGiy1ifzCxA1Vecn.8T6WKO0fOK.jP4uV7IeR1IMmwFYHYmojHi5WmT SkZBXIat2aCmK.pOYNP4vrPKV_8MzJgC8Nc24pF.B4kB2T2pWpA5RSWdH6XhiEb3cMUgvnpZp0mx VzRov3.fIpJITmICSedSn.w9TmISOg3NUcoXeqe0GTFJ5qTZbM2L_DgXE1IW2J72lBiSk_EBgH.U wI4OctUbD733KxyaQ2qAM03leTznlnXaYrD7SptKbtK5ohBtlr3uNdGwjmQFlnubOaVva2dqqGWr 42xIWMKzryynKHYYL3lix4Yez9Sw4d5arsV9Xtkj5I X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic311.consmr.mail.ne1.yahoo.com with HTTP; Fri, 17 Feb 2023 13:40:24 +0000 Original-Received: by hermes--production-sg3-9fc5746c8-ltdwf (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID ad75e8d1b400a4dece522544d1dca6bd; Fri, 17 Feb 2023 13:38:22 +0000 (UTC) In-Reply-To: (Alan Mackenzie's message of "Fri, 17 Feb 2023 13:30:58 +0000") X-Mailer: WebService/1.1.21183 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Received-SPF: pass client-ip=66.163.188.231; envelope-from=luangruo@yahoo.com; helo=sonic311-50.consmr.mail.ne1.yahoo.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=unavailable 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:303480 Archived-At: Alan Mackenzie writes: > Hello, Eli. > > On Wed, Feb 15, 2023 at 20:33:49 +0200, Eli Zaretskii wrote: >> > Date: Wed, 15 Feb 2023 17:57:15 +0000 >> > Cc: juri@linkov.net, casouri@gmail.com, monnier@iro.umontreal.ca, >> > larsi@gnus.org, theo@thornhill.no, jostein@secure.kjonigsen.net, >> > emacs-devel@gnu.org >> > From: Alan Mackenzie > > [ .... ] > >> This [severe inconvenience to users who wish to stop using a new >> feature] can happen with any new feature. There's nothing we can do about >> this, .... > > There is; we're competent hackers. > >> .... so please just stop worrying about it. > > I continue to be unhappy about the state of this change. If we are going > to insist on users restarting Emacs simply to remove three entries from > auto-mode-alist, we should at least ensure that such restarting will > work. In the current NEWS, the directions are incomplete and misleading. > > I propose the following to correct this; it adds text to what is > currently there rather than replacing it, as you requested a couple of > days ago: > > diff --git a/etc/NEWS b/etc/NEWS > index 2d15e39036a..dbe6517e78f 100644 > --- a/etc/NEWS > +++ b/etc/NEWS > @@ -3239,10 +3239,13 @@ for which a "built-in" mode would be turned on. For example: > > (add-to-list 'major-mode-remap-alist '(ruby-mode . ruby-ts-mode)) > > -If you try these modes and don't like them, you can go back to the > -"built-in" modes by restarting Emacs. But please tell us why you > -didn't like the tree-sitter based modes, so that we could try > -improving them. > +Loading one of the new modes amends 'auto-mode-alist' such that > +visiting the same type of file in the future will continue to use that > +new mode. If you try these modes and don't like them, you can go back > +to the "built-in" modes by restarting Emacs, but first, if you use > +desktop-save-mode, make sure no buffers using the new mode will get > +entered into your .desktop file. But please tell us why you didn't > +like the tree-sitter based modes, so that we can try improving them. > > Each major mode based on tree-sitter needs a language grammar library, > usually named "libtree-sitter-LANG.so" ("libtree-sitter-LANG.dll" on Let me ask what I asked earlier, again? Does c-ts-mode make itself default upon being loaded, or does it make itself the default upon being first enabled? The former has been a Bad Thing for as long as I can remember. The latter is not particularly problematic as long as we document the caveat. Thanks.