| Paste number 17592: | Emacs config for new slime tramp link. |
| Pasted by: | Birdman |
| When: | 3 years, 3 months ago |
| Share: | Tweet this! | http://paste.lisp.org/+DKO |
| Channel: | None |
| Paste contents: |
;;Add to the slime-filename-translations one that will use tramp to connect to
;; a remote host as given by ip here (if remote-host is absent it will use
;; the value of machine-instance).
(push (slime-create-filename-translator :machine-instance "mahes"
:remote-host "10.10.10.1"
:username "nathan")
slime-filename-translations)
;;if you have a special configuration for connecting to a server
;; such as tunneling through NAT or whatever, you can add a method "NewMethod"
;; with special configuration
;; (this isn't necessary if default tramp works for you.)
;;Here I defined a new method "mahes", to corespond to the remote machine-instance.
(setq tramp-methods
(acons "mahes"
;;I copied this out of an existing one for tramp.
'((tramp-login-program "plink")
(tramp-copy-program nil)
(tramp-remote-sh "/bin/sh")
(tramp-login-args (("10.10.10.1")
("-l" "%u")
("-P" "40022") ;;special port
("-ssh")))
(tramp-copy-args nil)
(tramp-copy-keep-date-arg nil)
(tramp-password-end-of-line "xy"))
tramp-methods))
;;if you are connecting to the ip 10.10.10.1 with any user, use tramp "mahes"
(push '("10.10.10.1" nil "mahes") tramp-default-method-alist)
Annotations for this paste:
| Annotation number 2: | Correction to method name |
| Pasted by: | Birdman |
| When: | 3 years, 3 months ago |
| Share: | Tweet this! | http://paste.lisp.org/+DKO#2 |
| Paste contents: |
;; In the initial example the "NewMethod" being created is actually named "mahes" in this case, the same as the server we are connecting to.| Annotation number 1: | Simpler, equivalent version |
| Pasted by: | Birdman |
| When: | 3 years, 3 months ago |
| Share: | Tweet this! | http://paste.lisp.org/+DKO#1 |
| Paste contents: |
;;since i am hardcoding the IP in the "mahes" method, i can just connect
;;everything with the machine-instance name.
(push (slime-create-filename-translator :machine-instance "mahes"
:username "nathan")
slime-filename-translations)
(setq tramp-methods
(acons "mahes"
;;I copied this out of an existing one for tramp.
'((tramp-login-program "plink")
(tramp-copy-program nil)
(tramp-remote-sh "/bin/sh")
(tramp-login-args (("10.10.10.1") ;hardcode ip
("-l" "%u")
("-P" "40022") ;;special port
("-ssh")))
(tramp-copy-args nil)
(tramp-copy-keep-date-arg nil)
(tramp-password-end-of-line "xy"))
tramp-methods))
(push '("mahes" nil "mahes") tramp-default-method-alist)
;;ope filename: /[nathan@mahes]~/frob.lisp
;;slime will automatically open files: /[mahes/nathan@mahes]/home/nathan/frob.lisp