emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

address@hidden: Re: comint's directory tracking doesn't understand \( or


From: Richard Stallman
Subject: address@hidden: Re: comint's directory tracking doesn't understand \( or \)]
Date: Fri, 02 Mar 2007 12:44:48 -0500

Would someone please study this, install it if it is safe, then ack?

------- Start of forwarded message -------
Mail-Followup-To: address@hidden
To: address@hidden
From: David Hansen <address@hidden>
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
address@hidden
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug
------- End of forwarded message -------




reply via email to

[Prev in Thread] Current Thread [Next in Thread]