From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Randy Taylor Newsgroups: gmane.emacs.devel Subject: Re: Should yaml-ts-mode inherit from prog-mode? Date: Wed, 01 Mar 2023 14:08:52 +0000 Message-ID: References: <87r0u9wzwl.fsf@tcd.ie> Mime-Version: 1.0 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="32050"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Romanos Skiadas , emacs-devel@gnu.org To: Basil Contovounesios Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Mar 01 15:10:33 2023 Return-path: Envelope-to: ged-emacs-devel@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 1pXNA7-00084a-Rz for ged-emacs-devel@m.gmane-mx.org; Wed, 01 Mar 2023 15:10:32 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pXN8p-0005qs-6r; Wed, 01 Mar 2023 09:09:11 -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 1pXN8k-0005V4-To for emacs-devel@gnu.org; Wed, 01 Mar 2023 09:09:07 -0500 Original-Received: from mail-4323.proton.ch ([185.70.43.23]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pXN8i-00063q-2E for emacs-devel@gnu.org; Wed, 01 Mar 2023 09:09:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rjt.dev; s=protonmail2; t=1677679738; x=1677938938; bh=vsZwrNbGLZ4pWS5KH1DOz2ma1izVxc85+7QSsGT573I=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=H7Rqu8qic/6X5oU2aDx39s1sGbEWT0M1KOXQP7vLFl3dADvehn9ZBj1BMIjiqGJGq jb4sR2Mw7hJFM6dJ8phoqdkR5iT0HIPCpkP1QSBTACHru8JVOZj9eU0dHK1jAGbJWa xlseG9A+uzWRGG0MAllceXDi52i68/Y7Pr7UQVyazVtEui15h5Kj+iAGwbwgZUcajb dXj7g6pC2Ar9yb732iatH0pDbLEG6Bl7hOJIJRQOz+5MEeCmln8uC6GpvbaGjtjzCB B4cDsnyP4W0x4eMbOOExl6hEU8eBMKshNkIAYt3YynMcpLe5c9XyDQoJSsde10pEDh 4to3Abmfr/JIA== In-Reply-To: <87r0u9wzwl.fsf@tcd.ie> Feedback-ID: 44397038:user:proton Received-SPF: pass client-ip=185.70.43.23; envelope-from=dev@rjt.dev; helo=mail-4323.proton.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:303877 Archived-At: On Tuesday, February 28th, 2023 at 10:52, Basil Contovounesios wrote: > Romanos Skiadas [2023-02-28 14:24 +0200] wrote: > > > I was using yaml-ts-mode in Emacs 30, and to my surprise I found it inh= erits from text-mode. > > > > Now, a case can be made for that for sure. The existing rather widely u= sed mode uses text-mode, although that seems like an arbitrary > > decision by a single maintainer: > > https://github.com/yoshiki/yaml-mode/issues/17 > > https://github.com/yoshiki/yaml-mode/issues/27 > > https://github.com/yoshiki/yaml-mode/issues/52 > > https://github.com/yoshiki/yaml-mode/pull/85 > > > > (I'm not sure Emacs maintainers are beholden to a decision made some ju= mps away and whether this is a strong enough argument to > > keep yaml-ts-mode as is.) > > > > However, and here is where things kind of break down a bit: I would per= sonally argue that YAML has a code feel to it, what with all the > > bash scripts that end up in it. Personally, I feel that YAML is more of= a prog language than JSON (whatever that means), and according to > > the spec it is a superset of JSON. In fact, the JSON mode shipped with = Emacs inherits from prog-mode! > > > > So, what do people think? Should yaml-ts-mode be changed? > > > [ Copying in Randy, yaml-ts-mode's author/maintainer. ] Thanks. > > FWIW, my vote is for treating YAML and JSON consistently: if all three > JSON modes in Emacs and GNU ELPA are prog-modes, then so should > yaml-ts-mode; or if yaml-ts-mode is a text-mode, then so should all > three JSON modes. > > I suspect most of that ship if not the entire thing has already sailed, > especially in the case of the more established json-mode, but there's > always hope ;). > > Thanks, > > -- > Basil I think the JSON modes are prog-modes just because they are attached to the= javascript modes in some way (usually derived from it). I'm not sure how m= uch weight we can assign to certain modes deriving from other modes and say= ing we should do the same (especially in the case of ELPA/MELPA modes); ins= tead we should ask which mode makes the most sense to derive from. Although= there is the argument for consistency that you mentioned... Deriving from prog-mode feels weird since YAML is not a programming languag= e. A lot of people (per OP's linked GitHub issues) seem to think/expect it to = derive from prog-mode, but I'm not sure how correct those assumptions are. = It seems they just want their prog-mode hooks to work with it. If everyone thinks it should derive from prog-mode and there are no bad con= sequences for doing so, then I'm not against it. Do any Emacs maintainers have any thoughts on the matter?