From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#11348: 24.0.95; TAB-completion in shell-command produces d:\/foo on MS-Windows Date: Mon, 07 May 2012 11:27:15 -0400 Message-ID: References: <83obqeiwb0.fsf@gnu.org> <83mx5n6ceu.fsf@gnu.org> <83fwbf5e8v.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1336404494 25975 80.91.229.3 (7 May 2012 15:28:14 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 7 May 2012 15:28:14 +0000 (UTC) Cc: 11348@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon May 07 17:28:13 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SRPrA-0007Fw-BU for geb-bug-gnu-emacs@m.gmane.org; Mon, 07 May 2012 17:28:12 +0200 Original-Received: from localhost ([::1]:33366 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SRPr9-0007Lv-CG for geb-bug-gnu-emacs@m.gmane.org; Mon, 07 May 2012 11:28:11 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:54512) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SRPr1-0007Ln-QQ for bug-gnu-emacs@gnu.org; Mon, 07 May 2012 11:28:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SRPqz-0001x2-UQ for bug-gnu-emacs@gnu.org; Mon, 07 May 2012 11:28:03 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:38626) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SRPqz-0001wx-Ql for bug-gnu-emacs@gnu.org; Mon, 07 May 2012 11:28:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SRPsw-00042x-Nm for bug-gnu-emacs@gnu.org; Mon, 07 May 2012 11:30:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 07 May 2012 15:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11348 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 11348-submit@debbugs.gnu.org id=B11348.133640456115478 (code B ref 11348); Mon, 07 May 2012 15:30:02 +0000 Original-Received: (at 11348) by debbugs.gnu.org; 7 May 2012 15:29:21 +0000 Original-Received: from localhost ([127.0.0.1]:39660 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SRPsG-00041a-C1 for submit@debbugs.gnu.org; Mon, 07 May 2012 11:29:20 -0400 Original-Received: from chene.dit.umontreal.ca ([132.204.246.20]:42766) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SRPsE-00041T-6N for 11348@debbugs.gnu.org; Mon, 07 May 2012 11:29:19 -0400 Original-Received: from fmsmemgm.homelinux.net (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id q47FRFlI023106; Mon, 7 May 2012 11:27:15 -0400 Original-Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id 85F81AEC0E; Mon, 7 May 2012 11:27:15 -0400 (EDT) In-Reply-To: <83fwbf5e8v.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 05 May 2012 09:33:04 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV4215=0 X-NAI-Spam-Version: 2.2.0.9309 : core <4215> : streams <753688> : uri <1108552> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) 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: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:59836 Archived-At: > I'm not sure why it worked for you, because it still doesn't for me. > Are you applying the changes to the emacs-24 branch? Because that's > what I do, this bug being against Emacs 24.0.96 and a regression from > Emacs 23.4. Yes, I tried it with the 24.0.96 pretest. Hmm... > According to my debugging inside shell-parse-pcomplete-arguments, what > happens there is that this fragment > (while (looking-at > (eval-when-compile > (concat > "\\(?:[^\s\t\n\\\"']+" > "\\|'\\([^']*\\)'?" > "\\|\"\\(\\(?:[^\"\\]\\|\\\\.\\)*\\)\"?" > "\\|\\\\\\(\\(?:.\\|\n\\)?\\)\\)"))) > decides that \g is an escape sequence. No, it does match "\g" but then the new code: (push (cond ((null pcomplete-arg-quote-list) (goto-char (match-beginning 3)) "\\") ((= (match-beginning 3) (match-end 3)) "\\") (t (match-string 3))) arg)) sees that pcomplete-arg-quote-list is nil, pushes "\\" and moves backward 1 char (to right before the "g") so you end up with ("gnu" "\\" "d:"). Can you check to see why this is not happening? > (Btw, what's the purpose of using eval-when-compile here?) To avoid calling `concat' at run-time (especially within the loop). In older Emacsen, `concat' was marked as pure so the byte-compiler would evaluate it at compile-time, but someone complained that it's not strictly correct because he wanted that (concat ) is not `eq' to (concat ). I actually think this change was a mistake and would rather mark `concat' as pure again. Stefan