all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#3226: here-document syntax inference and completion is broken
@ 2009-08-16 14:09 Chong Yidong
  2016-01-26  5:15 ` Andrew Hyatt
  0 siblings, 1 reply; 14+ messages in thread
From: Chong Yidong @ 2009-08-16 14:09 UTC (permalink / raw)
  To: Paul Nienaber; +Cc: 3226

> Cook yourself up a bash script and type a line of code like:
> for i in $(/bin/vim <<
>
> 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.  This should only respond to things ending in, for example
>"<< " or possibly "<<E", but certainly NOT just "<<".
>
> Further, emacs does something outright wrong: An attempt to fix the
>situation by inserting another '<' between the "<<" and "EOF" +results
>in ANOTHER pair of "EOF" being inserted in a syntactically invalid way.

I fixed the second problem, but I don't see any easy way to solve the
first one.

(The difficulty of fixing the first bug is illustrative of the problems
with individual major modes rolling their own "electric" completion
facilities.  It might be nice to have a minor mode that provides a
unified framework for this kind of functionality; which may also need
built-in support.)





^ permalink raw reply	[flat|nested] 14+ messages in thread
* bug#3226: here-document syntax inference and completion is broken
@ 2009-05-05 22:15 Paul Nienaber
  2009-05-06  3:36 ` Stefan Monnier
  0 siblings, 1 reply; 14+ messages in thread
From: Paul Nienaber @ 2009-05-05 22:15 UTC (permalink / raw)
  To: bug-gnu-emacs

Steps to reproduce:

Cook yourself up a bash script and type a line of code like:
for i in $(/bin/vim <<

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.  This should only respond to things 
ending in, for example "<< " or
possibly "<<E", but certainly NOT just "<<".  Further, emacs does 
something outright wrong:  An attempt to fix the situation by inserting 
another '<' between the "<<" and "EOF" +results in ANOTHER pair of "EOF" 
being inserted in a syntactically invalid way.


~Paul Nienaber








^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2019-10-16 12:43 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-16 14:09 bug#3226: here-document syntax inference and completion is broken Chong Yidong
2016-01-26  5:15 ` Andrew Hyatt
2016-02-14 14:44   ` Philipp Stephani
2016-03-27 19:56     ` Mark Oteiza
2016-03-27 22:43       ` Stefan Monnier
2016-04-16 18:49         ` Mark Oteiza
  -- strict thread matches above, loose matches on Subject: below --
2009-05-05 22:15 Paul Nienaber
2009-05-06  3:36 ` Stefan Monnier
2019-10-11 19:38   ` Lars Ingebrigtsen
2019-10-15 22:09     ` Paul Nienaber
2019-10-16  1:40       ` Lars Ingebrigtsen
2019-10-16  6:04         ` Paul Nienaber
2019-10-16  7:20           ` Lars Ingebrigtsen
2019-10-16 12:43         ` Stefan Monnier

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.