From: "Joonhwan Lee" <joonhwan.lee@gmail.com>
To: bug-gnu-emacs@gnu.org, nickrob@snap.net.nz
Subject: RE: GUD mode bug
Date: Thu, 28 Jun 2007 12:57:33 +0900 [thread overview]
Message-ID: <1c82e0ef0706272057r200c8023l92955183badc13d4@mail.gmail.com> (raw)
In-Reply-To: <1c82e0ef0706272055l21eb531bmf3bea9a331b3fb7a@mail.gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 3521 bytes --]
Greate. your new string->strings func works well. I'm elisp beginner and
had spent a quite long time in
writing the equivalent routine but failed, though.
Anyway, Here's another issue introduced.
In gud-common-init, there is routine extracting the name of debuggee.
It seems to me that
;; Extract the file name from WORDS
;; and put t in its place.
;; Later on we will put the modified file name arg back there.
(file-word (let ((w (cdr words)))
(while (and w (= ?- (aref (car w) 0)))
(setq w (cdr w)))
(and w
(prog1 (car w)
(setcar w t)))))
is too naive.
In my previous example, the name of debuggee should be the last
one(path-to-the-debuggee)
But with above code, gud thought it is "runargs -simu; run" 'cause it
doesn't start with hypen.
btw, It seems to me that it may be a little hard to introduce a general way
of extracting the name of debuggee.
Any idea? maybe user-configurable predicator for this?
Joon.
2007/6/28, Nick Roberts <nickrob@snap.net.nz>:
>
> > 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 <http://www.inet.net.nz/%7Enickrob>
>
>
> (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
>
--
Joon
--
Joon
[-- Attachment #1.2: Type: text/html, Size: 6571 bytes --]
[-- Attachment #2: Type: text/plain, Size: 149 bytes --]
_______________________________________________
bug-gnu-emacs mailing list
bug-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-gnu-emacs
next prev parent reply other threads:[~2007-06-28 3:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-27 11:46 GUD mode bug Joonhwan Lee
2007-06-28 1:44 ` Nick Roberts
[not found] ` <1c82e0ef0706272055l21eb531bmf3bea9a331b3fb7a@mail.gmail.com>
2007-06-28 3:57 ` Joonhwan Lee [this message]
2007-06-28 8:43 ` Nick Roberts
2007-06-28 19:25 ` Richard Stallman
2007-06-28 21:01 ` Nick Roberts
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1c82e0ef0706272057r200c8023l92955183badc13d4@mail.gmail.com \
--to=joonhwan.lee@gmail.com \
--cc=bug-gnu-emacs@gnu.org \
--cc=nickrob@snap.net.nz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).