GNU bug report logs -
#1412
what-file-line, used when writing gdb script
Previous Next
Reported by: "richardeng" <richardeng <at> foxmail.com>
Date: Sun, 23 Nov 2008 16:35:04 UTC
Severity: wishlist
Tags: patch, wontfix
Found in version 23.0.60
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #10 received at 1412 <at> debbugs.gnu.org (full text, mbox):
"richardeng" <richardeng <at> 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
This bug report was last modified 9 years and 141 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.