emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Make all tree-sitter modes optional


From: Po Lu
Subject: Re: Make all tree-sitter modes optional
Date: Fri, 17 Feb 2023 21:37:59 +0800
User-agent: Gnus/5.13 (Gnus v5.13)

Alan Mackenzie <acm@muc.de> 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 <acm@muc.de>
>
> [ .... ]
>
>> 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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]