Advertisement
Guest User

Untitled

a guest
May 6th, 2017
619
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. in ~/.sbclrc pe server
  2. (require 'asdf)
  3. (asdf:oos 'asdf:load-op 'swank)
  4. (setf swank:*use-dedicated-output-stream* nil)
  5. (setf swank:*communication-style* :fd-handler)
  6. (swank:create-server :dont-close t)
  7.  
  8.  
  9.  
  10. in ~/.emacs pe server
  11. (add-to-list 'load-path "/usr/share/common-lisp/source/slime/")
  12. (setq inferior-lisp-program "/usr/bin/sbcl")
  13. (require 'slime)
  14. (slime-setup)
  15. (setq slime-net-coding-system 'utf-8-unix)
  16. ;(slime-connect "127.0.0.1" 4005)
  17.  
  18.  
  19.  
  20.  
  21.  
  22. ;;;;;; asta este in .emacs-ul de pe client, nu stiu cat de aici este necesar si pentru ce
  23. ;;;;;; tramp sigur trebuie
  24. ;(setq inferior-lisp-program "D:/kit/programare/lisp/lispbox-0.7/clisp-2.37/clisp.exe")
  25. ;plink -L 4005:localhost:4005 <sesiunea ssh> ubuntu -pw <parola>
  26.  
  27. (add-to-list 'load-path "D:/kit/programare/lisp/slime/slime-2009-01-26/")
  28. (setq slime-net-coding-system 'utf-8-unix)
  29.  
  30. (require 'slime)
  31.  
  32. (require 'tramp)
  33. (setq tramp-default-method "plink")
  34. (setq shell-prompt-pattern "^.*\\$ ")
  35. (setq tramp-password-end-of-line "xx")
  36.  
  37. (add-hook 'lisp-mode-hook (lambda () (slime-mode t)))
  38. (add-hook 'inferior-lisp-mode-hook (lambda () (inferior-slime-mode t)))
  39.  
  40. (setq lisp-indent-function 'common-lisp-indent-function
  41.       slime-complete-symbol-function 'slime-fuzzy-complete-symbol)
  42.  
  43. (slime-setup)
  44.  
  45. (defvar *my-box-tramp-path*
  46.   "/plink:razvan@172.16.245.144:")
  47.  
  48. (defvar *current-tramp-path* nil)
  49. (defun connect-to-host (path)
  50.   (setq *current-tramp-path* path)
  51.   (setq slime-translate-from-lisp-filename-function
  52.     (lambda (f)
  53.       (concat *current-tramp-path* f)))
  54.   (setq slime-translate-to-lisp-filename-function
  55.     (lambda (f)
  56.       (substring f (length *current-tramp-path*))))
  57.   (slime-connect "localhost" 4005))
  58.  
  59. (defun my-box-slime ()
  60.   (interactive)
  61.   (connect-to-host *my-box-tramp-path*))
  62.  
  63. (defun my-box-homedir ()
  64.   (interactive)
  65.   (find-file (concat *zarniwoop-tramp-path* "/home/me/")))
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72. dupa ce se fac toate magariile astea se deschide emacs si se da M-x slime-connect, se accepta 127.0.0.1 si portul 4005 (daca nu cumva a fost modificat in .sbclrc) ; posibil sa trebuiasca dat de 2 ori enter? Apoi emacs va evalua cu C-M-x expresia curenta din bufferul curent
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement