help-emacs-windows
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [h-e-w] Emacs 24 with tramp on windows 7 can't find plink


From: Eli Zaretskii
Subject: Re: [h-e-w] Emacs 24 with tramp on windows 7 can't find plink
Date: Tue, 11 Mar 2014 18:56:44 +0200

> Date: Mon, 10 Mar 2014 23:54:04 -0700
> From: m silverstri <address@hidden>
> 
> When I emacs 24 on windows 7 tryinng to open a remote file by C-x C-f
> /address@hidden:/home/mikes , tramp cannot find plink program. And
> i did print the exec path, I do have C:/Programs/Putty in my exec
> path:
> 
> exec-path is a variable defined in `C source code'.
> Its value is
> ("C:/Programs/PuTTy" .....)
> 
> But I still get
> 
> plink -load 10.136.11.77 -t env 'TERM=dumb' 'PROMPT_COMMAND=' 'PS1=#$
> ' /bin/sh && exit || exit
> plink is not recognized as an internal or external command, operable
> program or batch file.
> 
> I have this in my .emacs:
> 
> (require 'tramp)
> 
> (require 'package)
> (add-to-list 'package-archives
>              '("melpa" . "http://melpa.milkbox.net/packages/";) t)
> 
> 
> (add-to-list 'exec-path "C:/Programs/PuTTy")
> (if (eq system-type 'windows-nt)
>     (setq tramp-default-method "plinkx"))
> 
> any idea how to fix my problem?

Yes: don't modify exec-path directly; instead, add C:\Programs\PuTTY
to your PATH, before you invoke Emacs.  Then Emacs will automatically
add that directory to exec-path.

The way you did it is subtly broken because plink is invoked through
the shell, and the shell doesn't use exec-path, it uses PATH.  You
should never do this if you care about your sanity.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]