unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Andreas Röhler" <andreas.roehler@easy-emacs.de>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 54499@debbugs.gnu.org
Subject: bug#54499: 28.0.92; strange indentation in shell function
Date: Mon, 21 Mar 2022 18:16:50 +0100	[thread overview]
Message-ID: <5b38a938-261d-39ab-5ca3-c4a63b8c1e21@easy-emacs.de> (raw)
In-Reply-To: <87a6djs05b.fsf@gnus.org>


Am 21.03.22 um 18:09 schrieb Lars Ingebrigtsen:
> Andreas Röhler <andreas.roehler@easy-emacs.de> writes:
>
>> When editing a shell-function with cursor behind "batch \" -- see code
>> below -- RET inserts a newline and indents onto a strange big amount.
>>
>> It inserts 2 TABs followed by 4 spaces so "--eval" is at colon with "-p".
>>
>> Soo also attached foo1.png. BWT whitespace-mode is hardly readable
>> from emacs -Q
>>
>> ------
>> #!/bin/sh
>>
>> foo1() { date; time -p emacs -Q -L . --batch \
>>                                 --eval "(message (emacs-version))"
>> }
>>
>> foo1
>> ------
> Your message had odd whitespace, but I think we're seeing the same thing:
>
>
> foo1() { date; time -p emacs -Q -L . --batch \
> 		    --eval "(message (emacs-version))"
> }
>
>
> And that looks like the correct indentation to me?  That is, we indent
> after the "time" on the previous line.
>
> What indentation did you expect to get?
>
I'd prefer no indentation at all here.

foo1() { date; time -p emacs -Q -L . --batch \
--eval "(message (emacs-version))"
}

Beside: Why indent after "time"? Why not line up with "date"?

foo1() { date; time -p emacs -Q -L . --batch \
          --eval "(message (emacs-version))"
}







  reply	other threads:[~2022-03-21 17:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-21 14:29 bug#54499: 28.0.92; strange indentation in shell function Andreas Röhler
2022-03-21 17:09 ` Lars Ingebrigtsen
2022-03-21 17:16   ` Andreas Röhler [this message]
2022-03-21 17:27     ` Lars Ingebrigtsen
2022-03-21 18:24       ` Andreas Röhler
2022-03-21 18:32         ` Lars Ingebrigtsen

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=5b38a938-261d-39ab-5ca3-c4a63b8c1e21@easy-emacs.de \
    --to=andreas.roehler@easy-emacs.de \
    --cc=54499@debbugs.gnu.org \
    --cc=larsi@gnus.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).