From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Roland McGrath Newsgroups: gmane.emacs.bugs Subject: bug#7883: [PATCH] comint history expansion fails to process :N or $ modifier Date: Mon, 14 Feb 2011 17:56:19 -0800 (PST) Message-ID: <20110215015619.1B2242C3F6@topped-with-meat.com> References: <20110121181059.C342E18190D@magilla.sf.frob.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1297735696 10179 80.91.229.12 (15 Feb 2011 02:08:16 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 15 Feb 2011 02:08:16 +0000 (UTC) Cc: 7883@debbugs.gnu.org, Stefan Monnier To: Glenn Morris Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Feb 15 03:08:07 2011 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.69) (envelope-from ) id 1PpAKl-0005Ln-H4 for geb-bug-gnu-emacs@m.gmane.org; Tue, 15 Feb 2011 03:08:07 +0100 Original-Received: from localhost ([127.0.0.1]:51488 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PpAJK-0006km-Ch for geb-bug-gnu-emacs@m.gmane.org; Mon, 14 Feb 2011 21:06:38 -0500 Original-Received: from [140.186.70.92] (port=40203 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PpAJC-0006ka-BE for bug-gnu-emacs@gnu.org; Mon, 14 Feb 2011 21:06:31 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PpAJA-0001mC-Oi for bug-gnu-emacs@gnu.org; Mon, 14 Feb 2011 21:06:30 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:41488) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PpAJA-0001m7-LJ for bug-gnu-emacs@gnu.org; Mon, 14 Feb 2011 21:06:28 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1PpA1K-0001tm-G6; Mon, 14 Feb 2011 20:48:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Roland McGrath Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 15 Feb 2011 01:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 7883 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 7883-submit@debbugs.gnu.org id=B7883.12977344437221 (code B ref 7883); Tue, 15 Feb 2011 01:48:02 +0000 Original-Received: (at 7883) by debbugs.gnu.org; 15 Feb 2011 01:47:23 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PpA0h-0001sP-0g for submit@debbugs.gnu.org; Mon, 14 Feb 2011 20:47:23 -0500 Original-Received: from toast.topped-with-meat.com ([168.75.111.31] helo=topped-with-meat.com) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PpA0e-0001s5-Ik for 7883@debbugs.gnu.org; Mon, 14 Feb 2011 20:47:21 -0500 Original-Received: by topped-with-meat.com (Postfix, from userid 5281) id 1B2242C3F6; Mon, 14 Feb 2011 17:56:19 -0800 (PST) In-Reply-To: Glenn Morris's message of Monday, 14 February 2011 20:36:24 -0500 X-Shopping-List: (1) Sullen bums (2) Ardent abstinent sand reservations (3) Magisterial beatific suction convulsions X-CMAE-Score: 0 X-CMAE-Analysis: v=1.1 cv=8K6wSE2RzR1kS5OE/lTcb4ipl6maKCuSpzsqcIXyXfY= c=1 sm=1 a=R6mwsaruDd4A:10 a=kj9zAlcOel0A:10 a=mDV3o1hIAAAA:8 a=Uj0l02vvdgURlYFXp9gA:9 a=zM6o20UGMysLugbh5NsA:7 a=hSC3L9ZOuerWrNk3OcUdd6fyIL0A:4 a=CjuIK1q_8ugA:10 a=WkljmVdYkabdwxfqvArNOQ==:117 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Mon, 14 Feb 2011 20:48:02 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org 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:44138 Archived-At: > This just undoes the fix installed for > > http://debbugs.gnu.org/cgi/bugreport.cgi?bug=1795 > > (Although it wasn't really fixed anyway.) The change was not a fix for that problem at all, as you say. That problem continues to exist in various forms (that also exist in v22) and is a bug in entirely different parts of the code. I noticed the gratuitous insertion of spaces long ago, but it didn't really irk me quite enough to look into it. I see no reason whatsoever why expansion should be looking for metacharacters and fiddling things around like that at all. I always assumed it was a dismally misguided attempt at pretty-printing, which, even it weren't completely broken (as it is), is not a proper thing to be doing implicitly during history expansion at all. This misfeature appears to be fixed by: (setq comint-delimiter-argument-list nil) ;buffer-local The buffer-local setting comes from the global value of shell-delimiter-argument-list, which I've just set to nil in my init files. I really can't tell what the thinking behind the default setting of that was, since it's not commented particularly well. It seems just entirely wrong-headed to me. As far as I can tell, the only uses of the things it affects (comint-delimiter-argument-list, comint-arguments, comint-args) are in this history expansion stuff, where it is just thoroughly wrong if you either want to have history expansion work anything like it does in the shell (which is largely immune to any details of shell syntax, though bash's is not so immune to quoting as is csh's, which is the original and One True definition of ! history's meaning), or you know much of anything about shell syntax. Thanks, Roland