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: Sat, 05 May 2012 00:20:17 -0400 Message-ID: References: <83obqeiwb0.fsf@gnu.org> <83mx5n6ceu.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1336191683 30817 80.91.229.3 (5 May 2012 04:21:23 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 5 May 2012 04:21:23 +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 Sat May 05 06:21:22 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 1SQWUj-0001Pr-Cw for geb-bug-gnu-emacs@m.gmane.org; Sat, 05 May 2012 06:21:21 +0200 Original-Received: from localhost ([::1]:51159 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SQWUi-0001Cp-Lo for geb-bug-gnu-emacs@m.gmane.org; Sat, 05 May 2012 00:21:20 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:59336) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SQWUf-0001CB-Gu for bug-gnu-emacs@gnu.org; Sat, 05 May 2012 00:21:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SQWUd-0000io-ON for bug-gnu-emacs@gnu.org; Sat, 05 May 2012 00:21:17 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:35631) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SQWUd-0000iZ-KP for bug-gnu-emacs@gnu.org; Sat, 05 May 2012 00:21:15 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SQWWM-00064x-IE for bug-gnu-emacs@gnu.org; Sat, 05 May 2012 00:23: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: Sat, 05 May 2012 04:23: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.133619173323306 (code B ref 11348); Sat, 05 May 2012 04:23:02 +0000 Original-Received: (at 11348) by debbugs.gnu.org; 5 May 2012 04:22:13 +0000 Original-Received: from localhost ([127.0.0.1]:36665 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SQWVZ-00063r-67 for submit@debbugs.gnu.org; Sat, 05 May 2012 00:22:13 -0400 Original-Received: from ironport-out.teksavvy.com ([206.248.143.162]:7868) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SQWVX-00063Z-AM for 11348@debbugs.gnu.org; Sat, 05 May 2012 00:22:11 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApYIACxOgk9MCqD5/2dsb2JhbABDuCMDgQyBCIIJAQEEAVYjEAs0EhQYDSQTiAkFtjKLYYR5BKRFgV2DAw X-IronPort-AV: E=Sophos;i="4.75,391,1330923600"; d="scan'208";a="178436639" Original-Received: from 76-10-160-249.dsl.teksavvy.com (HELO ceviche.home) ([76.10.160.249]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 05 May 2012 00:20:17 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id 51CD166109; Sat, 5 May 2012 00:20:17 -0400 (EDT) In-Reply-To: <83mx5n6ceu.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 04 May 2012 21:15:05 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) 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:59768 Archived-At: >> This said, based on your description, the problem may simply come from >> shell.el's setting of pcomplete-arg-quote-list which tells pcomplete >> that \ is an escape char. >> I.e. does the patch below fix the problem? > No, I still get "d:\/gnu/". I installed the patch below, which seems to fix this specific problem (according to my testing under Wine ;-) >> Which part is ugly? The \, the /, or the use of a mix of them? > The mix. Yes, I think I agree. I'll have to think about it some more. Stefan === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-05-04 10:26:36 +0000 +++ lisp/ChangeLog 2012-05-05 04:16:59 +0000 @@ -1,3 +1,10 @@ +2012-05-05 Stefan Monnier + + * shell.el (shell-completion-vars): Set pcomplete-arg-quote-list like + shell-delimiter-argument-list. + (shell-parse-pcomplete-arguments): + Obey pcomplete-arg-quote-list (bug#11348). + 2012-05-04 Chong Yidong * select.el (xselect--encode-string): Always use utf-8 for TEXT on === modified file 'lisp/shell.el' --- lisp/shell.el 2012-02-28 08:17:21 +0000 +++ lisp/shell.el 2012-05-05 04:13:57 +0000 @@ -393,8 +393,11 @@ (goto-char (match-end 0)) (cond ((match-beginning 3) ;Backslash escape. - (push (if (= (match-beginning 3) (match-end 3)) - "\\" (match-string 3)) + (push (cond + ((null pcomplete-arg-quote-list) + (goto-char (match-beginning 3)) "\\") + ((= (match-beginning 3) (match-end 3)) "\\") + (t (match-string 3))) arg)) ((match-beginning 2) ;Double quote. (push (replace-regexp-in-string @@ -429,7 +432,7 @@ (set (make-local-variable 'pcomplete-parse-arguments-function) #'shell-parse-pcomplete-arguments) (set (make-local-variable 'pcomplete-arg-quote-list) - (append "\\ \t\n\r\"'`$|&;(){}[]<>#" nil)) + shell-delimiter-argument-list) (set (make-local-variable 'pcomplete-termination-string) (cond ((not comint-completion-addsuffix) "") ((stringp comint-completion-addsuffix)