GNU bug report logs - #18380
24.3.93; sh-script multiline quoted subshell wreaks havoc with indentation

Previous Next

Package: emacs;

Reported by: Carlos Pita <carlosjosepita <at> gmail.com>

Date: Mon, 1 Sep 2014 14:31:01 UTC

Severity: minor

Found in version 24.3.93

Done: Stefan Kangas <stefan <at> marxist.se>

Bug is archived. No further changes may be made.

Full log


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

From: Stefan Kangas <stefan <at> marxist.se>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: occitan <at> esperanto.org, Carlos Pita <carlosjosepita <at> gmail.com>,
 18380-done <at> debbugs.gnu.org
Subject: Re: bug#18380: 24.3.93; sh-script multiline quoted subshell wreaks
 havoc with indentation
Date: Mon, 30 Sep 2019 04:54:33 +0200
Stefan Monnier <monnier <at> IRO.UMontreal.CA> writes:

>> This will see the { as quoted:
>> "$(echo  "{")"
>>
>> while this will not:
>>
>> "$(echo
>>    "{")"
>
> Actually, it depends: sometimes it will sometimes it won't :-(
>
>> after this line indentation is broken as Emacs thinks there is an
>> unclosed open brace.
>>
>> The problem with multiline quoted subshells is more general, as
>> remarked by this comment in sh-script.el:
>>
>>   ;; FIXME: This can (and often does) match multiple lines, yet it makes no
>>   ;; effort to handle multiline cases correctly, so it ends up being
>>   ;; rather flaky.
>
> Indeed, the problem you show is the direct result of the problem alluded
> to in the above comment.  I installed the patch below which seems to help.

I can't reproduce the original problem on current master.

Since there also has been no further updates here in 5 years, I'm going
to close this bug report.  If any of this is still an issue, please
reopen the bug report.

Best regards,
Stefan Kangas




This bug report was last modified 5 years and 319 days ago.

Previous Next


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