emacs-pretest-bug
[Top][All Lists]
Advanced

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

Re: `shell' directory tracking and `comint-arguments'


From: David Hansen
Subject: Re: `shell' directory tracking and `comint-arguments'
Date: Sat, 17 Feb 2007 09:38:54 +0100
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.93 (gnu/linux)

On Fri, 16 Feb 2007 13:38:14 +0100 David Hansen wrote:

> So far i think the problem is that the closing paren gets lost in
>
> (comint-arguments "cd \\(foo\\)" 1 1)
>
> which is called in `shell-directory-tracker'.  Well... have fun with
> the freaky two line regexps ;p

This seems to fix `comint-arguments' but there is still the problem
that `comint-delim-arg' splits further on backslash quoted special
characters (in this case the parens).

I'm a bit lost now.  I have no idea if it breaks one of the several
comint based modes if we don't split at quoted special characters
here.  I suspect it would make sense to add some extra buffer local
variable which defines the quote characters.

David

*** comint.el   31 Jan 2007 20:14:04 +0100      1.357
--- comint.el   17 Feb 2007 09:15:04 +0100      
***************
*** 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
                          "\\(\"\\([^\"\\]\\|\\\\.\\)*\"\\|\
  '[^']*'\\|\






reply via email to

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