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 #37 received at 3226 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: Paul Nienaber <phox <at> phox.ca>, 3226 <at> debbugs.gnu.org
Subject: Re: bug#3226: here-document syntax inference and completion is broken
Date: Fri, 11 Oct 2019 21:38:11 +0200
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

>> A default emacs install will complete with "EOF\n\nEOF" (in a more
>> clever fashion so the rest of the line is undisturbed), and place the
>> cursor on the new blank line.  This is incorrect behaviour, as it
>> breaks entry of BASH here-strings when the user's intent is
>> still ambiguous.
>
> Thanks for your report.  Indeed, sh-mode does not know about
> here-strings at all.  I guess waiting for "<<[^<]" is a good idea.
> Patches welcome for Emacs-23.2.

I've now made it look for a space after the << -- that feels more
natural than << and then some arbitrary character.  And as far as I can
tell, all the shells handle

foo <<EOF
EOF

and

foo << EOF
EOF

identically. 

-- 
(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.