From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Matthias Meulien Newsgroups: gmane.emacs.devel Subject: Re: Should yaml-ts-mode inherit from prog-mode? Date: Wed, 1 Mar 2023 08:46:26 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000826c3b05f5d1e9a5" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16386"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Romanos Skiadas Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Mar 01 08:47:32 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 1pXHBT-000477-N3 for ged-emacs-devel@m.gmane-mx.org; Wed, 01 Mar 2023 08:47:31 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pXHAm-0003Ai-AX; Wed, 01 Mar 2023 02:46:48 -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 1pXHAg-0003AI-MT for emacs-devel@gnu.org; Wed, 01 Mar 2023 02:46:43 -0500 Original-Received: from mail-ed1-x52f.google.com ([2a00:1450:4864:20::52f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pXHAe-0006O2-Ex for emacs-devel@gnu.org; Wed, 01 Mar 2023 02:46:42 -0500 Original-Received: by mail-ed1-x52f.google.com with SMTP id da10so50288894edb.3 for ; Tue, 28 Feb 2023 23:46:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1677656798; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=WVzb3y/qLoSxVk7Dg56EylTTrFLbqoqt+27Z+h8cdEw=; b=F4pIZcCNqxN1rtGE4CJIxMEBOfHgKJfgCrvSjl+9M2qdTgtOq1f324heFcHkSXan3S Mdu7ALf5GVt2CSjtzdH63x8GsSwrM0HNHz4mQGDXxGcGDuLAInZJkZSn1r1HE+QNjnap nQSyNkua+TMiqOo1JlN+fWLqvFMYaQzZczmgrq111hrYGf41Nu3B0lr4qvEsd/Bf5qwx CUBCsuitfigQbeiFGeaSOhAGuiGctpxBZ/lr6UwdNUEDcOdPXSJOTNwWwj0DSKn+gTpg +DjAj0eAYyJPw76XReUJk6kKLf38hgN0H8fIPqYLQtJA9lSjugQv/eqNf4KjYSNDaqfz Q0Ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677656798; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=WVzb3y/qLoSxVk7Dg56EylTTrFLbqoqt+27Z+h8cdEw=; b=laVkAUui3dStar6r5OGLb6ZeA8BIT916Sk84oYPQikxwYg4gR8S0MVbyjpoCZimIU2 eCRu8x7wuShR1a+v/VFk+ZBMUkpqMWRdKyF9/zaQB5POiCdKyaDymVJMa2R0YO/C7fBa O98p/m5+zS9w/1kq0WtMHjDbG3YLdI/TS34mseu8xYOQLl5K4cILgeHkR+3uQV01MCOO L8nPq/4GbzMr+g9/tvW58bl0jyypl/J2y/C2awO2WMd4UaLhFkkk8wfLtmFvKVolXBGT W6YOrcKEjJ44VEw2H5u5mYazgA2v+2qIVYaouB/O+0FYxYYxWTzaYlVM7tk1g9jsaMzD CtDw== X-Gm-Message-State: AO0yUKUzGI+Hx/UDrB9whl5arHm9H7fTHU5z/Ueh5xpH2DDWvRQeqnap ZOpgDtxtlJgO5WIRCy7rDMJ3Ud8AO5qDinybufP+qAyqwws= X-Google-Smtp-Source: AK7set8Zp/Oz7ZNCqjhca9V4+UdArK/Fbu0psPGzZFT4gIYJA8Nu8euoofflcc5+zCpeu11bS+Mia7VWmcnpwN9gxbY= X-Received: by 2002:a05:6402:ea2:b0:4af:6e08:30c with SMTP id h34-20020a0564020ea200b004af6e08030cmr4364749eda.4.1677656798160; Tue, 28 Feb 2023 23:46:38 -0800 (PST) In-Reply-To: Received-SPF: pass client-ip=2a00:1450:4864:20::52f; envelope-from=orontee@gmail.com; helo=mail-ed1-x52f.google.com 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, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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:303872 Archived-At: --000000000000826c3b05f5d1e9a5 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable YAML is a data serialization format. Like JSON. As a user of ELPA's yaml-mode, I was surprised too it isn't coherent with lisp-data-mode, js-json-mode, json-ts-mode who all inherit from prog-mode. And I had to disable the input method I usually enable in text mode buffers, re-enable flymake and my shortcut for flymake-show-diagnostics-buffer... Since yaml-ts-mode is new it'd be a good thing to be coherent. But thinking twice is there any concrete gains of inheriting from prog-mode rather than text-mode for the end-user? Don't we already face that dilemna with nxml since XML is used to serialize data? Le mar. 28 f=C3=A9vr. 2023 =C3=A0 15:14, Romanos Skiadas a =C3=A9crit : > Hello, > > I was using yaml-ts-mode in Emacs 30, and to my surprise I found it > inherits from text-mode. > > Now, a case can be made for that for sure. The existing rather widely use= d > 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 jump= s > 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 > personally 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? > > Best, > rski > > > > --=20 Matthias --000000000000826c3b05f5d1e9a5 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
YAML is a data serialization format. Like JSON.
=

As a user of ELPA's yaml-mode, I was surprised too = it isn't coherent with lisp-data-mode, js-json-mode, json-ts-mode who a= ll inherit from prog-mode. And I had to disable the input method I usually = enable in text mode buffers, re-enable flymake and my shortcut for flymake= -show-diagnostics-buffer...

Since yaml-ts-mode= is new it'd be a good thing to be coherent.

B= ut thinking twice is there any concrete gains of inheriting from prog-mode = rather than text-mode for the end-user?
Don't we already face= that dilemna with nxml since XML is used to serialize data?
=

Le=C2=A0mar. 28 f=C3=A9vr. 2023 =C3=A0=C2=A015:14, Romanos Skiada= s <rom.skiad@gmail.com> a = =C3=A9crit=C2=A0:
Hello,

I was using yaml-ts= -mode in Emacs 30, and to my surprise I found it inherits from text-mode.

Now, a case can be made for that for sure. The exis= ting rather widely used mode uses text-mode, although that seems like an ar= bitrary decision by a single maintainer:
(I'm not sure Emacs maintainers are beholden to a decis= ion made some jumps away and whether this is a strong enough argument to ke= ep yaml-ts-mode as is.)

However, and here is where= things kind of break down a bit: I would personally argue that YAML has a = code feel to it, what with all the bash scripts that end up in it. Personal= ly, I feel that YAML is more of a prog language than JSON (whatever that me= ans), 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?

Best,
rski




--
Matthias
--000000000000826c3b05f5d1e9a5--