all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Kai Grossjohann <kai@emptydomain.de>
Subject: Re: Korn Shell Script Strangeness
Date: Sun, 22 Feb 2004 18:04:36 +0100	[thread overview]
Message-ID: <87n07bvye3.fsf@emptyhost.emptydomain.de> (raw)
In-Reply-To: 7f477f72.0402211224.eb14eaa@posting.google.com

tennis_smith@yahoo.com (Tennis Smith) writes:

> So, I'm wondering how to make that happen.  The "ed" code is the only
> thing in the whole file that simply won't indent when I do an
> "indent-region".  How can I make this conform to some sort of uniform
> formatting?

Imagine you do

    cat > /tmp/foo <<EOF
foo
bar
EOF

The cat line is indented because of a surrounding if, or something.
Further imagine you reindent and then Emacs changes this to

    cat > /tmp/foo <<EOF
    foo
    bar
    EOF

Then you'll see two things happening.  The first is that the file
contents of /tmp/foo have suddenly changed -- it contains eight spaces
more than it used to.

Secondly, it might happen that the shell script doesn't run at all
because the shell is looking for "EOF" at the beginning of a line.
But I'm not sure about this, and I'm too lazy to check at the moment.

I'm happy that Emacs does not indent the here documents.

Kai

      reply	other threads:[~2004-02-22 17:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-21 20:24 Korn Shell Script Strangeness Tennis Smith
2004-02-22 17:04 ` Kai Grossjohann [this message]

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

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

  git send-email \
    --in-reply-to=87n07bvye3.fsf@emptyhost.emptydomain.de \
    --to=kai@emptydomain.de \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.