GNU bug report logs - #48193
Youngsters in charge of emacs vs. basic Bourne shell "for" statement

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: minor; Reported by: 積丹尼 Dan Jacobson <jidanni@HIDDEN>; Keywords: confirmed; merged with #2910, #21244, #26217, #30170, #46093; dated Mon, 3 May 2021 15:08:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 48193 <at> debbugs.gnu.org:


Received: (at 48193) by debbugs.gnu.org; 3 May 2021 17:13:16 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 03 13:13:16 2021
Received: from localhost ([127.0.0.1]:47617 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ldc8C-0000sw-6U
	for submit <at> debbugs.gnu.org; Mon, 03 May 2021 13:13:16 -0400
Received: from heytings.org ([95.142.160.155]:35958)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <gregory@HIDDEN>) id 1ldc8A-0000sq-Un
 for 48193 <at> debbugs.gnu.org; Mon, 03 May 2021 13:13:15 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org;
 s=20210101; t=1620061993;
 bh=sK/2ZIj+uEYBeMPkWj8PCYQqwVXKjVjtaprsmRlk8A8=;
 h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From;
 b=I0+ooGZHL44lv3wxi6nyhSXk7RHJrGv7AYtvvLy/YGt084bjYQ1cu27OcHskUhhaF
 gHinqyZZQOFpLdKCniVui7PcfJoHpjE+dy/JUPCvsNwKi3+RsWR9kJQAiu6S++UXuo
 9fthNj3hTKfmLD10V2MG9LNIG/gP7lltpkMYBLdK4GkX3K9Of8WQF688i4w/L/UBM2
 p3+a+R1tGWeHnLSOJAhKqv+a2lrTuV6lRQTunaw9UmrfYveulGN8ktfE/XrBKzRWt4
 EnLIBgX7Ij04grP7eFDviolX4iOhyEw/66OsPHBd4k2cuhEdIy4D0nR/FZls+05E8r
 OI4W8jIWJ4cRw==
Date: Mon, 03 May 2021 17:13:12 +0000
From: Gregory Heytings <gregory@HIDDEN>
To: =?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC_Dan_Jacobson?= <jidanni@HIDDEN>
Subject: Re: bug#48193: Youngsters in charge of emacs vs. basic Bourne shell
 "for" statement
In-Reply-To: <87v97zesjj.5.fsf@HIDDEN>
Message-ID: <a4dfe72ae243acad3980@HIDDEN>
References: <87wnsfg9fz.5.fsf@HIDDEN> <a4dfe72ae2c7d8247790@HIDDEN>
 <87v97zesjj.5.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; format=flowed; charset=us-ascii
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 48193
Cc: 48193 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


>
> $ man bash
> SHELL GRAMMAR
> for name [ [ in [ word ... ] ] ; ] do list ; done
>

So what?  Of course it it's not feasible to embed a complete Bourne shell 
interpreter (or for that matter the interpreter of any language) in Emacs 
to cope with every possible exotic construct of that language.  I note 
that

for i
do
     true
done

and

for i; do
     true
done

are both indented as you expect.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#48193; Package emacs. Full text available.

Message received at 48193 <at> debbugs.gnu.org:


Received: (at 48193) by debbugs.gnu.org; 3 May 2021 15:38:49 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 03 11:38:49 2021
Received: from localhost ([127.0.0.1]:47055 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ldaen-0008BL-7S
	for submit <at> debbugs.gnu.org; Mon, 03 May 2021 11:38:49 -0400
Received: from crocodile.elm.relay.mailchannels.net ([23.83.212.45]:61929)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <jidanni@HIDDEN>) id 1ldael-0008BF-KN
 for 48193 <at> debbugs.gnu.org; Mon, 03 May 2021 11:38:48 -0400
X-Sender-Id: dreamhost|x-authsender|jidanni@HIDDEN
Received: from relay.mailchannels.net (localhost [127.0.0.1])
 by relay.mailchannels.net (Postfix) with ESMTP id 309C9323773;
 Mon,  3 May 2021 15:38:46 +0000 (UTC)
Received: from pdx1-sub0-mail-a61.g.dreamhost.com
 (100-96-27-184.trex.outbound.svc.cluster.local [100.96.27.184])
 (Authenticated sender: dreamhost)
 by relay.mailchannels.net (Postfix) with ESMTPA id E4651323877;
 Mon,  3 May 2021 15:38:45 +0000 (UTC)
X-Sender-Id: dreamhost|x-authsender|jidanni@HIDDEN
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.27.184 (trex/6.2.1); Mon, 03 May 2021 15:38:46 +0000
X-MC-Relay: Neutral
X-MailChannels-SenderId: dreamhost|x-authsender|jidanni@HIDDEN
X-MailChannels-Auth-Id: dreamhost
X-Slimy-Broad: 0f0937db44bec43d_1620056326002_944430341
X-MC-Loop-Signature: 1620056326002:3425339435
X-MC-Ingress-Time: 1620056326002
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 A0B4986C2F;
 Mon,  3 May 2021 08:38:45 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=jidanni.org; h=from:to:cc
 :subject:references:date:message-id:mime-version:content-type;
 s=jidanni.org; bh=JbHrWtVqtBMUTZTeT8xrBils13E=; b=OAIxbm3qeOON6
 Si0Mo/ZYh3U6j73Mc8XMQT3GKH/SdTxayRCLph9itbZyeRxFBWxVKprJTYYav2qW
 vqUe45gkL+Q5RRigXytsT/bSJ0aV6lDrfH5vLWaBrlJCxUi6f3pEp+B/tcNJycuY
 fhXDa973XZRhNUppzJr/sL+DyH7jYc=
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@HIDDEN)
 by pdx1-sub0-mail-a61.g.dreamhost.com (Postfix) with ESMTPSA id F226080235;
 Mon,  3 May 2021 08:38:44 -0700 (PDT)
X-DH-BACKEND: pdx1-sub0-mail-a61
From: =?utf-8?B?56mN5Li55bC8?= Dan Jacobson <jidanni@HIDDEN>
To: Gregory Heytings <gregory@HIDDEN>
Subject: Re: bug#48193: Youngsters in charge of emacs vs. basic Bourne shell
 "for" statement
References: <87wnsfg9fz.5.fsf@HIDDEN> <a4dfe72ae2c7d8247790@HIDDEN>
Date: Mon, 03 May 2021 23:38:40 +0800
Message-ID: <87v97zesjj.5.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 48193
Cc: 48193 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

$ man bash
SHELL GRAMMAR
for name [ [ in [ word ... ] ] ; ] do list ; done




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#48193; Package emacs. Full text available.

Message received at 48193 <at> debbugs.gnu.org:


Received: (at 48193) by debbugs.gnu.org; 3 May 2021 15:27:50 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 03 11:27:50 2021
Received: from localhost ([127.0.0.1]:46994 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ldaUA-0005sV-B1
	for submit <at> debbugs.gnu.org; Mon, 03 May 2021 11:27:50 -0400
Received: from eggs.gnu.org ([209.51.188.92]:39894)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rgm@HIDDEN>) id 1ldaU7-0005sK-IP
 for 48193 <at> debbugs.gnu.org; Mon, 03 May 2021 11:27:48 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:55809)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <rgm@HIDDEN>)
 id 1ldaU2-0004xP-Br; Mon, 03 May 2021 11:27:42 -0400
Received: from rgm by fencepost.gnu.org with local (Exim 4.82)
 (envelope-from <rgm@HIDDEN>)
 id 1ldaTl-0003eV-Qp; Mon, 03 May 2021 11:27:26 -0400
From: Glenn Morris <rgm@HIDDEN>
To: Gregory Heytings <gregory@HIDDEN>
Subject: Re: bug#48193: Youngsters in charge of emacs vs. basic Bourne shell
 "for" statement
References: <87wnsfg9fz.5.fsf@HIDDEN> <a4dfe72ae2c7d8247790@HIDDEN>
X-Spook: CESID Verisign Spyderco CANSLO THAAD Narcotics computer
X-Ran: i$v#&b`~B=oSqm<FONFAnt=6^XIIP<}j:i/hvxAe#qa&jk=A+%lKO]}p'>[WZLF7|^@M;x
X-Hue: red
X-Attribution: GM
Date: Mon, 03 May 2021 11:27:25 -0400
In-Reply-To: <a4dfe72ae2c7d8247790@HIDDEN> (Gregory Heytings's message
 of "Mon, 03 May 2021 15:22:31 +0000")
Message-ID: <d1czu725ya.fsf@HIDDEN>
User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 48193
Cc: 48193 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)


Duplicate of https://debbugs.gnu.org/26217 (a normal report).
No-one need (or should) read jidanni's claptrap.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#48193; Package emacs. Full text available.

Message received at 48193 <at> debbugs.gnu.org:


Received: (at 48193) by debbugs.gnu.org; 3 May 2021 15:22:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 03 11:22:36 2021
Received: from localhost ([127.0.0.1]:46963 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ldaP5-0005pJ-Qc
	for submit <at> debbugs.gnu.org; Mon, 03 May 2021 11:22:35 -0400
Received: from heytings.org ([95.142.160.155]:35822)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <gregory@HIDDEN>) id 1ldaP3-0005pB-7W
 for 48193 <at> debbugs.gnu.org; Mon, 03 May 2021 11:22:33 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org;
 s=20210101; t=1620055351;
 bh=XCLyeJafirvahNK7zyzB5yJvF079NFsXgKyInrkbALU=;
 h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From;
 b=f/yjyFgGC9W2fy7+LmMT2fAiAH0cN6zHRtwT2MVmGqkE9Iz+Z1EooTLESzw7inNT7
 Q8dEWFE5eUIRXsLONkmnDawySQr091FwCVq9BnOcbsRGv0sIF3nfsGBLAVvN/oIKGZ
 zFg2FcZDWl+xYwWTdHtI6lohP5Ip/PHJO5ttXXiOaUEJeKIfJ8VPgA3nl47iAS0bCQ
 B32R5mZjjr1M0e9GzgWkor1CchE/zvV7za8ncYLVisspIGTV24FU8GUD6BZ4GTvFbb
 kPqMWRMn8uT3lCYL9bA5CTnIfkjfSQq2OD6EkIbzJCxX4jDp19HFQYYPhdEdr3yWvR
 hVRoreLygsp2Q==
Date: Mon, 03 May 2021 15:22:31 +0000
From: Gregory Heytings <gregory@HIDDEN>
To: =?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC_Dan_Jacobson?= <jidanni@HIDDEN>
Subject: Re: bug#48193: Youngsters in charge of emacs vs. basic Bourne shell
 "for" statement
In-Reply-To: <87wnsfg9fz.5.fsf@HIDDEN>
Message-ID: <a4dfe72ae2c7d8247790@HIDDEN>
References: <87wnsfg9fz.5.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 48193
Cc: 48193 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


>
> for i do
>    true
> done
>    : This line and the whole rest of the program misindented because emacs shallow knowlege of shell grammar.
>

for i in a b c; do
     true
done
# This line and the whole rest of the program correctly indented because Jidanni now knows the shell grammar




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#48193; Package emacs. Full text available.
Forcibly Merged 2910 21244 26217 30170 46093 48193. Request was from Glenn Morris <rgm@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 3 May 2021 15:07:53 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 03 11:07:53 2021
Received: from localhost ([127.0.0.1]:46867 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ldaAr-0005dJ-Dd
	for submit <at> debbugs.gnu.org; Mon, 03 May 2021 11:07:53 -0400
Received: from lists.gnu.org ([209.51.188.17]:50358)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <jidanni@HIDDEN>) id 1ldaAp-0005dD-SO
 for submit <at> debbugs.gnu.org; Mon, 03 May 2021 11:07:52 -0400
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 <jidanni@HIDDEN>)
 id 1ldaAp-0002WH-ND
 for bug-gnu-emacs@HIDDEN; Mon, 03 May 2021 11:07:51 -0400
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 <jidanni@HIDDEN>)
 id 1ldaAn-0003u9-7t
 for bug-gnu-emacs@HIDDEN; Mon, 03 May 2021 11:07:51 -0400
X-Sender-Id: dreamhost|x-authsender|jidanni@HIDDEN
Received: from relay.mailchannels.net (localhost [127.0.0.1])
 by relay.mailchannels.net (Postfix) with ESMTP id 4D5D310321A
 for <bug-gnu-emacs@HIDDEN>; Mon,  3 May 2021 15:00:00 +0000 (UTC)
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 <bug-gnu-emacs@HIDDEN>; Mon,  3 May 2021 14:59:58 +0000 (UTC)
X-Sender-Id: dreamhost|x-authsender|jidanni@HIDDEN
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@HIDDEN
X-MailChannels-Auth-Id: dreamhost
X-Towering-Irritate: 62d837a264c2b142_1620053999937_1428016340
X-MC-Loop-Signature: 1620053999936:514377068
X-MC-Ingress-Time: 1620053999936
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 <bug-gnu-emacs@HIDDEN>; 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=
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@HIDDEN)
 by pdx1-sub0-mail-a61.g.dreamhost.com (Postfix) with ESMTPSA id EEEE87E45E
 for <bug-gnu-emacs@HIDDEN>; Mon,  3 May 2021 07:59:57 -0700 (PDT)
X-DH-BACKEND: pdx1-sub0-mail-a61
From: =?utf-8?B?56mN5Li55bC8?= Dan Jacobson <jidanni@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 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@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
Received-SPF: pass client-ip=23.83.209.48; envelope-from=jidanni@HIDDEN;
 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-Spam-Score: -1.4 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.4 (--)

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...




Acknowledgement sent to 積丹尼 Dan Jacobson <jidanni@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#48193; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 3 May 2021 17:15:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.