GNU bug report logs - #54499
28.0.92; strange indentation in shell function

Previous Next

Package: emacs;

Reported by: Andreas Röhler <andreas.roehler <at> easy-emacs.de>

Date: Mon, 21 Mar 2022 14:30:02 UTC

Severity: minor

Tags: moreinfo, notabug

Found in version 28.0.92

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #13 received at 54499 <at> debbugs.gnu.org (full text, mbox):

From: Andreas Röhler <andreas.roehler <at> easy-emacs.de>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 54499 <at> debbugs.gnu.org
Subject: Re: bug#54499: 28.0.92; strange indentation in shell function
Date: Mon, 21 Mar 2022 18:16:50 +0100
Am 21.03.22 um 18:09 schrieb Lars Ingebrigtsen:
> Andreas Röhler <andreas.roehler <at> 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))"
}






This bug report was last modified 3 years and 123 days ago.

Previous Next


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