* Strange (to me ) problem with TRAMP
@ 2008-10-01 9:47 Lorenzo Isella
0 siblings, 0 replies; 4+ messages in thread
From: Lorenzo Isella @ 2008-10-01 9:47 UTC (permalink / raw)
To: help-gnu-emacs
Dear All,
I am experimenting several shells to use within emacs. I am quite
pleased with eshell, right now, but I am rather puzzled at the strange
message I get in a separate buffer if, for instance, I type
cd /
and press TAB.
See below:
ssh: Could not resolve hostname fcp: Name or service not known
Process *tramp/scp fcp* exited abnormally with code 255
Otherwise, I have no trouble. I could not find anything about tramp in
my .emacs file (nor I ever do anything similar to accessing files
remotely).
I paste below my customization of eshell, in case I may have done
something wrong:
;; eshell autocompletion for choosing directories
(defun eshell-get-dir-from-dir-ring (dir-name)
"Interactively select directory from eshell-last-dir-ring"
(interactive (list (flet ((iswitchb-make-buflist
(default)
(setq iswitchb-buflist (ring-elements
eshell-last-dir-ring))))
(iswitchb-read-buffer "Change to directory: "))))
dir-name)
(defun eshell-electric-insert-dir ()
"Handy when copying and moving files to, or changing to a certain
directory. On the prompt, type a space, a colon (`:') and call this function,
preferably bound to the TAB key."
(interactive)
(if (save-excursion
(goto-char (- (point) 2))
(if (looking-at " :")
t
nil))
(let ((dir (call-interactively 'eshell-get-dir-from-dir-ring)))
(delete-char -1)
(insert (pcomplete-quote-argument dir)))
(pcomplete)))
(custom-set-variables
'(eshell-scroll-to-bottom-on-input t) ; always insert at the bottom
'(eshell-scroll-to-bottom-on-output t) ; always add output at the bottom
'(eshell-scroll-show-maximum-output t) ; scroll to show max possible output
'(eshell-completion-autolist t) ; show completion list when ambiguous
'(eshell-input-ignoredups t) ; no duplicates in command history
'(eshell-completion-addsuffix t) ; insert space/slash after
file completion
)
Does anyone have any idea of what may be causing my (rather small)
inconvenience?
Kind Regards
Lorenzo
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Strange (to me ) problem with TRAMP
[not found] <mailman.20307.1222854444.18990.help-gnu-emacs@gnu.org>
@ 2008-10-01 14:34 ` Cor Gest
0 siblings, 0 replies; 4+ messages in thread
From: Cor Gest @ 2008-10-01 14:34 UTC (permalink / raw)
To: help-gnu-emacs
Some entity, AKA "Lorenzo Isella" <lorenzo.isella@gmail.com>,
wrote this mindboggling stuff:
(selectively-snipped-or-not-p)
> Dear All,
> I am experimenting several shells to use within emacs. I am quite
> pleased with eshell, right now, but I am rather puzzled at the strange
> message I get in a separate buffer if, for instance, I type
>
> cd /
> and press TAB.
> See below:
>
> ssh: Could not resolve hostname fcp: Name or service not known
>
> Process *tramp/scp fcp* exited abnormally with code 255
>
the TAB puts a colon in , as your code instructed it to do,
which now is interpreted as " /: " and seen as a sign to invoke tramp, but
there is no hostname, so it exits with that error.
auto-completion does have its drawbacks sometimes with unintended
consequences.
/hostname:/ will open a ssh-link to HOSTNAME and prompt you for a
passwd.
put in ~/.emacs:
;;; (setq shell-prompt-pattern ":")
Wich means the prompt-pattern of the shell of the machine you connect TO.
Put this line (for unix) or some other Windows smb equivalent prompt
in your .emacs is important here, otherwise tramp will wait
(and block emacs) for minutes.
You can preset some hosts like:
;;;(add-to-list 'tramp-default-method-alist '("hostname-1" "user1" "smb"))
;;;(add-to-list 'tramp-default-method-alist '("hostname-2" "user2" "ssh")
...
see more about tramp here:
http://www.gnu.org/software/emacs/manual/html_node/tramp/index.html
Cor
--
Mijn Tools zijn zo modern dat ze allemaal eindigen op 'saurus'
(defvar My-Computer '((OS . "GNU/Emacs") (IPL . "GNU/Linux")))
SPAM DELENDA EST http://www.clsnet.nl/mail.php
1st Law of surviving a gunfight : Have a gun
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Strange (to me ) problem with TRAMP
@ 2008-10-02 11:10 Lorenzo Isella
0 siblings, 0 replies; 4+ messages in thread
From: Lorenzo Isella @ 2008-10-02 11:10 UTC (permalink / raw)
To: cor; +Cc: help-gnu-emacs
>.put in ~/.emacs:
>;;; (setq shell-prompt-pattern ":")
>Wich means the prompt-pattern of the shell of the machine you connect TO.
>Put this line (for unix) or some other Windows smb equivalent prompt
>in your .emacs is important here, otherwise tramp will wait
>(and block emacs) for minutes.
>You can preset some hosts like:
>;;;(add-to-list 'tramp-default-method-alist '("hostname-1" "user1" "smb"))
>;;;(add-to-list 'tramp-default-method-alist '("hostname-2" "user2" "ssh")
Hello,
Thanks for your reply. I must be misunderstanding something, but I added the first line (uncommented!) you suggested to my .emacs file, but the problem I described (cd / + TAB calling TRAMP) in eshell remains the same.
Am I missing the obvious?
Kind Regards
Lorenzo Isella
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Strange (to me ) problem with TRAMP
[not found] <mailman.30.1222945856.25473.help-gnu-emacs@gnu.org>
@ 2008-10-02 12:14 ` Cor Gest
0 siblings, 0 replies; 4+ messages in thread
From: Cor Gest @ 2008-10-02 12:14 UTC (permalink / raw)
To: help-gnu-emacs
Some entity, AKA Lorenzo Isella <lorenzo.isella@gmail.com>,
wrote this mindboggling stuff:
(selectively-snipped-or-not-p)
> Thanks for your reply. I must be misunderstanding something, but I added the first line (uncommented!) you suggested to my .emacs file, but the problem I described (cd / + TAB calling TRAMP) in eshell remains the same.
> Am I missing the obvious?
this should work:
C-x C-f RET
/ssh:user1@host:/home/user1 RET
=> prompts you for a passwd
passwd RET
=> waits for that "foreign-prompt-pattern"
=> lists the directory of the foreign host
This does not work like this in eshell, in eshell you could just ssh
to a foreign host and start emacs on that foreign host.
Cor
--
Mijn Tools zijn zo modern dat ze allemaal eindigen op 'saurus'
(defvar My-Computer '((OS . "GNU/Emacs") (IPL . "GNU/Linux")))
SPAM DELENDA EST http://www.clsnet.nl/mail.php
1st Law of surviving a gunfight : Have a gun
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-10-02 12:14 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <mailman.20307.1222854444.18990.help-gnu-emacs@gnu.org>
2008-10-01 14:34 ` Strange (to me ) problem with TRAMP Cor Gest
[not found] <mailman.30.1222945856.25473.help-gnu-emacs@gnu.org>
2008-10-02 12:14 ` Cor Gest
2008-10-02 11:10 Lorenzo Isella
-- strict thread matches above, loose matches on Subject: below --
2008-10-01 9:47 Lorenzo Isella
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).