GNU bug report logs -
#68246
30.0.50; Add non-TS mode as extra parent of TS modes
Previous Next
Reported by: Stefan Monnier <monnier <at> iro.umontreal.ca>
Date: Thu, 4 Jan 2024 22:12:01 UTC
Severity: wishlist
Found in version 30.0.50
Done: Stefan Monnier <monnier <at> iro.umontreal.ca>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> From: João Távora <joaotavora <at> gmail.com>
> Date: Mon, 8 Jan 2024 10:50:57 +0000
> Cc: monnier <at> iro.umontreal.ca, casouri <at> gmail.com, 68246 <at> debbugs.gnu.org
>
> On Mon, Jan 8, 2024 at 3:34 AM Eli Zaretskii <eliz <at> gnu.org> wrote:
>
> > That's not useful, since, for example, TS and non-TS mods for those
> > "no-language" modes will still want to be treated the same in some
> > situations, like .dir-locals.el.
>
> Yup, so pass them same :language to them and call `get-language-for-mode`
> somewhere in the .dir-locals.el machinery? Else suggest to use the base mode,
> if it exists. If it doesn't exist, create it?
There's no "language" here. Calling things by names they aren't is
not useful. All it does is create confusion.
> > It attempts to abstract a trait that isn't abstract, by going in the
> > opposite direction of that used for abstractions.
>
> It's interesting how you state a simple get/set is a "leaky abstraction",
> but then also not an abstraction at all.
It's "leaky" because it "leaks" the idea that it should be a
"language".
> Let's put it like this: Eglot should probably fix this actual code:
>
> (replace-regexp-in-string "\\(?:-ts\\)?-mode$" "" (symbol-name sym))
>
> to find the language to report to the server.
Eglot should not rely on the assumption that the "language", whatever
it is, is included verbatim in the mode's symbol name. Neither should
Eglot assume anything else about the name of the mode.
> What if an Eglot users wants some server just for the non-TS mode? Or a
> Yasnippet user some snippets for such a mode? Or even just regular
> user some directory-local variable value?
Eglot provides hooks to do that.
> The more I think about this, the more I think this is problematic.
>
> But if you guys are so confident, sure, let's try it. If nothing bad
> happens great, else I guess I'll refer users to this thread.
Yes.
This bug report was last modified 1 year and 104 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.