From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: [david.hansen@gmx.net: Re: comint's directory tracking doesn't understand \( or \)] Date: Fri, 02 Mar 2007 12:44:48 -0500 Message-ID: Reply-To: rms@gnu.org NNTP-Posting-Host: lo.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: sea.gmane.org 1172857612 4691 80.91.229.12 (2 Mar 2007 17:46:52 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 2 Mar 2007 17:46:52 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Mar 02 18:46:46 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HNBq5-0000ww-Q5 for ged-emacs-devel@m.gmane.org; Fri, 02 Mar 2007 18:46:42 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HNBq5-0004hB-DF for ged-emacs-devel@m.gmane.org; Fri, 02 Mar 2007 12:46:41 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HNBps-0004dS-QJ for emacs-devel@gnu.org; Fri, 02 Mar 2007 12:46:28 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HNBpr-0004d6-Qp for emacs-devel@gnu.org; Fri, 02 Mar 2007 12:46:27 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HNBpr-0004d3-KQ for emacs-devel@gnu.org; Fri, 02 Mar 2007 12:46:27 -0500 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by monty-python.gnu.org with esmtp (Exim 4.52) id 1HNBpr-0003pf-4l for emacs-devel@gnu.org; Fri, 02 Mar 2007 12:46:27 -0500 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.60) (envelope-from ) id 1HNBoG-0000Cj-2E; Fri, 02 Mar 2007 12:44:48 -0500 X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:67230 Archived-At: Would someone please study this, install it if it is safe, then ack? ------- Start of forwarded message ------- Mail-Followup-To: emacs-pretest-bug@gnu.org To: emacs-pretest-bug@gnu.org From: David Hansen Date: Fri, 02 Mar 2007 05:37:27 +0100 Organization: disorganized Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Mail-Copies-To: nobody Subject: Re: comint's directory tracking doesn't understand \( or \) X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=failed version=3.0.4 On Thu, 01 Mar 2007 22:28:53 -0500 Richard Stallman wrote: > Can you write a fix for this? > We could install the fix, if it is simple and safe. I already reported that one or two weeks ago. I can't say if the fix will be safe. I simply don't know enough about other comint modes (not a bash shell buffer). This patch fixes at least one related problem (now arbitrary characters can be escaped with a backslash). But this is not the full fix. `comint-delim-arg' still breaks at characters in `comint-delimiter-argument-list' even if they are escaped with a backslash. This should be easy to fix but I have no idea if this may break other comint modes (what about MS-DOS directory delimiters?). BTW, I have the feeling that how comint splits arguments is overly complicated. These regular expressions are just terrible and it can be easily (and most probably faster) expressed by some loop across all chars and maintaining a simple state. But that's for after the release :) David Index: comint.el =================================================================== RCS file: /sources/emacs/emacs/lisp/comint.el,v retrieving revision 1.358 diff -c -r1.358 comint.el *** comint.el 23 Feb 2007 19:21:25 -0000 1.358 - --- comint.el 2 Mar 2007 04:27:30 -0000 *************** *** 1384,1390 **** (let* ((first (if (if (fboundp 'w32-shell-dos-semantics) (w32-shell-dos-semantics)) "[^ \n\t\"'`]+\\|" ! "[^ \n\t\"'`\\]+\\|\\\\[\"'`\\ \t]+\\|")) (argpart (concat first "\\(\"\\([^\"\\]\\|\\\\.\\)*\"\\|\ '[^']*'\\|\ - --- 1384,1390 ---- (let* ((first (if (if (fboundp 'w32-shell-dos-semantics) (w32-shell-dos-semantics)) "[^ \n\t\"'`]+\\|" ! "[^ \n\t\"'`\\]+\\|\\(?:\\\\.\\)+\\|")) (argpart (concat first "\\(\"\\([^\"\\]\\|\\\\.\\)*\"\\|\ '[^']*'\\|\ _______________________________________________ emacs-pretest-bug mailing list emacs-pretest-bug@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug ------- End of forwarded message -------