From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ongaro Newsgroups: gmane.emacs.devel Subject: Re: Should yaml-ts-mode inherit from prog-mode? Date: Sat, 11 Mar 2023 18:14:15 -0800 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="26766"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: emacs-devel@gnu.org To: Daniel Fleischer Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Mar 12 03:15:13 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 1pbBEv-0006pr-7y for ged-emacs-devel@m.gmane-mx.org; Sun, 12 Mar 2023 03:15:13 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pbBEG-00015w-Tv; Sat, 11 Mar 2023 21:14:32 -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 1pbBEF-00015o-Nz for emacs-devel@gnu.org; Sat, 11 Mar 2023 21:14:31 -0500 Original-Received: from longisland.snafu.de ([2001:1560:3:255::153]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pbBED-0002oo-Nf for emacs-devel@gnu.org; Sat, 11 Mar 2023 21:14:31 -0500 Original-X-Trace: 507c64617669642e6f6e6761726f4068616d627572672e64657c33342e3231312e 37342e387c3170624245342d3030303545762d4e617c31363738353837323631 Original-Received: from longisland.snafu.de ([10.153.10.15] helo=localhost) by longisland.snafu.de with esmtpsa (Exim 4.94.2) id 1pbBE4-0005Ev-Na; Sun, 12 Mar 2023 03:14:22 +0100 In-Reply-To: (Daniel Fleischer's message of "Tue, 28 Feb 2023 19:56:01 +0200") X-VISP-ShouldScan: 1 X-VISP-Virus-Check: clean X-VISP-Spam-Score: -0.5 (/) X-VISP-Spam-Report: This message has been scanned on "longisland.snafu.de" to identify if it is considered spam or not. Contact the support hotline for details. Content analysis details: (-0.5 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.5 JMQ_SPF_NEUTRAL ASKDNS: SPF set to ?all [hamburg.de TXT:v=spf1 include:_spf1.snafu.de] [include:spf.crsend.com ?all] -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP 0.0 KAM_DMARC_STATUS Test Rule for DKIM or SPF Failure with Strict Alignment 0.0 KAM_SHORT Use of a URL Shortener for very short URL X-VISP-Spam-Max-Score: +++++ X-SA-Exim-Connect-IP: 34.211.74.8 X-SA-Exim-Mail-From: david.ongaro@hamburg.de X-SA-Exim-Scanned: No (on longisland.snafu.de); SAEximRunCond expanded to false Received-SPF: pass client-ip=2001:1560:3:255::153; envelope-from=david.ongaro@hamburg.de; helo=longisland.snafu.de X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, 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:304345 Archived-At: Daniel Fleischer writes: > I think yaml doesn't look at all like a programming language. There are > no keywords, only free text. If something is considered a "programming language" isn't defined by whether it has keywords. But we can ignore that, since yaml has quite a few keywords (e.g. see yaml-font-lock-keywords or others which are not even implemented in the current yaml-mode, like explicit tags (https://yaml.org/spec/1.2.2/#example-various-explicit-tags)). > There's no need for parenthesis or oven quotation marks, it's very > lax. Also not true. If you happen to use some of the keywords like "yes", you have to mind to quote it if you actually meant the string "yes" not a boolean value of true. Of course that is exactly where having a mode which highlights these keywords helps. > It looks much more like free text than a structured language. It has a pretty strict specification, but it's true that some implementations may be lax. In any case, I'm not arguing that YAML is a "programming" language. But it's definitely not free-form text. And if there is no viable alternative between text-mode and prod-mode than it should be prog-mode.