all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: lyallp <Lyall.Pearce@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Help with Emacs 22.2.1 using TRAMP and PuTTY/plink
Date: Sun, 4 May 2008 04:57:00 -0700 (PDT)	[thread overview]
Message-ID: <e00cee5b-7692-43da-8874-6af3814b1c3b@k1g2000prb.googlegroups.com> (raw)
In-Reply-To: mailman.11172.1209900210.18990.help-gnu-emacs@gnu.org

Thanks for replying Michael.

I don't consider myself a noob at bash, but my problem is that I do
not know how to determine what the terminal is.
I can determine if it's an interactive login, but that does not help
me when it comes to TRAMP.
How do I differentiate me, from TRAMP?
Another part of my problem is that the server in question, on which I
am not an admin, sets TERM=vt100 in /etc/profile, unconditionally.

My PS1 string contains an escape sequence which updates my XTERM
window title with my "Host - User - pwd".

I looked in TRAMP and it's simply looking for a regexp (contained in
tramp-shell-prompt-pattern), which includes, amongst other junk, a
newline followed by $ space. (which my PS1 does have - I have my
username/host/pwd followed by a newline, then $ space - rather than
having the $ space at the end of a potentially long prompt string).

Even if it did think my prompt was earlier in the string, it does not
matter, so long as it proceeds, as almost the first thing TRAMP does
is start up /bin/sh with a prompt defined by itself as "$ "
The problem is it doesn't find my prompt without changing the end of
line parameter, which then screws up the execution of /bin/sh because
the character is interpreted as forming part of the /bin/sh filename
(much like if you edit a shell script with a windows editor - the #!/
bin/bash suddenly has a CR on the end and the script refuses to
execute because the system cannot find an executable called "/bin/bash
\r".

...Lyall

On May 4, 8:23 pm, Michael Albinus <michael.albi...@gmx.de> wrote:
> lyallp <Lyall.Pea...@gmail.com> writes:
> > unset HISTORY\r
> >>^H^[]2 the_host - user_name - /home/user_name user_name@the_host:>^H~^M
> > $
> >>^H^[]2 the_host - user_name - /home/user_name user_name@the_host:>^H~^M
> > $
>
> > Any assistance would be greatly appreciated.
>
> I'm not confident that Tramp's EOL handling is guilty. It looks like
> your prompt includes escape sequences, which disturb Tramp in
> general. You should suppress such settings, for example by setting your
> prompt depending on the terminal type.
>
> > ...Lyall
>
> Best regards, Michael.



  parent reply	other threads:[~2008-05-04 11:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-01  6:35 Help with Emacs 22.2.1 using TRAMP and PuTTY/plink lyallp
2008-05-04 11:23 ` Michael Albinus
     [not found] ` <mailman.11172.1209900210.18990.help-gnu-emacs@gnu.org>
2008-05-04 11:57   ` lyallp [this message]
2008-05-04 21:40     ` Michael Albinus
     [not found]     ` <mailman.11182.1209937216.18990.help-gnu-emacs@gnu.org>
2008-05-05  8:19       ` Livin Stephen
2008-05-05  9:33         ` lyallp
2008-05-06  0:05           ` lyallp

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=e00cee5b-7692-43da-8874-6af3814b1c3b@k1g2000prb.googlegroups.com \
    --to=lyall.pearce@gmail.com \
    --cc=help-gnu-emacs@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 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.