From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.bugs Subject: bug#3226: here-document syntax inference and completion is broken Date: Sun, 16 Aug 2009 10:09:08 -0400 Message-ID: <87ab1z26m3.fsf@cyd.mit.edu> Reply-To: Chong Yidong , 3226@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1250432833 4856 80.91.229.12 (16 Aug 2009 14:27:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 16 Aug 2009 14:27:13 +0000 (UTC) Cc: 3226@emacsbugs.donarmstrong.com To: Paul Nienaber Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Aug 16 16:27:05 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1McghL-0007fy-2b for geb-bug-gnu-emacs@m.gmane.org; Sun, 16 Aug 2009 16:27:03 +0200 Original-Received: from localhost ([127.0.0.1]:50612 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1McghK-0006P4-1N for geb-bug-gnu-emacs@m.gmane.org; Sun, 16 Aug 2009 10:27:02 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1McghG-0006OU-7t for bug-gnu-emacs@gnu.org; Sun, 16 Aug 2009 10:26:58 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1McghB-0006Mk-AB for bug-gnu-emacs@gnu.org; Sun, 16 Aug 2009 10:26:57 -0400 Original-Received: from [199.232.76.173] (port=50737 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1McghB-0006Mh-21 for bug-gnu-emacs@gnu.org; Sun, 16 Aug 2009 10:26:53 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:47887) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1McghA-00034X-Gh for bug-gnu-emacs@gnu.org; Sun, 16 Aug 2009 10:26:52 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7GEQoHc030105; Sun, 16 Aug 2009 07:26:50 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n7GEF5Q4028162; Sun, 16 Aug 2009 07:15:05 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Chong Yidong Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sun, 16 Aug 2009 14:15:05 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 3226 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 3226-submit@emacsbugs.donarmstrong.com id=B3226.125043169027258 (code B ref 3226); Sun, 16 Aug 2009 14:15:05 +0000 Original-Received: (at 3226) by emacsbugs.donarmstrong.com; 16 Aug 2009 14:08:10 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from cyd.mit.edu (CYD.MIT.EDU [18.115.2.24]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7GE890M027255 for <3226@emacsbugs.donarmstrong.com>; Sun, 16 Aug 2009 07:08:10 -0700 Original-Received: by cyd.mit.edu (Postfix, from userid 1000) id B02BB57E25D; Sun, 16 Aug 2009 10:09:08 -0400 (EDT) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Sun, 16 Aug 2009 10:26:57 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:30270 Archived-At: > 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 "< > 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.)