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 05:34:10 +0200 Message-ID: <83h6joqz0t.fsf@gnu.org> References: <83edeww73j.fsf@gnu.org> <83o7dzvrmf.fsf@gnu.org> <838r53vlo5.fsf@gnu.org> <831qavvcbo.fsf@gnu.org> <83a5phskd5.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26025"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 68246@debbugs.gnu.org, casouri@gmail.com, monnier@iro.umontreal.ca To: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jan 08 04:35:15 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 1rMgPz-0006VV-6S for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 08 Jan 2024 04:35:15 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rMgPj-0004hA-4r; Sun, 07 Jan 2024 22:34:59 -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 1rMgPg-0004gn-U1 for bug-gnu-emacs@gnu.org; Sun, 07 Jan 2024 22:34:56 -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 1rMgPg-0006XB-4C for bug-gnu-emacs@gnu.org; Sun, 07 Jan 2024 22:34:56 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rMgPm-0004NC-13 for bug-gnu-emacs@gnu.org; Sun, 07 Jan 2024 22:35: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 03:35:01 +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.170468487416767 (code B ref 68246); Mon, 08 Jan 2024 03:35:01 +0000 Original-Received: (at 68246) by debbugs.gnu.org; 8 Jan 2024 03:34:34 +0000 Original-Received: from localhost ([127.0.0.1]:34804 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rMgPK-0004MN-9P for submit@debbugs.gnu.org; Sun, 07 Jan 2024 22:34:34 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54664) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rMgPH-0004M9-OD for 68246@debbugs.gnu.org; Sun, 07 Jan 2024 22:34:33 -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 1rMgP4-0006RS-6m; Sun, 07 Jan 2024 22:34:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=9KndzNQL0pwdkdsYzNOAzI5ulVumj0B9JTarNzmU3LY=; b=P+9Nfh+JMHT9lAOs+uLJ A+cGQ9Idyhbl3qyzFn+dRK17x6pk5U+l48C5YO0uCixSzblliaPuMjZni6a/udjjpswvD7HosoB4U J4VnqENI1hB7oqUf/HDLzqkyLtGVLNQUFuCfwUZB/iFbRjdQdU/zBe6+klhZEjfUydeqjBjemS9VB iWlh2M3y0t4d8o5pDuMhGm3frIiWlIIZjqGCgHhFJWsd2qpdtfFAMZUtcmJqShLblJdtNUvKdGgKd 6j6cx1ZQlRV46z0NH4kFJIRify0x89Iy9y4bM48BiDCoGWaZGkNhU+gM4Hu680pPz+GaIHv6TtsHn 6k+7dxThN+72AQ==; In-Reply-To: (message from =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= on Mon, 8 Jan 2024 00:12:50 +0000) 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:277532 Archived-At: > From: João Távora > Date: Mon, 8 Jan 2024 00:12:50 +0000 > Cc: monnier@iro.umontreal.ca, casouri@gmail.com, 68246@debbugs.gnu.org > > On Sun, Jan 7, 2024 at 6:55 AM Eli Zaretskii wrote: > > > But that is not necessarily true in all cases. > > I specifically said I was speaking for 2 packages I created, > Eglot and Yasnippet, and possibly for lsp-mode how is facing the same > problem, which is answering the question: > > what, if any, is the language/file type for a given major mode? > > I can't speak to those other cases unless someone bring them forth. A generalization should be based on as many use cases as possible. > > Also, some major modes don't have a "language" attribute, in > > the usual sense of that word. > > Then I guess "nil" would be a fine default for anything not inheriting from > "prog-mode"? 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. > > IOW, this is IMO an even more leaky abstraction than what we get with > > derived-mode-add-parents. > > We don't seem to share the same concept of what a "leaky abstraction" is. > In my world, it's an abstraction that exposes details of the thing > it's supposed to abstract away. That's the sense in which I'm using it. > Unless we're trying to abstract away lisp symbols, I don't see how > set/get-language-for-mode is leaky. It attempts to abstract a trait that isn't abstract, by going in the opposite direction of that used for abstractions. > But if Stefan's patch is supposed to also abstract away the > language-mode correspondence It isn't, AFAIU.