From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nick Roberts Newsgroups: gmane.emacs.bugs Subject: Re: GUD mode bug Date: Thu, 28 Jun 2007 13:44:41 +1200 Message-ID: <18051.4745.532543.348336@kahikatea.snap.net.nz> References: <1c82e0ef0706270446h55465838t9925e1fd4c89179f@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1182995283 12205 80.91.229.12 (28 Jun 2007 01:48:03 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 28 Jun 2007 01:48:03 +0000 (UTC) Cc: bug-gnu-emacs@gnu.org To: "Joonhwan Lee" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jun 28 03:48:01 2007 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1I3j72-00059V-7t for geb-bug-gnu-emacs@m.gmane.org; Thu, 28 Jun 2007 03:48:00 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I3j71-0002j5-CH for geb-bug-gnu-emacs@m.gmane.org; Wed, 27 Jun 2007 21:47:59 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1I3j6z-0002it-88 for bug-gnu-emacs@gnu.org; Wed, 27 Jun 2007 21:47:57 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1I3j6x-0002iV-LD for bug-gnu-emacs@gnu.org; Wed, 27 Jun 2007 21:47:56 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I3j6x-0002iM-Bt for bug-gnu-emacs@gnu.org; Wed, 27 Jun 2007 21:47:55 -0400 Original-Received: from viper.snap.net.nz ([202.37.101.8]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1I3j6w-0002z3-FB for bug-gnu-emacs@gnu.org; Wed, 27 Jun 2007 21:47:55 -0400 Original-Received: from kahikatea.snap.net.nz (50.63.255.123.dynamic.snap.net.nz [123.255.63.50]) by viper.snap.net.nz (Postfix) with ESMTP id 445483D919D; Thu, 28 Jun 2007 13:47:52 +1200 (NZST) Original-Received: by kahikatea.snap.net.nz (Postfix, from userid 1000) id A015D8FBF6; Thu, 28 Jun 2007 13:44:42 +1200 (NZST) In-Reply-To: <1c82e0ef0706270446h55465838t9925e1fd4c89179f@mail.gmail.com> X-Mailer: VM 7.19 under Emacs 22.1.50.9 X-detected-kernel: Linux 2.4-2.6 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:16016 Archived-At: > M-x dbx > dbx -c "runargs -simu; run" path-to-the-debuggee > > Above workflow doesn't work on Emacs 22.1.1 > > "Split-String" by default separator. > > In the end, because the quote in my original dbx execution, output list by > split-string was > > ("-c" "\"runargs" "-simu;" "run\"" "path-to-the-debuggee) > > instead of > > ("-c" "runargs -simu; run" "path-to-the-debuggee") > > which is actually correct for (start-process) to be called with I've fixed this in the CVS repository at Savannah. If you can build from there can you tell me if it is fixed now. Failing that, please apply the patch below to gud.el, evaluate the function string->strings and try it from there. Does that work now? -- Nick http://www.inet.net.nz/~nickrob (defun string->strings (string &optional separator) "Split the STRING into a list of strings. It understands elisp style quoting within STRING such that (string->strings (strings->string strs)) == strs The SEPARATOR regexp defaults to \"\\s-+\"." (let ((sep (or separator "\\s-+")) (i (string-match "[\"]" string))) (if (null i) (split-string string sep t) ; no quoting: easy (append (unless (eq i 0) (split-string (substring string 0 i) sep t)) (let ((rfs (read-from-string string i))) (cons (car rfs) (string->strings (substring string (cdr rfs)) sep))))))) *** gud.el 13 May 2007 16:21:01 +1200 1.130 --- gud.el 28 Jun 2007 12:56:38 +1200 *************** comint mode, which see." *** 2462,2468 **** ;; for local variables in the debugger buffer. (defun gud-common-init (command-line massage-args marker-filter &optional find-file) ! (let* ((words (split-string command-line)) (program (car words)) (dir default-directory) ;; Extract the file name from WORDS --- 2462,2468 ---- ;; for local variables in the debugger buffer. (defun gud-common-init (command-line massage-args marker-filter &optional find-file) ! (let* ((words (string->strings command-line)) (program (car words)) (dir default-directory) ;; Extract the file name from WORDS