From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Nick Roberts Newsgroups: gmane.emacs.devel Subject: Re: `gud-common-init' Date: Fri, 17 Dec 2004 12:27:08 +1300 Message-ID: <16834.6604.709346.496421@farnswood.snap.net.nz> References: <200412150501.18409.pogonyshev@gmx.net> <16831.47330.524448.126633@farnswood.snap.net.nz> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1103241933 5288 80.91.229.6 (17 Dec 2004 00:05:33 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 17 Dec 2004 00:05:33 +0000 (UTC) Cc: emacs-devel@gnu.org, Paul Pogonyshev Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Dec 17 01:05:26 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1Cf5cb-0006hU-00 for ; Fri, 17 Dec 2004 01:05:25 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1Cf5ms-0005dA-Lk for ged-emacs-devel@m.gmane.org; Thu, 16 Dec 2004 19:16:02 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1Cf5mT-0005WJ-TM for emacs-devel@gnu.org; Thu, 16 Dec 2004 19:15:38 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1Cf5mR-0005VL-ME for emacs-devel@gnu.org; Thu, 16 Dec 2004 19:15:36 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1Cf5mR-0005VI-Hu for emacs-devel@gnu.org; Thu, 16 Dec 2004 19:15:35 -0500 Original-Received: from [202.37.101.8] (helo=viper.snap.net.nz) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Cf58H-00053h-0H for emacs-devel@gnu.org; Thu, 16 Dec 2004 18:34:05 -0500 Original-Received: from farnswood.snap.net.nz (p75-tnt1.snap.net.nz [202.124.110.75]) by viper.snap.net.nz (Postfix) with ESMTP id E01A3E1DD8; Fri, 17 Dec 2004 12:33:58 +1300 (NZDT) Original-Received: by farnswood.snap.net.nz (Postfix, from userid 501) id 95B9B6283F; Thu, 16 Dec 2004 23:27:10 +0000 (GMT) Original-To: Stefan Monnier In-Reply-To: X-Mailer: VM 6.97 under Emacs 21.2.1 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: main.gmane.org gmane.emacs.devel:31218 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:31218 > While it=B4s generally not encouraged I think it=B4d be good not to = mess up when > the needs comes up... Well the price paid is lisp code that is harder to understand. > ... In PCL-CVS I wrote cvs-string->strings (and > a corresponding cvs-strings->string) to handle that. Its funny you should say that since in the previous thread (gud.el chan= ges) I thought you were the one who wasn't keen on the change. AFAIK the last = message in that thread was mine (Sun, 6 Jul 2003 03:37:34 +0100): RMS> But if shell quoting is the wrong format for this use, RMS> then comint-arguments is not right for it. In that case, RMS> this statement is probably right: You> I think we need something similar to cvs-string->strings in su= br.el You> (and a corresponding strings->string). Me> As Richard is agreeable to this and since you wrote pcvs-util.el, c= an I Me> suggest that you make this change. Me> Please note, however that I had to change cvs-string->strings sligh= tly Me> because split-string has been re-defined and can now output null st= rings: Me> --- pcvs-util.el.~1.19.~ 2003-05-10 11:27:06.000000000 +0100= Me> +++ pcvs-util.el 2003-06-28 17:43:22.000000000 +0100 Me> @@ -223,8 +223,8 @@ Me> The SEPARATOR regexp defaults to \"\\s-+\"." Me> (let ((sep (or separator "\\s-+")) Me> (i (string-match "[\"]" string))) Me> - (if (null i) (split-string string sep) ; no quoting: easy= Me> - (append (unless (eq i 0) (split-string (substring string 0 i= ) sep)) Me> + (if (null i) (split-string string sep t) ; no quoting: easy= Me> + (append (unless (eq i 0) (split-string (substring string 0 i= ) sep t)) Me> (let ((rfs (read-from-string string i))) Me> (cons (car rfs) Me> (cvs-string->strings (substring string (cdr r= fs)) Me> Then only one line need be changed in gud.el: Me> --- gud.el.~1.3.~ 2003-06-19 01:54:57.000000000 +0100 Me> +++ gud.el 2003-06-28 17:17:02.000000000 +0100 Me> @@ -2297,7 +2297,7 @@ Me> ;; for local variables in the debugger buffer. Me> (defun gud-common-init (command-line massage-args marker-filter Me> &optional find-file) Me> - (let* ((words (split-string command-line)) Me> + (let* ((words (cvs-string->strings command-line)) Me> (program (car words)) Me> (dir default-directory) Me> ;; Extract the file name from WORDS Me> though cvs-string->strings will no doubt have another name when it'= s moved to Me> subr.el Nick