unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Default remote user name in tramp
@ 2005-09-15  7:42 Slawomir Nowaczyk
  2005-09-15 21:08 ` Michael Albinus
  0 siblings, 1 reply; 6+ messages in thread
From: Slawomir Nowaczyk @ 2005-09-15  7:42 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 960 bytes --]

Hello,

Is there any chance to have the following small patch applied to
tramp.el? It allows one to specify default user name for remote hosts.
 
Some time ago tramp used to take user-login-name as a default remote
user name if it was not specified by "user@host". Now, however,
default user name is nil -- which makes tramp not work unless user
name is specified on every request, at least for me (I use "plink"
method and it doesn't seem to recognise remote prompt "login as:" and
keeps waiting for password prompt).

With my patch one can specify user name to use in such cases (it seems
to work, but I am quite new to elisp and don't claim to understand
tramp code). Note that in the default case, if user doesn't change the
value of tramp-default-username variable, my patch doesn't change
anything.

-- 
 Best wishes,
   Slawomir Nowaczyk
     ( slawomir.nowaczyk.847@student.lu.se )

Make Lots of Money, Enjoy the Work, Operate Within the Law: Choose 2

[-- Attachment #2: tramp.diff --]
[-- Type: application/octet-stream, Size: 662 bytes --]

*** tramp.el	Mon Aug 15 15:25:27 2005
--- tramp.el	Wed Sep 14 23:44:40 2005
***************
*** 165,170 ****
--- 165,172 ----
    :group 'tramp
    :type 'boolean)
  
+ (defvar tramp-default-username nil)
+ 
  ;; Emacs case
  (eval-and-compile
    (when (boundp 'backup-directory-alist)
***************
*** 6706,6712 ****
  	  (make-tramp-file-name
  	   :multi-method nil
  	   :method method
! 	   :user (or user nil)
  	   :host host
  	   :localname localname))))))
  
--- 6708,6714 ----
  	  (make-tramp-file-name
  	   :multi-method nil
  	   :method method
! 	   :user (or user tramp-default-username)
  	   :host host
  	   :localname localname))))))
  

[-- Attachment #3: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-09-21 20:37 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-15  7:42 Default remote user name in tramp Slawomir Nowaczyk
2005-09-15 21:08 ` Michael Albinus
2005-09-16 10:55   ` Slawomir Nowaczyk
2005-09-18 10:50     ` Michael Albinus
2005-09-21 14:38       ` Slawomir Nowaczyk
2005-09-21 20:37         ` Michael Albinus

Code repositories for project(s) associated with this public inbox

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

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).