From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#7461: 23.2; gud.el always uses comint-prompt-regexp; things can break if prompt is changed Date: Thu, 26 Aug 2021 19:47:54 +0200 Message-ID: <8735qwxflh.fsf_-_@gnus.org> References: <20101121174502.GA14674@rolando-laptop> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22645"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Rolando Pereira , 7461@debbugs.gnu.org To: Glenn Morris Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Aug 26 20:17:46 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mJJwd-0005eh-Uq for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 26 Aug 2021 20:17:43 +0200 Original-Received: from localhost ([::1]:43770 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mJJwc-0008Ux-TO for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 26 Aug 2021 14:17:42 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54770) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mJJUs-0005LO-LG for bug-gnu-emacs@gnu.org; Thu, 26 Aug 2021 13:49:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:38833) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mJJUs-00055l-Bd for bug-gnu-emacs@gnu.org; Thu, 26 Aug 2021 13:49:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mJJUs-0003mI-39 for bug-gnu-emacs@gnu.org; Thu, 26 Aug 2021 13:49:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 26 Aug 2021 17:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 7461 X-GNU-PR-Package: emacs Original-Received: via spool by 7461-submit@debbugs.gnu.org id=B7461.163000008714438 (code B ref 7461); Thu, 26 Aug 2021 17:49:02 +0000 Original-Received: (at 7461) by debbugs.gnu.org; 26 Aug 2021 17:48:07 +0000 Original-Received: from localhost ([127.0.0.1]:50376 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mJJTy-0003ko-S5 for submit@debbugs.gnu.org; Thu, 26 Aug 2021 13:48:07 -0400 Original-Received: from quimby.gnus.org ([95.216.78.240]:49684) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mJJTx-0003kG-IO for 7461@debbugs.gnu.org; Thu, 26 Aug 2021 13:48:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=4SoWH6etJn76CorsBXljQrWanc7nZYJa+o8D1MOlwZo=; b=aCovNC7K0p16RNLNzm4fUwyhs0 vHUWkcE6H/mzvgry3zT+7+DuaIJI6Otp3CzoZptvjFVN0lrkf8R8C9z65F3MPRlgSGEkNShG/JZ00 DqHP22qXctcdURS4NtbSS4YdFn1PaRnuT2dzit/sx+N/Ap83ZPIHVFR4d50DUcBGsjVI=; Original-Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mJJTm-0003dJ-OA; Thu, 26 Aug 2021 19:47:59 +0200 In-Reply-To: (Glenn Morris's message of "Mon, 22 Nov 2010 21:01:14 -0500") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:212753 Archived-At: Glenn Morris writes: >> When running gdb inside emacs, either by doing M-x gdb or M-x gud-gdb, >> if the prompt is set to something that isn't "(gdb)" (or similar, see >> the examples below), pressing TAB doesn't do the completion of >> commands, functions or variables. > > Thank you for the complete example. > > It looks like, after you have changed the prompt, you can set the > local value of comint-prompt-regexp to match it. > > More generally, when comint-use-prompt-regexp is nil (which it is by > default), gud.el probably ought not to try and use comint-prompt-regexp. > Instead it should use whatever field properties comint adds. (I'm going through old bug reports that unfortunately weren't resolved at the time.) Looking at the gud code, that sounds like a good idea --- but unfortunately comint doesn't put any specific field property on the prompt. Instead it seems like it marks all the data output, including the prompt, as `output'. Which makes sense, but doesn't help us with distinguishing whether the line we're at is a prompt. I think. And I don't think we can change the fields here, because I'm guessing a lot of stuff depends on all the output being the same field. But comint does indeed know that it's a prompt... so we could add another property here -- like `comint-prompt' on the prompts, and then use that. Anybody have any other ideas here? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no