From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#68246: 30.0.50; Add non-TS mode as extra parent of TS modes Date: Thu, 11 Jan 2024 05:49:56 +0200 Message-ID: References: <83o7dzvrmf.fsf@gnu.org> <838r53vlo5.fsf@gnu.org> <831qavvcbo.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27929"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: 68246@debbugs.gnu.org, Eli Zaretskii , casouri@gmail.com, =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= To: Stefan Kangas , Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jan 11 04:51:10 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 1rNm61-00070U-SZ for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 11 Jan 2024 04:51:10 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rNm5x-0007UP-Ak; Wed, 10 Jan 2024 22:51:05 -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 1rNm5v-0007U0-4S for bug-gnu-emacs@gnu.org; Wed, 10 Jan 2024 22:51:03 -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 1rNm5u-0000K3-Rl for bug-gnu-emacs@gnu.org; Wed, 10 Jan 2024 22:51:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rNm5t-0007ze-Oz for bug-gnu-emacs@gnu.org; Wed, 10 Jan 2024 22:51:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 11 Jan 2024 03:51: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.170494500830649 (code B ref 68246); Thu, 11 Jan 2024 03:51:01 +0000 Original-Received: (at 68246) by debbugs.gnu.org; 11 Jan 2024 03:50:08 +0000 Original-Received: from localhost ([127.0.0.1]:43660 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rNm52-0007yH-3w for submit@debbugs.gnu.org; Wed, 10 Jan 2024 22:50:08 -0500 Original-Received: from wout4-smtp.messagingengine.com ([64.147.123.20]:45153) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rNm4z-0007xc-RQ for 68246@debbugs.gnu.org; Wed, 10 Jan 2024 22:50:06 -0500 Original-Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 70A843200AB9; Wed, 10 Jan 2024 22:50:00 -0500 (EST) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Wed, 10 Jan 2024 22:50:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1704944999; x=1705031399; bh=wHoH2AfIoQkA47WlvMkJlSWDJlQfiw7zxyjatfeof1U=; b= KGFxYD0NPKXxxnngberh0B+oE13pApgS5qe7tshKX9NpLn4J3aKgz+4EHEb8VIO8 7hzlMYZAsN3oMFOeiiA1J3mPAGbPFuAweZe3Sclrhuwgwd/KbHJtCkDa4plHwery 3sQ7vfjWbn53G/gFtDgq8rExqvdTUPXgHo473z7FVXCPrrscPZTG7lV9U87zT7tv Jdlu0bUWJ6aAlG0lUqHF0ScfpMrb7OF1sKo/1irML/LCZ903h1Fh+bVPGE3du0O4 XMfpltae8ZAJrtgWaHWX2HrF2p/XYmeX2KKFJuWDRFPGJl7kGkgbi1sOE7NakTHz JvaZ8u/werUQcpHo4vQ7Hg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1704944999; x= 1705031399; bh=wHoH2AfIoQkA47WlvMkJlSWDJlQfiw7zxyjatfeof1U=; b=3 hkvGZkXspnP02iX9+ZLxjd67AgkqdyRn0L1BGMLFdmXCiWtcCPrPaLGLz8oXoMQz N/tjlI8GI/79g+yC0Hj9vw7JHs9VS0hfpZn40/IbWkYn4ltOLxzI6DOY9j1zgjqd ZczHPjo6Go0MX1F4htmHjoDpujulh9v25oyVtdkyNAzFhwsS7fsJpum4SkXpbuJp q0jV/BzEstvHgojutCAsLX/XJMMHQ4A9TI+2NEbVdi8HYSzckQb6eragvThLyeIe f4QkcdSV8sPxY9o5V/IAoFDHtYTxixqMDurFCq/KleoT3MnEMxeu6YPBQCAeDkh5 zLeam2AjtQQiZi0IKOJEA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvdeivddgieduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtkeertddtvdejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhepgeelfeetkefghfdvhfdtgeevveevteetgeetveegtedthefhudekteehffeu keeknecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 10 Jan 2024 22:49:58 -0500 (EST) Content-Language: en-US In-Reply-To: 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:277862 Archived-At: On 10/01/2024 08:24, Stefan Kangas wrote: >> Also, "what language is this" does happen to be a meaningful question. >> Eglot's example aside, we can have other tools, databases, etc. > I can't speak for Stefan M but AFAIU he agrees that "which language > corresponds to this mode" is something we want to answer. He just > proposes using the taxonomy we already have for this, instead of adding > a new one. > > I.e. the difference is: > > (derived-mode-p 'foo-mode) vs (language-for-mode-p 'foo) > Monnier Távora > > Either of those would answer the question "does the current buffer > contain language FOO". The former reuses the old taxonomy, the right > introduces a new one. The predicate is available, but implementing the function that decides on the current buffer's language is harder. Because js-mode derives from prog-mode as well. You can't really take the current major mode, or an ancestor, slash away "[ts-]-mode", and say "this is the name of the language", because it's hard to decide which of them to use. >> Finally, if we did have "languages" as an entity, we could have some UI >> for the user to choose the mode for a language - something like Debian's >> 'update-alternatives'. And it would also serve to list the supported >> languages, I guess. > This is a good point. Also to install extensions for those languages. > Or we could use it to implement the VSCode-like prompt "hey this seems > to be language , do you want to install support for it?". Yup. Or - as long as the language name is decidable, allow the user to just enable, say, fundamental-mode, call 'M-x eglot' and have it provide both syntax highlighting and indentation support through LSP. This might not always be practical (and syntax highlighting is not implemented in Eglot yet), but it seems like an interesting possibility. Especially in those rare and purely hypothetical cases when an LSP server for a language exists, but there is no Emacs major mode yet.