unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "積丹尼 Dan Jacobson" <jidanni@jidanni.org>
To: 48193@debbugs.gnu.org
Subject: bug#48193: Youngsters in charge of emacs vs. basic Bourne shell "for" statement
Date: Mon, 03 May 2021 22:48:16 +0800	[thread overview]
Message-ID: <87wnsfg9fz.5.fsf@jidanni.org> (raw)

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





             reply	other threads:[~2021-05-03 14:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-03 14:48 積丹尼 Dan Jacobson [this message]
2021-05-03 15:22 ` bug#48193: Youngsters in charge of emacs vs. basic Bourne shell "for" statement Gregory Heytings
2021-05-03 15:27   ` Glenn Morris
2021-05-03 15:38   ` 積丹尼 Dan Jacobson
2021-05-03 17:13     ` Gregory Heytings
2021-05-04 18:26       ` 積丹尼 Dan Jacobson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wnsfg9fz.5.fsf@jidanni.org \
    --to=jidanni@jidanni.org \
    --cc=48193@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).