[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Q on using shell mode remotely
From: |
Drew Adams |
Subject: |
RE: Q on using shell mode remotely |
Date: |
Mon, 31 Jul 2006 11:05:24 -0700 |
Drew Adams wrote:
> When I use M-x telnet, I get a prompt that looks like this:
>
> > 8:34am
...
> Any ideas on how to deal with this? Either 1) how to
> recognize the presence of the added time (appearing at the left)
> and treat it as part of the prompt, or 2) (not as good, because
> it won't help others who use my code) how to tell telnet not to
> use the time part of the prompt? Is there some
> variable similar to `comint-prompt-regexp' that will pick up
> $rprompt (or the concatenation of $prompt and $rprompt)?
Why can't you just add a time pattern to telnet-prompt-pattern, which is
used to set the buffer-local value of comint-prompt-pattern:
(eval-after-load "telnet"
'(setq telnet-prompt-pattern
(concat telnet-prompt-pattern
"\\([12]?[0-9]:[0-5][0-9][ap]m\\)?")))
Thanks again. I didn't know about `telnet-prompt-pattern'. I used `C-h m'
and searched for "prompt", but the only occurences there are
`comint-next-prompt' and `comint-previous-prompt'. I found nothing in the
manual either. (I should have just used completion or apropos to look for a
"telnet-" prompt variable.)
I'll use `telnet-prompt-pattern', myself, to hack this problem, but it would
be good if there were a variable that dealt with $rprompt somehow.