Subject: bug#68246: 30.0.50; Add non-TS mode as extra parent of TS modes

From: João Távora <[email-masked]>
Date: Wed, 17 Jan 2024 00:49:16 +0000

On Wed, Jan 17, 2024 at 12:03 AM Stefan Monnier
<[email-masked]> wrote:
>
> > It solves some things (that are already solved anyway).  But I think the
> > downsides are also in plain sight.  It doesn't solve common problems
> > in Eglot and Markdown-mode.
>
> It's not designed to solve all problems.

Sure, and fair enough.   But those other problems are real.
Two groups exists, give or take. If we take this solution for just
one, we make solving the other more difficult.

> [ The needs of Markdown-mode are different from those targeted by the
>   current bug.  They're are of the form "find mode for type", as
>   addressed by things like `major-mode-remap-alist`, whereas the current
>   bug is about classifying modes.  ]

We should get a holistic solution where we introduce the concept of
language, either explicitly -- Dmitry's patch -- or implicitly --
abstract base modes derived from "prog-mode".  I prefer Dmitry's
patch, but the base mode approach also covers all cases AFAICS.

I don't see the urgency of fixing the problems this patch addresses.
Can we quantify these problems?  What external package is currently
misbehaving so much that it has to be fixed like this and can't
wait for a better solution?  In contrast, bug#68217 points to a real
unsolved problem where discrepant modes may be chosen by the user
and the Markdown package, and there's no easy way to coordinate.

João