Seems that I botched it a bit and it tried to proxy local `sudo'
connections via SSH. Seems better now.
(let ((rootlyness (cond ((executable-find "really") "really")
((executable-find "become") "become")
((executable-find "sudo") "sudo")
(let ((rootlyness (cond ((executable-find "really") "really")
((executable-find "become") "become")
((executable-find "sudo") "sudo")
+ (t "su")))
+ (this-host (concat "\\`\\(localhost\\|"
+ (system-name) "\\|\\)\\'"))
+ (this-user (concat "\\`\\(" (user-login-name) "\\|"
+ (user-real-login-name) "\\|\\)\\'")))
(setq tramp-default-method-alist
(setq tramp-default-method-alist
- `(("\\`\\(localhost\\|\\)\\'" "" ,rootlyness)
- (nil "." ,rootlyness))))
- (setq tramp-default-proxies-alist
- `(("\\`\\(localhost\\|\\)\\'" nil nil)
- (nil "\\`root\\'" "/ssh:%h:")))))
+ `((,this-host nil ,rootlyness)
+ (nil ,this-user "ssh")
+ (nil "." ,rootlyness)))
+ (setq tramp-default-proxies-alist
+ `((,this-host nil nil)
+ (nil "." "/ssh:%h:"))))))
;;;--------------------------------------------------------------------------
;;; General fontification.
;;;--------------------------------------------------------------------------
;;; General fontification.