From: Eli Zaretskii <eliz@gnu.org>
To: Juri Linkov <juri@linkov.net>
Cc: sadiq@sadiqpk.org, monnier@iro.umontreal.ca, 60176@debbugs.gnu.org
Subject: bug#60176: 29.0.60; Fallback file variable mode if treesitter is not usable
Date: Tue, 10 Jan 2023 20:21:58 +0200 [thread overview]
Message-ID: <83r0w2merd.fsf@gnu.org> (raw)
In-Reply-To: <86lemap8j4.fsf@mail.linkov.net> (message from Juri Linkov on Tue, 10 Jan 2023 20:08:15 +0200)
> From: Juri Linkov <juri@linkov.net>
> Cc: Stefan Monnier <monnier@iro.umontreal.ca>, sadiq@sadiqpk.org,
> 60176@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??
next prev parent reply other threads:[~2023-01-10 18:21 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-18 12:07 bug#60176: 29.0.60; Fallback file variable mode if treesitter is not usable Mohammed Sadiq
2022-12-19 7:39 ` Juri Linkov
2022-12-19 12:35 ` Eli Zaretskii
2022-12-19 13:12 ` Mohammed Sadiq
2022-12-19 16:43 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-01-09 17:30 ` Juri Linkov
2023-01-09 17:57 ` Eli Zaretskii
2023-01-09 23:06 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-01-10 12:55 ` Eli Zaretskii
2023-01-10 14:29 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-01-10 18:08 ` Juri Linkov
2023-01-10 18:21 ` Eli Zaretskii [this message]
2023-01-16 17:32 ` Juri Linkov
2023-01-16 18:21 ` Eli Zaretskii
2023-01-16 18:36 ` Juri Linkov
2023-01-16 19:26 ` Eli Zaretskii
2023-01-17 7:33 ` Juri Linkov
2023-01-17 12:07 ` Eli Zaretskii
2022-12-19 17:29 ` Juri Linkov
2022-12-19 17:47 ` Eli Zaretskii
2022-12-21 4:35 ` Yuan Fu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83r0w2merd.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=60176@debbugs.gnu.org \
--cc=juri@linkov.net \
--cc=monnier@iro.umontreal.ca \
--cc=sadiq@sadiqpk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).