From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuan Fu Newsgroups: gmane.emacs.bugs Subject: bug#68246: 30.0.50; Add non-TS mode as extra parent of TS modes Date: Tue, 23 Jan 2024 22:20:49 -0800 Message-ID: <93910A1D-9768-4327-9C3E-C398D932CFA0@gmail.com> 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> <83bk9frozh.fsf@gnu.org> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1390"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 68246@debbugs.gnu.org, dmitry@gutov.dev, stefankangas@gmail.com, =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= , Stefan Monnier To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jan 24 07:22: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 1rSWeM-00006D-V8 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 24 Jan 2024 07:22:15 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rSWe6-0007Tq-N6; Wed, 24 Jan 2024 01:21:58 -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 1rSWe5-0007Ti-KF for bug-gnu-emacs@gnu.org; Wed, 24 Jan 2024 01:21:57 -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 1rSWe5-0006DJ-CL for bug-gnu-emacs@gnu.org; Wed, 24 Jan 2024 01:21:57 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rSWe9-00019w-UD for bug-gnu-emacs@gnu.org; Wed, 24 Jan 2024 01:22:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Yuan Fu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 24 Jan 2024 06:22: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.17060772764392 (code B ref 68246); Wed, 24 Jan 2024 06:22:01 +0000 Original-Received: (at 68246) by debbugs.gnu.org; 24 Jan 2024 06:21:16 +0000 Original-Received: from localhost ([127.0.0.1]:44315 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rSWdP-00018m-Pv for submit@debbugs.gnu.org; Wed, 24 Jan 2024 01:21:16 -0500 Original-Received: from mail-oi1-x231.google.com ([2607:f8b0:4864:20::231]:50655) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rSWdM-00018I-LM for 68246@debbugs.gnu.org; Wed, 24 Jan 2024 01:21:14 -0500 Original-Received: by mail-oi1-x231.google.com with SMTP id 5614622812f47-3bb53e20a43so3671895b6e.1 for <68246@debbugs.gnu.org>; Tue, 23 Jan 2024 22:21:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706077262; x=1706682062; darn=debbugs.gnu.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=HJVpuxgjE3KnvCqm3hztrFsC9DFpJ3TbBrmWCzL+ojM=; b=dPtALlq1uLoB3HnjXRiFmai8wqo2GSv+uJOo4FKw8v4eav5Wn5j5iy67WNRUdaAXfw h/uuyhFuxhLehii+pn+2+FnbecMx2LJg5Jfmx/0r7cKB8df6PWVu6Prktz97t351DI/g VyUf9M0P21sHJKsI+Vx0dV/KpKme5Lx5gC1lvlknox1GGfimZLU9n06KK3o74TsbahtW lvxWROILKrMQft7etGxHJiLt7WJ39j73wHLKOE9FMqkGkKn1x85JH2CzvS43Tb/Vy3Oq dEtnD3kv144uxcFKTU+KYrqJuAJJPh6Oqo1XgLm4W91frVS7d6Ua9JfHgk9qdrgKPV/+ DW3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706077262; x=1706682062; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=HJVpuxgjE3KnvCqm3hztrFsC9DFpJ3TbBrmWCzL+ojM=; b=OnPW505fTFYG4Tf7nMSUXVGBbgJDFjuwO74o3zFM0EfOu5ltEiDQSkAziyU0zDZgz+ Iq2F0QpRfINj3Ne7a05+t2PxVweztMnKkultNVKBml4ORn2SsVXRUZneBA39AgfKhojh NSjHYT8XmCuZ91BHKTn2zcNuCm3qVAUzxf3vFcEYhaSay4bwYPfxwFbv2KynMdVcJiHQ Agadhf4kYbJgeVr4k8s9gqmaiuy1KkOVulLAUlcGE2uPxKvobp0KLDYoWGiVcffwAJGc v7OTrh+OaY7+slTxjiiSkr1nVsqKXQfeyDFFUwg1GDDuBYQNTmJRLmK2aX2Cr74h82+3 XRKA== X-Gm-Message-State: AOJu0YwLrcqUUAzL2YzaLS0wKbh/JtFPdbE6NP+pROsmCwmbTvKc2kvA 2pr76Ts+ijCO/d34H5zP3k1EqwmcQOGrp0rEaoemFH1YlhGI7T9N X-Google-Smtp-Source: AGHT+IFIpKybs/yG+WDjwF7YVTbgZO7ox8A+u2g2iMS8HrDNDoQUCJuJ/UyxLsglP3gQ56hZ9c7wIQ== X-Received: by 2002:a05:6808:3c9b:b0:3bd:a9f5:f5d4 with SMTP id gs27-20020a0568083c9b00b003bda9f5f5d4mr1465474oib.70.1706077261746; Tue, 23 Jan 2024 22:21:01 -0800 (PST) Original-Received: from smtpclient.apple (172-117-161-177.res.spectrum.com. [172.117.161.177]) by smtp.gmail.com with ESMTPSA id jw41-20020a056a0092a900b006dd815b57c3sm2099383pfb.31.2024.01.23.22.21.00 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 Jan 2024 22:21:01 -0800 (PST) In-Reply-To: <83bk9frozh.fsf@gnu.org> X-Mailer: Apple Mail (2.3731.700.6) 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:278763 Archived-At: > On Jan 21, 2024, at 1:54 AM, Eli Zaretskii wrote: >=20 >> 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 >>=20 >> IIUC Stefan=E2=80=99s patch is trying to use xxx-mode to represent = =E2=80=9Cmode for xxx in general=E2=80=9D, 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=E2=80=99s hooks and major mode body, = and this patch would break that, which would bring a lot of confusion. >=20 > 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). >=20 > Moreover, I see no reason to assume FOO-mode runs any mode hook except > FOO-mode-hook. >=20 >> 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=E2=80=99t matter. The point is this is just a symbol = and doesn=E2=80=99t have hooks and other implicit things a major mode = have. It=E2=80=99s 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=E2=80=99t seem to come out of = nowhere. >=20 > 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. >=20 > 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. Ok, I can see that. I don=E2=80=99t have anything else to add. Yuan=