Next: Fix EVAL-IN-EMACS casing

master
Pierre Neidhardt 2018-12-17 10:41:44 +01:00
parent 0580104fdb
commit 8443dbd8e9
1 changed files with 8 additions and 5 deletions

View File

@ -14,11 +14,14 @@
(defun eval-in-emacs (&rest s-exps)
"Evaluate S-EXPS with emacsclient."
(uiop:run-program
(list "emacsclient" "--eval"
;; Discard the package prefix.
(ppcre:regex-replace-all
"next::" (prin1-to-string `(progn ,@s-exps)) ""))))
(let ((s-exps-string (cl-strings:replace-all
(write-to-string
`(progn ,@s-exps) :case :downcase)
;; Discard the package prefix.
"next::" "")))
(format *error-output* "Sending to Emacs:~%~a~%" s-exps-string)
(uiop:run-program
(list "emacsclient" "--eval" s-exps-string))))
(define-command org-capture ()
"Org-capture current page."