From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Miles Bader Newsgroups: gmane.emacs.devel Subject: Re: [david.hansen@gmx.net: Re: comint's directory tracking doesn't understand \( or \)] Date: Wed, 07 Mar 2007 09:48:51 +0900 Message-ID: <87irddev4c.fsf@catnip.gol.com> References: <871wk56tjh.fsf@localhorst.mine.nu> <87k5xw8b07.fsf@localhorst.mine.nu> Reply-To: Miles Bader NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1173228560 24367 80.91.229.12 (7 Mar 2007 00:49:20 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 7 Mar 2007 00:49:20 +0000 (UTC) Cc: David Hansen , rms@gnu.org, emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Mar 07 01:49:13 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 1HOkLA-00085z-6b for ged-emacs-devel@m.gmane.org; Wed, 07 Mar 2007 01:49:12 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HOkLC-0004fo-6e for ged-emacs-devel@m.gmane.org; Tue, 06 Mar 2007 19:49:14 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HOkL0-0004fj-R5 for emacs-devel@gnu.org; Tue, 06 Mar 2007 19:49:02 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HOkKz-0004fX-EF for emacs-devel@gnu.org; Tue, 06 Mar 2007 19:49:02 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HOkKz-0004fU-7A for emacs-devel@gnu.org; Tue, 06 Mar 2007 19:49:01 -0500 Original-Received: from smtp02.dentaku.gol.com ([203.216.5.72]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1HOkKq-0002Rh-8P; Tue, 06 Mar 2007 19:48:52 -0500 Original-Received: from 203-216-97-073.dsl.gol.ne.jp ([203.216.97.73] helo=catnip.gol.com) by smtp02.dentaku.gol.com with esmtpa (Dentaku) id 1HOkKm-0000Vz-0o; Wed, 07 Mar 2007 09:48:48 +0900 Original-Received: by catnip.gol.com (Postfix, from userid 1000) id 3D29F2F43; Wed, 7 Mar 2007 09:48:51 +0900 (JST) System-Type: i686-pc-linux-gnu In-Reply-To: (Stefan Monnier's message of "Mon\, 05 Mar 2007 21\:23\:32 -0500") Original-Lines: 27 X-Abuse-Complaints: abuse@gol.com 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:67460 Archived-At: Stefan Monnier 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]