From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson Newsgroups: gmane.emacs.bugs Subject: bug#48193: Youngsters in charge of emacs vs. basic Bourne shell "for" statement Date: Mon, 03 May 2021 22:48:16 +0800 Message-ID: <87wnsfg9fz.5.fsf@jidanni.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26112"; mail-complaints-to="usenet@ciao.gmane.io" To: 48193@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon May 03 17:08:53 2021 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 1ldaBo-0006fu-CF for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 03 May 2021 17:08:52 +0200 Original-Received: from localhost ([::1]:51770 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ldaBn-0003m6-G4 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 03 May 2021 11:08:51 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42634) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ldaB0-0002tZ-UY for bug-gnu-emacs@gnu.org; Mon, 03 May 2021 11:08:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:35321) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ldaB0-00041M-LO for bug-gnu-emacs@gnu.org; Mon, 03 May 2021 11:08:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ldaB0-0005dZ-FO for bug-gnu-emacs@gnu.org; Mon, 03 May 2021 11:08:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 03 May 2021 15:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 48193 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.162005447321661 (code B ref -1); Mon, 03 May 2021 15:08:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 3 May 2021 15:07:53 +0000 Original-Received: from localhost ([127.0.0.1]:46867 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ldaAr-0005dJ-Dd for submit@debbugs.gnu.org; Mon, 03 May 2021 11:07:53 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:50358) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ldaAp-0005dD-SO for submit@debbugs.gnu.org; Mon, 03 May 2021 11:07:52 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42618) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ldaAp-0002WH-ND for bug-gnu-emacs@gnu.org; Mon, 03 May 2021 11:07:51 -0400 Original-Received: from dog.birch.relay.mailchannels.net ([23.83.209.48]:5701) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ldaAn-0003u9-7t for bug-gnu-emacs@gnu.org; Mon, 03 May 2021 11:07:51 -0400 X-Sender-Id: dreamhost|x-authsender|jidanni@jidanni.org Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 4D5D310321A for ; Mon, 3 May 2021 15:00:00 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a61.g.dreamhost.com (100-96-16-56.trex.outbound.svc.cluster.local [100.96.16.56]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id AE7031030F8 for ; Mon, 3 May 2021 14:59:58 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jidanni@jidanni.org Original-Received: from pdx1-sub0-mail-a61.g.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384) by 100.96.16.56 (trex/6.2.1); Mon, 03 May 2021 15:00:00 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jidanni@jidanni.org X-MailChannels-Auth-Id: dreamhost X-Towering-Irritate: 62d837a264c2b142_1620053999937_1428016340 X-MC-Loop-Signature: 1620053999936:514377068 X-MC-Ingress-Time: 1620053999936 Original-Received: from pdx1-sub0-mail-a61.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a61.g.dreamhost.com (Postfix) with ESMTP id 6B50986C5F for ; Mon, 3 May 2021 07:59:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=jidanni.org; h=from:to :subject:date:message-id:mime-version:content-type; s= jidanni.org; bh=HnwVjx50Y8aAiLmPJnisbVkWty4=; b=jKp86AydgeqK44B3 BvYrnFeOVoMY1e+UB1wZ5Ac0h2Dn1HaTHGNKpEkiSlm0nDm7d5ViqMtzCx8NVBJv C+mtwln5kOhmyms0XUPrS8LZNlF3+UGVoWQE8N9gNyehMleZgQJfJhOGZqp16QzB d69fzf52SWWmXUEdbY3mRmuBaFM= Original-Received: from jidanni.org (114-41-23-222.dynamic-ip.hinet.net [114.41.23.222]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jidanni@jidanni.org) by pdx1-sub0-mail-a61.g.dreamhost.com (Postfix) with ESMTPSA id EEEE87E45E for ; Mon, 3 May 2021 07:59:57 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a61 Received-SPF: pass client-ip=23.83.209.48; envelope-from=jidanni@jidanni.org; helo=dog.birch.relay.mailchannels.net 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_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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" Xref: news.gmane.io gmane.emacs.bugs:205519 Archived-At: for i do true done : This line and the whole rest of the program misindented because emacs shallow knowlege of shell grammar. : Test with TAB. Emacs only knows about: for i do true done : If this was python, well, you would have to have the language change to accomidate emacs. : Also if we are colaborating on a big project we cannot just rip up line of other peoples code so : they are not misindeted for only us. : Yes, some emacs programmers do not know shell grammar and just assume... indeed the word "do" on the : first line is not even in a different color. But the word in right here in this line is! Three times! : Hmmm, [including this part of] the sh language is, maybe 50 years : old. Not something checkbashisms --extra --force --posix has an issue with. It is part : of sh, bash, dash, ksh, ... : I.e., not something invented before emacs... : What could be even older? Well, sh must have been written in C... : Yes, I reported this before. But it was closed by programmers who : do not know basic Bourne shell "for" statement grammar. : emacs-version "27.1" Indeed, I was just reading in RISKS Digest, > https://www.wired.com/story/ai-latest-trick-writing-computer-code/ > What fun -- being second-guessed in real time by software that doesn't > understand my code...