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: Sun, 21 Jan 2024 11:54:10 +0200 Message-ID: <83bk9frozh.fsf@gnu.org> References: <83h6joqz0t.fsf@gnu.org> <834jfoq86m.fsf@gnu.org> <831qarrbjx.fsf@gnu.org> <87a5p84nlh.fsf@gmail.com> <83edekfldq.fsf@gnu.org> <8e6935bc-2a60-4a14-8e63-d6057a7e2af7@gutov.dev> <1a0802a1-7c25-4188-9984-f54b0e56ab5e@gutov.dev> <83bk9gv640.fsf@gnu.org> <02EBD96A-B040-46CF-9ED2-775A6696E1CC@gmail.com> 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="25104"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 68246@debbugs.gnu.org, dmitry@gutov.dev, stefankangas@gmail.com, joaotavora@gmail.com, monnier@iro.umontreal.ca To: Yuan Fu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jan 21 10:55:23 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 1rRUXz-0006Lh-6L for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 21 Jan 2024 10:55:23 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rRUXd-0007xF-3A; Sun, 21 Jan 2024 04:55: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 1rRUXb-0007wp-Br for bug-gnu-emacs@gnu.org; Sun, 21 Jan 2024 04:54: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 1rRUXb-0001Ba-2v for bug-gnu-emacs@gnu.org; Sun, 21 Jan 2024 04:54:59 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rRUXe-00041t-1J for bug-gnu-emacs@gnu.org; Sun, 21 Jan 2024 04:55: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: Sun, 21 Jan 2024 09:55: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.170583088215457 (code B ref 68246); Sun, 21 Jan 2024 09:55:02 +0000 Original-Received: (at 68246) by debbugs.gnu.org; 21 Jan 2024 09:54:42 +0000 Original-Received: from localhost ([127.0.0.1]:36609 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rRUXK-00041E-5P for submit@debbugs.gnu.org; Sun, 21 Jan 2024 04:54:42 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35486) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rRUXG-000410-Uv for 68246@debbugs.gnu.org; Sun, 21 Jan 2024 04:54:41 -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 1rRUX7-0001AC-3P; Sun, 21 Jan 2024 04:54:29 -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=fE6B2nXOa6q8hsncQr7Dozg6F7L0ZOKiYSNVudWMopU=; b=BLVdS3jsP+j0RRh0hF5q puadNq54xoyC/B72s0V6GWdyuBv1qcxa+8cHTT99zbaIzbSevoJpWT7dUEImjcOW5BXNBHTOgfu/m 1ktDZXtVL91sIx1nEZOjByGzc7Xn7HKTydeJ2eNZDPneLWj4dWDfE9tqVVxI47ogBJ/+tqlpfDwx4 /7tsDLyq9YPxsqxSwyrqdOJELrEDTbQKkxhVXVX1V5IWKo1oM0jhves+IV/XWpVmx1Gh06D+/32/l VBLCDB85xqpeX917P+3bfgq7mfOLpQ08q8pQpMflm3xWp0CoPsZ1JNS68PtK4piSDGVQacV9llqXO M0JFLWKescb9zQ==; In-Reply-To: <02EBD96A-B040-46CF-9ED2-775A6696E1CC@gmail.com> (message from Yuan Fu on Sat, 20 Jan 2024 16:32:02 -0800) 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:278661 Archived-At: > From: Yuan Fu > Date: Sat, 20 Jan 2024 16:32:02 -0800 > Cc: Eli Zaretskii , > Stefan Monnier , > Dmitry Gutov , > Stefan Kangas , > 68246@debbugs.gnu.org > > IIUC Stefan’s patch is trying to use xxx-mode to represent “mode for xxx in general”, sort of like the keys in major-mode-remap-alist. And IIUC Joao and Dmitry are not very comfortable with it because (mode-A R mode-B) where R is derived-mode-p implicitly means mode-B runs mode-A’s hooks and major mode body, and this patch would break that, which would bring a lot of confusion. There should be no confusion. derived-mode-add-parents is documented regarding the effects and meaning (and if the current documentation is not clear enough, we can clarify it further). Moreover, I see no reason to assume FOO-mode runs any mode hook except FOO-mode-hook. > Instead of using xxx-mode, can we set common-xxx-mode to the parent of both xxx-mode and xxx-ts-mode? Or maybe abtract-xxx-mode, or just xxx, the name doesn’t matter. The point is this is just a symbol and doesn’t have hooks and other implicit things a major mode have. It’s still a bit confusing, but it should be less confusing. We can also add a variable common-mode-list or abstract-mode-list so these symbols don’t seem to come out of nowhere. I'm firmly against introducing modes that are not real modes. We do use base-modes where it makes sense, but if such a mode makes no sense, introducing it as a means to some end is just going to make things more confusing. Once again: let's have real practical issues on our hands before we look for solutions. Right now, no such issues are known, since the changes barely landed on master. There's no reason for looking for hasty solutions for problems we don't have a good handle on.