Next: Load slynk code in external file.

master
Pierre Neidhardt 2020-05-09 11:46:32 +02:00
parent 8c94141f1f
commit d616d21770
2 changed files with 11 additions and 10 deletions

View File

@ -223,16 +223,7 @@ format."
(load-system :slynk)
(when (find-package :slynk)
(define-command start-slynk (&optional (slynk-port *swank-port*))
"Start a Slynk server that can be connected to, for instance, in
Emacs via SLY.
Warning: This allows Next to be controlled remotely, that is, to
execute arbitrary code with the privileges of the user running Next.
Make sure you understand the security risks associated with this
before running this command."
(slynk:create-server :port slynk-port :dont-close t)
(echo "Slynk server started at port ~a" slynk-port)))
(next::load-lisp "/home/ambrevar/dotfiles/.config/next/slynk.lisp"))
(defvar +dev-data-profile+ (make-instance 'data-profile :name "dev")

10
.config/next/slynk.lisp Normal file
View File

@ -0,0 +1,10 @@
(define-command start-slynk (&optional (slynk-port *swank-port*))
"Start a Slynk server that can be connected to, for instance, in
Emacs via SLY.
Warning: This allows Next to be controlled remotely, that is, to
execute arbitrary code with the privileges of the user running Next.
Make sure you understand the security risks associated with this
before running this command."
(slynk:create-server :port slynk-port :dont-close t)
(echo "Slynk server started at port ~a" slynk-port))