all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Kevin Rodgers <ihs_4664@yahoo.com>
Subject: Re: Q on using shell mode remotely
Date: Tue, 01 Aug 2006 17:52:03 -0600	[thread overview]
Message-ID: <eaopgk$hlm$1@sea.gmane.org> (raw)
In-Reply-To: <DNEMKBNJBGPAOPIJOOICKEBKDIAA.drew.adams@oracle.com>

Drew Adams wrote:
> Kevin Rodgers wrote:
>     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,

Please let us know if it works.  Looking at telnet.el:

1. M-x telnet runs telnet-program via make-comint, with
    telnet-initial-filter as the process filter, then calls telnet-mode.

2. telnet-mode sets the buffer-local value of comint-prompt-regexp to
    telnet-prompt-pattern.

3. telnet-initial-filter calls invokes
    telnet-check-software-type-initialize, then resets the process filter
    to telnet-filter.

    a. If telnet-check-software-type-initialize sees "unix" in its STRING
    argument, it resets telnet-prompt-pattern to comint-prompt-regexp;
    then regardless of STRING, it resets comint-prompt-regexp to
    telnet-prompt-pattern.

So it seems that (3) could prevent (2) from accomplishing its intended
effect, if (3) ran before (2).

Then, comint.el ignores comint-prompt-regexp anyway unless
comint-use-prompt-regexp is non-nil -- but it is nil by default, and
telnet doesn't set it.  So comint is assigning `field' text properties
to distinguish program (csh) output such as prompts from user input.

> but it would
> be good if there were a variable that dealt with $rprompt somehow.

I don't see how it could.  The remote csh presumably displays $rprompt
on the right side of the screen via terminal escape codes or simple
ASCII control characters; but the telnet subprocess is discarding that
data, either explicitly via telnet-filter or implicitly via process-
connection-type.  So you end up with $rprompt displayed immediately
adjacent to $prompt in your *telnet-HOST* buffer, and you've got to
account for that via telnet-prompt-regexp.

-- 
Kevin

  reply	other threads:[~2006-08-01 23:52 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-28 21:33 Q on using shell mode remotely Drew Adams
2006-07-28 21:37 ` Drew Adams
2006-07-31 15:09 ` Kevin Rodgers
2006-07-31 16:35   ` Drew Adams
2006-07-31 17:51     ` Kevin Rodgers
2006-07-31 18:05       ` Drew Adams
2006-08-01 23:52         ` Kevin Rodgers [this message]
2006-08-02  0:21           ` Emacs\compiling Java Frank Murray
2006-08-02  3:35             ` Eli Zaretskii
2006-08-02 17:54               ` Kevin Rodgers
     [not found]           ` <mailman.4745.1154478071.9609.help-gnu-emacs@gnu.org>
2006-08-02 11:13             ` Hadron Quark
2006-08-02 15:42           ` Q on using shell mode remotely Drew Adams
2006-08-02 16:33             ` Drew Adams
2006-08-04  8:00             ` Drew Adams
     [not found] <mailman.4613.1154122648.9609.help-gnu-emacs@gnu.org>
2006-07-28 21:46 ` David Kastrup
2006-07-28 22:56   ` Drew Adams
2006-07-29  8:33     ` Eli Zaretskii
2006-07-29 13:47       ` Drew Adams

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='eaopgk$hlm$1@sea.gmane.org' \
    --to=ihs_4664@yahoo.com \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.