From: Lars Ingebrigtsen <larsi@gnus.org>
To: Glenn Morris <rgm@gnu.org>
Cc: Rolando Pereira <finalyugi@sapo.pt>, 7461@debbugs.gnu.org
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 [thread overview]
Message-ID: <8735qwxflh.fsf_-_@gnus.org> (raw)
In-Reply-To: <bwmxp06bo5.fsf@fencepost.gnu.org> (Glenn Morris's message of "Mon, 22 Nov 2010 21:01:14 -0500")
Glenn Morris <rgm@gnu.org> 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
prev parent reply other threads:[~2021-08-26 17:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-21 17:45 bug#7461: 23.2; Gdb only does tab completion inside Emacs when prompt is (gdb) Rolando Pereira
2010-11-23 2:01 ` Glenn Morris
2021-08-26 17:47 ` 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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8735qwxflh.fsf_-_@gnus.org \
--to=larsi@gnus.org \
--cc=7461@debbugs.gnu.org \
--cc=finalyugi@sapo.pt \
--cc=rgm@gnu.org \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).