unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [david.hansen@gmx.net: Re: comint's directory tracking doesn't understand \( or \)]
@ 2007-03-02 17:44 Richard Stallman
  2007-03-04 13:13 ` David Hansen
  0 siblings, 1 reply; 36+ messages in thread
From: Richard Stallman @ 2007-03-02 17:44 UTC (permalink / raw)
  To: emacs-devel

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 <david.hansen@gmx.net>
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 -------

^ permalink raw reply	[flat|nested] 36+ messages in thread

end of thread, other threads:[~2007-03-10 20:18 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-02 17:44 [david.hansen@gmx.net: Re: comint's directory tracking doesn't understand \( or \)] Richard Stallman
2007-03-04 13:13 ` David Hansen
2007-03-04 15:45   ` Chong Yidong
2007-03-04 15:51     ` David Kastrup
2007-03-04 19:26       ` Chong Yidong
2007-03-04 19:32         ` David Kastrup
2007-03-04 19:39           ` Lennart Borgman (gmail)
2007-03-04 20:16             ` David Kastrup
2007-03-04 20:25               ` Lennart Borgman (gmail)
2007-03-04 19:47           ` Miles Bader
2007-03-04 21:45         ` Stefan Monnier
2007-03-04 22:06           ` Andreas Seltenreich
2007-03-04 23:42             ` Stefan Monnier
2007-03-04 23:13         ` David Hansen
2007-03-04 23:30           ` David Kastrup
2007-03-05  2:09             ` David Hansen
2007-03-04 19:40       ` Robert J. Chassell
2007-03-04 20:17         ` David Kastrup
2007-03-04 23:22     ` Chris Moore
2007-03-04 23:23       ` Tom Tromey
2007-03-05  2:55   ` Richard Stallman
2007-03-05  6:23     ` David Hansen
2007-03-05 21:50       ` Richard Stallman
2007-03-06  2:23         ` Stefan Monnier
2007-03-06  3:10           ` David Hansen
2007-03-06 22:36           ` Richard Stallman
2007-03-07  0:48           ` Miles Bader
2007-03-07 14:49             ` David Hansen
2007-03-08  3:16               ` Richard Stallman
2007-03-09 19:55               ` Chong Yidong
2007-03-09 20:28                 ` Glenn Morris
2007-03-09 20:45                   ` David Hansen
2007-03-09 21:08                     ` David Kastrup
2007-03-10  0:04                 ` Chong Yidong
2007-03-10  8:06                   ` David Hansen
2007-03-10 20:18                   ` Chong Yidong

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).