From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "richardeng" Newsgroups: gmane.emacs.bugs Subject: bug#1412: what-file-line, used when writing gdb script Date: Mon, 24 Nov 2008 00:27:59 +0800 Message-ID: <200811240027584868253@foxmail.com> Reply-To: richardeng , 1412@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1227481519 25274 80.91.229.12 (23 Nov 2008 23:05:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 23 Nov 2008 23:05:19 +0000 (UTC) To: "bug-gnu-emacs" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Nov 24 00:06:22 2008 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 1L4O1i-0001xX-Rf for geb-bug-gnu-emacs@m.gmane.org; Mon, 24 Nov 2008 00:06:03 +0100 Original-Received: from localhost ([127.0.0.1]:38102 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L4O0Z-0005NQ-Pj for geb-bug-gnu-emacs@m.gmane.org; Sun, 23 Nov 2008 18:04:51 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L4IA7-0003et-4p for bug-gnu-emacs@gnu.org; Sun, 23 Nov 2008 11:50:19 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L4IA5-0003dR-NX for bug-gnu-emacs@gnu.org; Sun, 23 Nov 2008 11:50:18 -0500 Original-Received: from [199.232.76.173] (port=53311 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L4IA5-0003dM-Hq for bug-gnu-emacs@gnu.org; Sun, 23 Nov 2008 11:50:17 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:58134) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1L4IA0-0007uT-Nh for bug-gnu-emacs@gnu.org; Sun, 23 Nov 2008 11:50:13 -0500 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mANGoA1P021934; Sun, 23 Nov 2008 08:50:10 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id mANGZ4FN017515; Sun, 23 Nov 2008 08:35:04 -0800 X-Loop: don@donarmstrong.com Resent-From: "richardeng" Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sun, 23 Nov 2008 16:35:04 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 1412 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by submit@emacsbugs.donarmstrong.com id=B.122745769616026 (code B ref -1); Sun, 23 Nov 2008 16:35:04 +0000 Original-Received: (at submit) by emacsbugs.donarmstrong.com; 23 Nov 2008 16:28:16 +0000 Original-Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mANGSCFm016018 for ; Sun, 23 Nov 2008 08:28:14 -0800 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L4Hoi-0003bq-7l for bug-gnu-emacs@gnu.org; Sun, 23 Nov 2008 11:28:12 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L4Hog-0003Zj-12 for bug-gnu-emacs@gnu.org; Sun, 23 Nov 2008 11:28:11 -0500 Original-Received: from [199.232.76.173] (port=52878 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L4Hof-0003ZO-Ot for bug-gnu-emacs@gnu.org; Sun, 23 Nov 2008 11:28:09 -0500 Original-Received: from smtpbg3.foxmail.com ([121.14.102.33]:53397) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1L4Hof-0004iR-0t for bug-gnu-emacs@gnu.org; Sun, 23 Nov 2008 11:28:09 -0500 Original-Received: from 172.23.147.51 (foxmail.com [172.23.147.51]) by smtpbg3 (foxmail.com) with SMTP id qCrpvYsY; Mon, 24 Nov 2008 00:27:58 +0800 (envelope-from richardeng@foxmail.com) X-QQ-mid: esmtp41227457678802941 Original-Received: from 889D3A80E680420 (unknown [116.225.239.173]) by smtp.foxmail.com (Postfix) with ESMTP id for ; Mon, 24 Nov 2008 00:27:58 +0800 (CST) X-mailer: Foxmail 6, 14, 103, 20 [cn] X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Sun, 23 Nov 2008 11:50:18 -0500 X-Mailman-Approved-At: Sun, 23 Nov 2008 18:04:34 -0500 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:22608 Archived-At: 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)))) ----- 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?