Next: Fix eval-in-emacs next-user package substitution.

master
Pierre Neidhardt 2019-12-09 15:35:57 +01:00
parent 27eec69f58
commit c52ac5a0b0
1 changed files with 5 additions and 4 deletions

View File

@ -7,12 +7,13 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun eval-in-emacs (&rest s-exps)
"Evaluate S-exps with `emacsclient'."
(let ((s-exps-string (str:replace-all
(let ((s-exps-string (cl-ppcre:regex-replace-all
;; Discard the package prefix.
"next::" ""
"next-user::?"
(write-to-string
`(progn ,@s-exps) :case :downcase))))
(log:debug "Sending to Emacs: ~a" s-exps-string)
`(progn ,@s-exps) :case :downcase)
"")))
(log:debug "Sending to Emacs: ~s" s-exps-string)
(ignore-errors (uiop:run-program
(list "emacsclient" "--eval" s-exps-string)))))