GNU bug report logs - #60176
29.0.60; Fallback file variable mode if treesitter is not usable

Previous Next

Package: emacs;

Reported by: Mohammed Sadiq <sadiq <at> sadiqpk.org>

Date: Sun, 18 Dec 2022 12:08:01 UTC

Severity: normal

Tags: notabug, wontfix

Merged with 60559, 60874

Found in version 29.0.60

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #49 received at 60176 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Juri Linkov <juri <at> linkov.net>
Cc: sadiq <at> sadiqpk.org, monnier <at> iro.umontreal.ca, 60176 <at> debbugs.gnu.org
Subject: Re: bug#60176: 29.0.60; Fallback file variable mode if treesitter
 is not usable
Date: Tue, 10 Jan 2023 20:21:58 +0200
> From: Juri Linkov <juri <at> linkov.net>
> Cc: Stefan Monnier <monnier <at> iro.umontreal.ca>,  sadiq <at> sadiqpk.org,
>   60176 <at> debbugs.gnu.org
> Date: Tue, 10 Jan 2023 20:08:15 +0200
> 
> >>     (setq (alist-get 'c-mode major-mode-remap-alist)
> >>           (lambda () (if (treesit-available-p) (c-ts-mode) (c-mode))))
> >
> > I don't want to do this by default, because we want users of Emacs 29
> > to turn on TS modes manually, if and when they want that and think
> > they are ready.
> >
> > Of course, I don't mind if the above is done in local customizations
> > by users who are willing to use TS modes whenever they become
> > available.
> 
> Shouldn't we help users by simplifying such complex customization

What is so complex in activating a mode with a single command or a
function call?  Users do that all the time in their init files and
manually.

> and provide a customizable list of modes where tree-sitter is enabled,
> e.g.
> 
> (defcustom treesit-enable-modes nil
>   :type '(repeat
>           (choice (function-item c-ts-mode)
>                   (function-item c++-ts-mode)
>                   (function-item c-or-c++-ts-mode)
>                   ...

I disagree that asking users to customize lists of modes is helping
them.  I think just activating the modes they want, either manually or
in the init files, is a much simpler way of customization.  I don't
understand why you think the above is helping the users in any way.

>              ('c-ts-mode
>               (when (treesit-ready-p 'c t)
>                 (add-to-list 'major-mode-remap-alist '(c-mode . c-ts-mode))))

And this bit is completely unacceptable, from where I stand: it
basically means that the user activated a certain major mode he/she
wanted to use, but the result could be that an entirely different mode
was silently activated instead.  What kind of UX is that, and for a
shining new feature at that??




This bug report was last modified 2 years and 118 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.