Francis Litterio <[EMAIL PROTECTED]> writes: > 2. Next, my .emacs file executes this horror: > > (let ((shell-file-name "c:/apps/cygwin/bin/bash.exe")) > (shell-command "echo /tmp/ssh-*/agent.* 2>/dev/null" " *temp*")) > (save-excursion > (set-buffer " *temp*") > (end-of-line) > (if (> (buffer-size) 5) > (setenv "SSH_AUTH_SOCK" (buffer-substring (point-min) (point))) > (ding) > (message "my-general.el: WARNING: ssh-agent is not running!") > (sit-for 3))) > > The above mess is to cope with what I think is a fairly common > situation -- namely, where the user launches NT Emacs using a > shortcut on the desktop but starts ssh-agent from a bash shell also > launched from the desktop. Since Emacs is not a descendant of > ssh-agent, it does not inherit the SSH_AUTH_SOCK environment > variable (and neither does scp).
The point is that, if you want to use Cygwin environment you should start Emacs under Cygwin control. The shortcut on your desktop might point to something like "C:\apps\Cygwin\home\franl\emacs.bat". And this file could start something like "C:\Cygwin\Cygwin\bin\bash --login ~/emacs". At least that's the way I do it ... You cannot expect that Tramp under Windows will be used together with Cygwin only. > Maybe the general solution is to create a tramp-methods key named > tramp-pre-rcp-hook, which is run just before tramp-rcp-program > executes? That sounds good to me. The canonical way with Emacs for private configuration. > This is to cope with the fact that, by default, NT Emacs has > temporary-file-directory set to C:/DOCUME~1/username/LOCALS~1/Temp/, > which is unacceptable to Cygwin's scp as the second argument, because > scp interprets the "c:" as a hostname! The substring call chops off > the "C:", leaving tmpfil set to a value that is acceptable to both > Cygwin's scp and NT Emacs (and, more importantly, means the same > thing to both of them). Again, if you enter Emacs from a proper Cygwin environment, there shouldn't be a problem. Setting $TMP in your login scripts might help I guess. Best regards, Michael. _______________________________________________ Tramp-devel mailing list [EMAIL PROTECTED] http://mail.freesoftware.fsf.org/mailman/listinfo/tramp-devel
