From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#68246: 30.0.50; Add non-TS mode as extra parent of TS modes Date: Mon, 08 Jan 2024 14:45:39 +0200 Message-ID: <83bk9wq9ho.fsf@gnu.org> References: <83edeww73j.fsf@gnu.org> <83o7dzvrmf.fsf@gnu.org> <838r53vlo5.fsf@gnu.org> <831qavvcbo.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10555"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 68246@debbugs.gnu.org, casouri@gmail.com, joaotavora@gmail.com To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jan 08 13:47:30 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rMp2P-0002Vx-VQ for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 08 Jan 2024 13:47:30 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rMp1x-0006pO-G3; Mon, 08 Jan 2024 07:47:01 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rMp1t-0006og-2j for bug-gnu-emacs@gnu.org; Mon, 08 Jan 2024 07:46:59 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rMp1s-0001VR-P4 for bug-gnu-emacs@gnu.org; Mon, 08 Jan 2024 07:46:56 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rMp1y-0006CN-KF for bug-gnu-emacs@gnu.org; Mon, 08 Jan 2024 07:47:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 08 Jan 2024 12:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68246 X-GNU-PR-Package: emacs Original-Received: via spool by 68246-submit@debbugs.gnu.org id=B68246.170471796321349 (code B ref 68246); Mon, 08 Jan 2024 12:47:02 +0000 Original-Received: (at 68246) by debbugs.gnu.org; 8 Jan 2024 12:46:03 +0000 Original-Received: from localhost ([127.0.0.1]:35409 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rMp10-0005Xa-9w for submit@debbugs.gnu.org; Mon, 08 Jan 2024 07:46:02 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40402) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rMp0v-0005Hy-9Y for 68246@debbugs.gnu.org; Mon, 08 Jan 2024 07:46:01 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rMp0i-0001ER-U0; Mon, 08 Jan 2024 07:45:45 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=Bzkddz+Mm0KlEqRKGk0cYX+mlounwnqJ2wHMqQZpgzo=; b=b+d2pD4PkaB7 lQPg0IqcSiYU7GT18RtlCH6PqYy7ESJhIfPrU0yL/Ft7rZ79CsQp01B+sHuuMNeLPwEdSQGJFm91a FL0TcoFhqAQBSKuEpiPCrASm+ecahCEnO/wLYGMtHY6HLfeF5eEPIA1CdjkVc3v5WiG+motT56eWR BNa+Ukwio7dxMOu33gLCE6XgxJ/DyMOm2CaipRBjciGdCEKL+51bF7MQVTtUr9a2GZ5qe6aSOU+S+ coURLgnZWEnBxnT71fg/ZOfU51ch7KtW+k0Vb+iIrNvEjxcjJlL0QksO5pmlQL77L3IKk2+6gYGeo iO6tF0y8n1t+b6I/Q30Muw==; In-Reply-To: (message from Stefan Monnier on Sun, 07 Jan 2024 23:11:00 -0500) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:277554 Archived-At: > From: Stefan Monnier > Cc: Eli Zaretskii , casouri@gmail.com, 68246@debbugs.gnu.org > Date: Sun, 07 Jan 2024 23:11:00 -0500 > > > (set-language-for-mode 'foo-ts-mode 'foo) > > Maybe we want to introduce this concept, indeed. > > maybe we want to that notion of "language" from elsewhere, such as > the one used in LSP? Please don't call it "language". That'd be confusing. LSP is about programming languages, so "language" is natural there. But in Emacs, a major mode is more general than that. For example, it is not unthinkable to consider mail-mode to be the extra-parent of message-mode (or vice versa) -- but what is the "language" in that case? > Or maybe we want to take it from MIME types? > I'm sure there are other options out there. > > Problem is: they come with their own complexities and corner cases. > After all, this is inevitable when you create a taxonomy. > IOW, while we *may* want to add support for an explicit notion of "file > type", it's a whole problem in itself and it will not solve all > our problems either. File types also have problems: Emacs modes are sometimes defined for buffers that don't visit files. > In the mean time, I think `derived-mode-add-parents` is worth a try. > As mentioned in some message up-thread, I'm not 100% confident that it > won't introduce serious breakage. But I think we do need more > experience and installing my patch is a good way to do that. Yes, I think we should try it and see what we learn.