From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Daniel Fleischer Newsgroups: gmane.emacs.devel Subject: Re: Should yaml-ts-mode inherit from prog-mode? Date: Tue, 28 Feb 2023 19:56:01 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34952"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) To: emacs-devel@gnu.org Cancel-Lock: sha1:g28aodhDR1bw58GJd/30xapvyOo= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Feb 28 19:15:15 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 1pX4VO-0008zR-Tp for ged-emacs-devel@m.gmane-mx.org; Tue, 28 Feb 2023 19:15:14 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pX4Uu-000809-Ts; Tue, 28 Feb 2023 13:14:46 -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 1pX4D1-0005O1-EB for emacs-devel@gnu.org; Tue, 28 Feb 2023 12:56:15 -0500 Original-Received: from ciao.gmane.io ([116.202.254.214]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pX4Cz-0004fj-Ad for emacs-devel@gnu.org; Tue, 28 Feb 2023 12:56:14 -0500 Original-Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1pX4Cr-0004gz-SM for emacs-devel@gnu.org; Tue, 28 Feb 2023 18:56:05 +0100 X-Injected-Via-Gmane: http://gmane.org/ Received-SPF: pass client-ip=116.202.254.214; envelope-from=ged-emacs-devel@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: 5 X-Spam_score: 0.5 X-Spam_bar: / X-Spam_report: (0.5 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, NML_ADSP_CUSTOM_MED=0.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Tue, 28 Feb 2023 13:14:42 -0500 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:303863 Archived-At: Romanos Skiadas writes: > I was using yaml-ts-mode in Emacs 30, and to my surprise I found it inherits from text-mode. > > 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! I think yaml doesn't look at all like a programming language. There are no keywords, only free text. The bash scripts you mention are defined in terms of a multi line string but these strings can contain anything, not just code snippets. There's no need for parenthesis or oven quotation marks, it's very lax. It looks much more like free text than a structured language. -- Daniel Fleischer