From: Lars Ingebrigtsen <larsi@gnus.org>
To: "richardeng" <richardeng@foxmail.com>
Cc: 1412@debbugs.gnu.org
Subject: bug#1412: what-file-line, used when writing gdb script
Date: Mon, 29 Feb 2016 15:23:48 +1100 [thread overview]
Message-ID: <87a8mkywiz.fsf@gnus.org> (raw)
In-Reply-To: <200811240027584868253@foxmail.com> (richardeng's message of "Mon, 24 Nov 2008 00:27:59 +0800")
"richardeng" <richardeng@foxmail.com> writes:
> Package: emacs
> Version: 23.0.60
> Severity: wishlist
>
> When I write gdb script, I need to set many breakpoints. such as:
> b xxx_file.c:xxx_line_number
>
> With following, I can do it easier.
> -----
> (defcustom what-file-line-separator ":"
> "Define the separator between file name and line number"
> :type 'string
> :group 'editing)
>
> (defcustom what-file-line-killp nil
> "Toggle on/off kill to yank ring"
> :type 'boolean
> :group 'editing)
>
> ;; Maybe this variable is useless, because 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-killp
> (kill-new result))))
Hm... I don't think this sounds generally very useful (it's both kinda
too low level to be useful as a command, and too high level to be useful
as a function), so I'm closing this bug report. Please reopen if
disagreeing.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
prev parent reply other threads:[~2016-02-29 4:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-23 16:27 bug#1412: what-file-line, used when writing gdb script richardeng
2016-02-29 4:23 ` Lars Ingebrigtsen [this message]
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=87a8mkywiz.fsf@gnus.org \
--to=larsi@gnus.org \
--cc=1412@debbugs.gnu.org \
--cc=richardeng@foxmail.com \
/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.