emacs-devel
[Top][All Lists]
Advanced

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

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


From: Miles Bader
Subject: Re: address@hidden: Re: comint's directory tracking doesn't understand \( or \)]
Date: Wed, 07 Mar 2007 09:48:51 +0900

Stefan Monnier <address@hidden> writes:
> Wouldn't it be better to move it to shell.el?
> I.e. create a new function shell-argument?

I think it would be a nicer interface if it were split into two
functions:  one which which would just parse the arguments and return a
lisp list of them (e.g. `shell-split') and one which would call
shell-split and do the choose-N-through-M-and-apply-mapconcat stuff to
return a string (e.g., `shell-arguments-string').

E.g.:

   (shell-split "this is \"a test\"") => ("this" "is" "a test")

   (shell-arguments-string "this is \"a test\"" 1 2) => "is \"a test\""

Simple uses might use the latter but the former seems a generally
cleaner interface and building block for other uses.

-Miles

-- 
The automobile has not merely taken over the street, it has dissolved the
living tissue of the city.  Its appetite for space is absolutely insatiable;
moving and parked, it devours urban land, leaving the buildings as mere islands
of habitable space in a sea of dangerous and ugly traffic.
[James Marston Fitch, New York Times, 1 May 1960]




reply via email to

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