From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nick Roberts Newsgroups: gmane.emacs.help Subject: Re: gud : Phase error in gdb-pre-prompt (got pre-emacs) Date: Thu, 3 Jul 2008 12:22:17 +1200 Message-ID: <18540.7097.896625.775289@kahikatea.snap.net.nz> References: <4864aa47$0$7552$9b4e6d93@newsspool1.arcor-online.net> <4864f7c5$0$6607$9b4e6d93@newsspool2.arcor-online.net> <4868d573$0$27452$9b4e6d93@newsspool4.arcor-online.net> <486b8e20$0$7547$9b4e6d93@newsspool1.arcor-online.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1215044612 19572 80.91.229.12 (3 Jul 2008 00:23:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 3 Jul 2008 00:23:32 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Markus Grunwald Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jul 03 02:24:17 2008 Return-path: Envelope-to: geh-help-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 1KECc3-0003Zi-5K for geh-help-gnu-emacs@m.gmane.org; Thu, 03 Jul 2008 02:23:51 +0200 Original-Received: from localhost ([127.0.0.1]:55731 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KECbC-0003Zb-BM for geh-help-gnu-emacs@m.gmane.org; Wed, 02 Jul 2008 20:22:58 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KECar-0003Y1-Dg for help-gnu-emacs@gnu.org; Wed, 02 Jul 2008 20:22:37 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KECap-0003Wo-Of for help-gnu-emacs@gnu.org; Wed, 02 Jul 2008 20:22:36 -0400 Original-Received: from [199.232.76.173] (port=57881 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KECap-0003We-J0 for help-gnu-emacs@gnu.org; Wed, 02 Jul 2008 20:22:35 -0400 Original-Received: from viper.snap.net.nz ([202.37.101.25]:42753) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KECap-0005K5-7L for help-gnu-emacs@gnu.org; Wed, 02 Jul 2008 20:22:35 -0400 Original-Received: from kahikatea.snap.net.nz (212.30.255.123.static.snap.net.nz [123.255.30.212]) by viper.snap.net.nz (Postfix) with ESMTP id BB89F3DA5C6; Thu, 3 Jul 2008 12:22:21 +1200 (NZST) Original-Received: by kahikatea.snap.net.nz (Postfix, from userid 1000) id BD0E18FC6D; Thu, 3 Jul 2008 12:22:19 +1200 (NZST) Original-Newsgroups: gnu.emacs.help In-Reply-To: <486b8e20$0$7547$9b4e6d93@newsspool1.arcor-online.net> X-Mailer: VM 7.19 under Emacs 22.2.50.3 X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:55208 Archived-At: > But what I would like to have is this: When I start gdb now (M-x gdb), I > get the gdb command line with a suggestion of the file to debug (which is, > in my case, always wrong): > > gdb --annotate=3 filename.cpp > > So I have to delete the "filename.cpp" and hit enter. > > Is it possible to suppress this filename so that I can immediately hit > enter ? This would already help a lot... Your situation is somewhat unusual so I'm not planning to accomodate this in Emacs. However, it's quite easy for you to patch gud.el like below. -- Nick http://www.inet.net.nz/~nickrob --- gud.el 13 Jun 2008 09:07:24 +1200 1.155 +++ gud.el 03 Jul 2008 12:16:09 +1200 @@ -694,16 +694,7 @@ The option \"--fullname\" must be includ (read-from-minibuffer (format "Run %s (like this): " minor-mode) (or (car-safe (symbol-value hist-sym)) - (concat (or cmd-name (symbol-name minor-mode)) - " " - (or init - (let ((file nil)) - (dolist (f (directory-files default-directory) file) - (if (and (file-executable-p f) - (not (file-directory-p f)) - (or (not file) - (file-newer-than-file-p f file))) - (setq file f))))))) + (concat (or cmd-name (symbol-name minor-mode)) " " (or init))) gud-minibuffer-local-map nil hist-sym)))