From: Alan Mackenzie <acm@muc.de>
To: Eli Zaretskii <eliz@gnu.org>
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
Subject: Re: Make all tree-sitter modes optional
Date: Wed, 15 Feb 2023 21:40:00 +0000 [thread overview]
Message-ID: <Y+1RMG8adtaqS7hw@ACM> (raw)
In-Reply-To: <83pmaaaicy.fsf@gnu.org>
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>
> > > So you revert auto-mode-alist to its original shape, but leave the
> > > buffers already under c-ts-mode in that mode? Is that what the users
> > > would expect, you think?
> > I think so, yes. The scenario I am envisaging is the user tentatively
> > trying c-ts-mode on one, or a few buffers, then doing C-x C-f foo.c to
> > carry on with her work using C Mode.
> And when going back, they don't want their C/C++ buffers revert to C
> mode? I'd be surprised.
I wouldn't. If I type M-x foo-mode in a buffer, I would be surprised if
something changed that without asking me.
> > > Also, this won't work if the user customized auto-mode-alist in some
> > > way wrt some of those file-name extensions.
> > OK. How about something like the following instead (untested)?
> > (defun c-make-ts-undefault-mode ()
> > "<Doc string>"
> > (interactive)
> > (let (c)
> > (while (setq c (rassq 'c-ts-mode auto-mode-alist))
> > (setq auto-mode-alist (remq c auto-mode-alist)))))
> Shouldn't you add the elements of C mode back, in case they were
> removed?
Possibly. But we're looking for something simple and reliable at the
moment. Adding code to check for the presence of c-mode in
auto-mode-alist would add some complexity, and may not really be needed.
> > > > > Then they [proposed amendments] aren't "reasonable" at this time.
> > > > > Maybe later, maybe on master.
> > > > That will be too late, the damage will have been done.
> > > What "damage"? why do you call "damage" changes made by others in
> > > Emacs as part of Emacs development?
> > The damage I'm talking about is the disruption in users' work flow which
> > is likely to occur. Being perfectly blunt, c-ts-mode is not yet as
> > capable as CC Mode in some areas, and in any case its configuration is
> > wholly different (for good reasons). Converting to the use of c-ts-mode
> > is a project, not something which can just happen. The current code is
> > likely to confuse and anger users when, after trying out c-ts-mode, it
> > gradually dawns on them that the reason C Mode no longer works is that
> > their newly opened files aren't in C Mode at all. That is what has
> > happened to me several times.
> This can happen with any new feature. There's nothing we can do about
> this, so please just stop worrying about it.
I think we can do things about it, hence my patch from yesterday evening
and this discussion.
> > I'm not calling others' changes damage. I'm calling the disruptive
> > effect on users' work flow damage. That disruption, once it's happened,
> > cannot ever be undone.
> With the implied assumption that the effect will necessarily be
> "disruptive" in many cases. Why assume that?
Because it's unexpected to the users, something which throws them out of
their rhythm, and forces them to expend time and energy getting back to
where they wanted to be. Not all users, but likely enough of them to
matter.
[ .... ]
> > > Well, that's exactly why these new modes are entirely optional.
> > They're not entirely optional, that's the whole point of my posts over
> > the last couple of days. One can opt in to using c-ts-mode, but opting
> > out again is unreasonably difficult.
> That's an unusual way of interpreting "opt out". One doesn't need to
> "opt out" of an optional behavior; instead, one should avoid turning
> it on, and that's all!
Again, we differ here. You're picturing a process where a user one day
makes a definitive decision to switch, and does so permanently. Maybe
that's how you work, it's not how I work. I would find myself with a
spare few minutes, experiment a bit with the new mode, then carry on with
my work, maybe experiment a bit more. I would subconsciously expect my
Emacs state would not be changed by such experimentation. But it is, in
a way which is difficult to reverse. Again, I don't understand why
you're content that such difficulty remain.
> > Even restarting Emacs (which to me is a drastic operation) won't opt
> > out if there are still buffers in c-ts-mode in the desktop.
> Many people restart Emacs all the time. And those who use desktop
> know how to overcome such problems, which aren't unique to these
> modes.
Probably most users start Emacs in the morning and shut it down in the
evening. I certainly do. I think a user who gets into this problem is
going to have to spend, perhaps, between 1 and 2 hours getting it sorted
out, or on the other hand, will continue dissatisfied at having to type
M-x c-mode after loading each and every C file. Why do you not see this
as a bad thing?
> > I don't think the current NEWS item makes this clear enough.
> The current NEWS already goes way beyond its purpose and scope in
> presenting these new modes and the related issues. And I object to
> using NEWS to tell users in too much detail how NOT to use our new
> features: that is like shooting ourselves in the foot.
NEWS has always introduced new features, and amongst the description is
(almost) always some text telling users how to restore the old behaviour.
Why do we not do that here?
> > > For you and me as users, having to restart Emacs, or having to use a
> > > separate session for such experiments, is an entirely reasonable and
> > > simple alternative, ....
> > Having to restart Emacs is NOT at all reasonable for me, even if it may
> > be for you. Neither is having to use a separate session. We all use
> > Emacs differently, with different expectations.
> > > .... one which should eliminate any need for undoing the "damage" of
> > > c-ts-mode.
> > As I noted above, such restarting will not clear the state of c-ts-mode
> > being default whilst there are still c-ts-mode buffers in the desktop.
> > Anyhow, there is no mention of using a separate session in NEWS, and
> > restarting Emacs is incompletely documented (as already noted).
> Sounds like you run your full customized production environment in
> test runs of Emacs. The prudent thing to do is instead to either use
> "emacs -Q" or to have a special user/home directory which you use for
> such jobs. Then restarting and/or deleting the desktop is not an
> issue at all. I'm surprised I need to explain that, I thought
> everybody who is involved in Emacs maintenance does that.
Everybody uses Emacs differently. Even (especially) amongst Emacs
developers.
--
Alan Mackenzie (Nuremberg, Germany).
next prev parent reply other threads:[~2023-02-15 21:40 UTC|newest]
Thread overview: 119+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <84973.1672843723@hassadar.pretzelnet.org>
[not found] ` <83wn62xi3k.fsf@gnu.org>
[not found] ` <m1cz7u5brr.fsf@yahoo.es>
[not found] ` <83o7rexe2n.fsf@gnu.org>
[not found] ` <83h6x5xym7.fsf@gnu.org>
2023-01-15 14:01 ` Make all tree-sitter modes optional Eli Zaretskii
2023-01-15 23:39 ` Dmitry Gutov
2023-01-16 7:43 ` Theodor Thornhill
2023-01-16 16:30 ` Dmitry Gutov
2023-01-16 12:34 ` Eli Zaretskii
2023-01-16 13:06 ` Dmitry Gutov
2023-01-16 14:20 ` Eli Zaretskii
2023-01-16 14:50 ` Dmitry Gutov
2023-01-16 14:59 ` Eli Zaretskii
2023-01-17 12:59 ` Dmitry Gutov
2023-01-17 13:47 ` Eli Zaretskii
2023-01-17 14:32 ` Dmitry Gutov
2023-01-17 14:52 ` Eli Zaretskii
2023-01-17 15:22 ` Dmitry Gutov
2023-01-17 17:02 ` Eli Zaretskii
2023-01-17 17:10 ` Dmitry Gutov
2023-01-17 17:38 ` Eli Zaretskii
2023-01-17 17:59 ` Dmitry Gutov
2023-01-17 18:04 ` Eli Zaretskii
2023-01-17 18:21 ` Dmitry Gutov
2023-01-17 18:40 ` Eli Zaretskii
2023-01-17 18:49 ` Dmitry Gutov
2023-01-17 19:03 ` Eli Zaretskii
2023-01-17 19:21 ` Dmitry Gutov
2023-01-18 1:11 ` Yuan Fu
2023-01-18 1:23 ` Dmitry Gutov
2023-01-18 3:34 ` Eli Zaretskii
2023-01-18 3:52 ` Dmitry Gutov
2023-01-18 12:06 ` Eli Zaretskii
2023-01-18 14:00 ` Dmitry Gutov
2023-01-18 14:51 ` Eli Zaretskii
2023-01-18 12:36 ` Stefan Monnier
2023-01-17 17:34 ` treesit-forward-sexp (was: Make all tree-sitter modes optional) Juri Linkov
2023-01-17 17:40 ` Theodor Thornhill
2023-01-17 18:17 ` treesit-forward-sexp Juri Linkov
2023-01-17 17:50 ` treesit-forward-sexp (was: Make all tree-sitter modes optional) Dmitry Gutov
2023-01-17 17:59 ` Eli Zaretskii
2023-01-16 1:12 ` Make all tree-sitter modes optional Po Lu
2023-01-17 17:30 ` Juri Linkov
2023-01-17 17:58 ` Eli Zaretskii
2023-01-17 18:19 ` Juri Linkov
2023-01-17 18:41 ` Eli Zaretskii
2023-02-14 19:08 ` Alan Mackenzie
2023-02-14 19:29 ` Eli Zaretskii
2023-02-14 21:02 ` Alan Mackenzie
2023-02-15 15:35 ` Eli Zaretskii
2023-02-15 17:57 ` Alan Mackenzie
2023-02-15 18:33 ` Eli Zaretskii
2023-02-15 20:31 ` Alan Mackenzie
2023-02-16 5:41 ` tomas
2023-02-16 7:27 ` Eli Zaretskii
2023-02-16 22:05 ` Yuan Fu
[not found] ` <87v8k2g04m.fsf@dick>
2023-02-15 20:34 ` Eli Zaretskii
[not found] ` <87mt5eegkw.fsf@dick>
2023-02-16 7:53 ` Eli Zaretskii
2023-02-16 8:52 ` Po Lu
2023-02-15 21:40 ` Alan Mackenzie [this message]
2023-02-17 13:30 ` Alan Mackenzie
2023-02-17 13:37 ` Po Lu
2023-02-17 13:46 ` Stefan Monnier
2023-02-17 14:16 ` Po Lu
2023-02-17 14:40 ` Eli Zaretskii
2023-02-17 14:56 ` Dmitry Gutov
2023-02-17 15:04 ` Eli Zaretskii
[not found] ` <8735741fic.fsf@dick>
2023-02-17 15:41 ` Alan Mackenzie
2023-02-17 16:04 ` Make all tree-sitter modes optional Stefan Kangas
2023-02-17 17:42 ` Morgan Willcock
2023-02-17 15:15 ` Gregory Heytings
2023-02-17 13:54 ` Alan Mackenzie
[not found] ` <d4c1a7f6-b5bf-f4f3-8d79-1c6b1d07cf70@yandex.ru>
2023-02-17 14:22 ` Po Lu
2023-02-17 14:58 ` Eli Zaretskii
2023-02-17 15:18 ` Alan Mackenzie
2023-02-15 18:34 ` Stefan Monnier
2023-02-15 19:01 ` Dmitry Gutov
2023-02-15 19:26 ` Stefan Monnier
2023-02-15 19:47 ` Eli Zaretskii
2023-02-15 19:53 ` Stefan Monnier
2023-02-15 20:06 ` Eli Zaretskii
2023-02-15 21:04 ` Stefan Monnier
2023-02-16 7:42 ` Eli Zaretskii
2023-02-16 9:49 ` Basil L. Contovounesios
2023-02-16 11:48 ` Eli Zaretskii
2023-02-16 14:41 ` Stefan Monnier
2023-02-16 15:42 ` Eli Zaretskii
2023-02-16 16:45 ` Stefan Monnier
2023-02-16 17:05 ` Eli Zaretskii
2023-02-16 19:14 ` Dmitry Gutov
2023-02-16 20:07 ` Stefan Monnier
2023-02-16 5:45 ` tomas
2023-02-16 8:26 ` Eli Zaretskii
2023-02-16 10:30 ` Alan Mackenzie
2023-02-16 12:38 ` Po Lu
2023-02-16 12:53 ` Dmitry Gutov
2023-02-15 20:24 ` Dmitry Gutov
2023-02-16 7:05 ` Eli Zaretskii
2023-02-16 7:53 ` Theodor Thornhill
2023-02-16 8:34 ` Eli Zaretskii
2023-02-16 8:46 ` Theodor Thornhill
2023-02-16 11:58 ` Dmitry Gutov
2023-02-16 11:56 ` Dmitry Gutov
2023-02-16 14:48 ` Theodor Thornhill via Emacs development discussions.
2023-02-16 14:56 ` Dmitry Gutov
2023-02-16 15:15 ` Theodor Thornhill
2023-02-15 23:48 ` Lynn Winebarger
2023-02-16 2:56 ` Stefan Monnier
2023-02-15 19:07 ` Eli Zaretskii
2023-02-15 19:27 ` Stefan Monnier
2023-02-15 21:06 ` Basil L. Contovounesios
2023-02-16 7:44 ` Eli Zaretskii
2023-02-15 18:25 ` Juri Linkov
2023-01-19 16:53 Pedro Andres Aranda Gutierrez
2023-01-20 8:30 ` Eli Zaretskii
2023-01-20 16:31 ` Pedro Andres Aranda Gutierrez
2023-01-20 19:13 ` Eli Zaretskii
2023-01-21 11:30 ` Pedro Andres Aranda Gutierrez
2023-01-21 11:48 ` Eli Zaretskii
2023-01-22 6:23 ` Pedro Andres Aranda Gutierrez
2023-01-22 6:38 ` Eli Zaretskii
2023-01-22 10:46 ` Eli Zaretskii
-- strict thread matches above, loose matches on Subject: below --
2023-02-18 7:55 Pedro Andres Aranda Gutierrez
2023-03-11 12:45 ` Ongaro
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=Y+1RMG8adtaqS7hw@ACM \
--to=acm@muc.de \
--cc=casouri@gmail.com \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=jostein@secure.kjonigsen.net \
--cc=juri@linkov.net \
--cc=larsi@gnus.org \
--cc=monnier@iro.umontreal.ca \
--cc=theo@thornhill.no \
/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).