all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Slawomir Nowaczyk <slawomir.nowaczyk.847@student.lu.se>
Subject: Default remote user name in tramp
Date: Thu, 15 Sep 2005 09:42:07 +0200	[thread overview]
Message-ID: <20050915093637.5B63.SLAWOMIR.NOWACZYK.847@student.lu.se> (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

             reply	other threads:[~2005-09-15  7:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-15  7:42 Slawomir Nowaczyk [this message]
2005-09-15 21:08 ` Default remote user name in tramp 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

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=20050915093637.5B63.SLAWOMIR.NOWACZYK.847@student.lu.se \
    --to=slawomir.nowaczyk.847@student.lu.se \
    /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.