From 5d8974b709bfaa9de7404fbb4f18a321a1daa678 Mon Sep 17 00:00:00 2001 From: Ethan Moss <74180458+ethanmoss1@users.noreply.github.com> Date: Mon, 8 Sep 2025 17:29:03 +0100 Subject: [PATCH 1/2] Update zotra.el - Changed custom type --- zotra.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zotra.el b/zotra.el index c2315b7..5e2ca38 100644 --- a/zotra.el +++ b/zotra.el @@ -125,7 +125,7 @@ or zotra-server." This is only relevant when `zotra-backend' is either citoid, translation-server or zotra-server." :group 'zotra - :type 'string) + :type '(boolean)) (defcustom zotra-cli-command From 6fb6d4807830ec4b8ec4696b15d4b46e8db9ad0e Mon Sep 17 00:00:00 2001 From: Ethan Moss Date: Mon, 8 Sep 2025 20:16:34 +0100 Subject: [PATCH 2/2] updated zotra with cmd server --- zotra.el | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/zotra.el b/zotra.el index 5e2ca38..41908a0 100644 --- a/zotra.el +++ b/zotra.el @@ -293,7 +293,7 @@ If SILENT-ERROR is nil and the command fails, raise a user-error." (funcall response-handler response-code output)) output)) - +(defvar zotra-local-server-cmd nil) (defvar zotra-local-server-process nil) (defvar zotra-local-server-process-directory nil) (defvar zotra-local-server-process-buffer-name "*zotra-local-server*") @@ -317,8 +317,10 @@ If SILENT-ERROR is nil and the command fails, raise a user-error." (get-buffer-create zotra-local-server-process-buffer-name)) :noquery t - :command (list "npm" "start" "--prefix" - zotra-local-server-directory))) + :command (if zotra-local-server-cmd + (list zotra-local-server-cmd "server") + (list "npm" "start" "--prefix") + zotra-local-server-directory))) (setq zotra-local-server-process-directory zotra-local-server-directory) (sleep-for 2))))) @@ -331,7 +333,7 @@ If SILENT-ERROR is nil and the command fails, raise a user-error." ;; For `zotra-server', `translation-server' and `zotra-cli' backends (defun zotra-contact-server (data content-type endpoint &optional param) - (cond + (cond ((member zotra-backend '(translation-server zotra-server)) (zotra-retrieve-synchronously (concat zotra-server-path "/" endpoint @@ -437,7 +439,7 @@ This function does NOT run the hooks in `zotra-after-get-bibtex-entry-hook'." (t (zotra-get-entry-from-json (zotra-get-json data endpoint) entry-format)))) - + (defun zotra-query-url-or-search-string (&optional url-or-search-string) "Ask the user where to get bibliographic data from.