GNU bug report logs - #3226
[sh-mode] here-document syntax inference and completion is broken

Previous Next

Package: emacs;

Reported by: Paul Nienaber <phox <at> phox.ca>

Date: Tue, 5 May 2009 22:20:05 UTC

Severity: minor

Tags: fixed

Merged with 19929, 43917

Found in version 24.4

Fixed in version 27.1

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

Bug is archived. No further changes may be made.

Full log


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

From: Paul Nienaber <phox <at> phox.ca>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 3226 <at> debbugs.gnu.org, Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: bug#3226: here-document syntax inference and completion is broken
Date: Tue, 15 Oct 2019 23:04:44 -0700
Ah yeah totally fair.

Definitely do cover '<<-' as well (=> '<<-EOF\n\nEOF') for the strip-leading-tabs here-doc behaviour :)

Thanks again.

~Paul

> On Oct 15, 2019, at 18:40, Lars Ingebrigtsen <larsi <at> gnus.org> wrote:
> 
> Paul Nienaber <phox <at> phox.ca> writes:
> 
>> While I use here-strings more than here-docs by a huge margin I would
>> also like to not negatively impact people using the former a lot, so
>> in light of that I'd like to suggest going with Stefan's suggestion,
>> importantly because it's also totally valid to trip on '<<-' and
>> '<<[A-Za-z]', whereas here-strings are always only '<<<'.  Also
>> '<<EOF' is the overwhelmingly more common form that I see vs '<< EOF'.
> 
> The additional wrinkle here is that sh-mode will insert the
> sh-here-document-word when expanding.
> 
> So if the user types <<X, what should that be expanded to?  Just
> appending EOF would be bad, and replacing the X with EOF would be bad,
> and expanding to
> 
> foo <<X
> 
> X
> 
> would be bad, and prompting for what to expand to would be pretty
> pointless, too.
> 
> I guess is "X" is "E", then expanding to
> 
> foo <<EOF
> 
> EOF
> 
> would be nice, though.  I think I'll add that.
> 
> But I didn't see any way to make the <<[^<] thing work in any intuitive
> way.  If anybody has an idea here, I'm all ears.
> 
> -- 
> (domestic pets only, the antidote for overdose, milk.)
>   bloggy blog: http://lars.ingebrigtsen.no




This bug report was last modified 4 years and 280 days ago.

Previous Next


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