From c52ac5a0b034da73fd7f3a9257da2c66e88347c2 Mon Sep 17 00:00:00 2001 From: Pierre Neidhardt Date: Mon, 9 Dec 2019 15:35:57 +0100 Subject: [PATCH] Next: Fix eval-in-emacs next-user package substitution. --- .config/next/init.lisp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.config/next/init.lisp b/.config/next/init.lisp index 5c6b9807..5fdfdc8c 100644 --- a/.config/next/init.lisp +++ b/.config/next/init.lisp @@ -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)))))