From: "richardeng" <richardeng@foxmail.com>
To: "emacs-devel" <emacs-devel@gnu.org>
Subject: New function: what-file-line, used when writing gdb script
Date: Sun, 23 Nov 2008 01:03:52 +0800 [thread overview]
Message-ID: <200811230103508125332@foxmail.com> (raw)
In-Reply-To: E1Kwyo4-0007Vt-Ai@etlken.m17n.org
[-- Attachment #1: Type: text/plain, Size: 1353 bytes --]
Hi all,
When I write gdb script, I need to set many breakpoints. such as:
b xxx_file.c:xxx_line_number
With following comamnd, I can do it more easy
-----
(defcustom what-file-line-separator ":"
"Define the separator between file name and line number"
:type 'string
:group 'editing)
(defcustom what-file-line-yankp nil
"Toggle on/off Yank to kill ring"
:type 'boolean
:group 'editing)
;; Maybe this variable is useless, user can copy what they want in mini-buffer
(defcustom what-file-line-fullpath t
"Toggle on/off file name fullpath"
:type 'boolean
:group 'editing)
(defun what-file-line ()
"Print the current buffer's file name and line nubmer"
(interactive)
(let ((n (line-number-at-pos))
(file (buffer-file-name))
result)
(setq result (concat file what-file-line-separator (number-to-string n)))
(message "%s" result)
(if what-file-line-yankp
(kill-new result))))
-----
Q:
1. I don't know in which group the customized variables should be put?
2. The 3rd customized variable needn't, agree?
3. If this functionality is usefull, I want to implement a GUI version(as same as gdb-mouse-set-clear-breakpoint). So when user click the left margin when non-gdb-mode, user can get the filename-line pair)
What's your comment?
2008-11-23
richardeng
[-- Attachment #2: Type: text/html, Size: 5299 bytes --]
next prev parent reply other threads:[~2008-11-22 17:03 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-01 14:20 Emacs 23 character code space Eli Zaretskii
2008-11-01 16:46 ` Eli Zaretskii
2008-11-03 1:34 ` Kenichi Handa
2008-11-03 12:45 ` Kenichi Handa
2008-11-03 20:13 ` Eli Zaretskii
2008-11-04 7:35 ` Kenichi Handa
2008-11-04 20:19 ` Eli Zaretskii
2008-11-05 12:27 ` Kenichi Handa
2008-11-05 18:23 ` Eli Zaretskii
2008-11-22 18:25 ` Eli Zaretskii
2008-11-26 1:41 ` Kenichi Handa
2008-11-26 4:13 ` Eli Zaretskii
2008-11-26 4:24 ` Kenichi Handa
2008-11-26 4:58 ` Kenichi Handa
2008-11-26 20:26 ` Eli Zaretskii
2008-11-26 22:52 ` Juanma Barranquero
2008-11-27 1:10 ` Stephen J. Turnbull
2008-11-27 1:35 ` Kenichi Handa
2008-11-26 20:18 ` Eli Zaretskii
2008-11-27 1:29 ` Kenichi Handa
2008-11-29 17:12 ` Eli Zaretskii
2008-12-02 5:40 ` Kenichi Handa
2008-11-28 13:19 ` Eli Zaretskii
2008-12-02 5:44 ` Kenichi Handa
2008-12-02 19:40 ` Eli Zaretskii
2008-11-29 12:01 ` Eli Zaretskii
2008-11-22 16:28 ` Eli Zaretskii
2008-11-23 4:16 ` Stefan Monnier
2008-11-23 11:22 ` Eli Zaretskii
2008-11-26 1:51 ` Kenichi Handa
2008-11-23 8:29 ` Ulrich Mueller
2008-11-23 11:11 ` Eli Zaretskii
2008-11-23 11:55 ` Ulrich Mueller
2008-11-24 3:06 ` Stefan Monnier
2008-11-26 1:31 ` Kenichi Handa
2008-11-22 17:03 ` richardeng [this message]
2008-11-07 7:21 ` Kenichi Handa
2008-11-07 10:27 ` Eli Zaretskii
2008-11-07 11:52 ` Kenichi Handa
-- strict thread matches above, loose matches on Subject: below --
2008-11-23 3:49 New function: what-file-line, used when writing gdb script richardeng
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200811230103508125332@foxmail.com \
--to=richardeng@foxmail.com \
--cc=emacs-devel@gnu.org \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.