emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/kiwix 05fdb07 07/13: Replace async-shell-command with s


From: Stefan Monnier
Subject: [elpa] externals/kiwix 05fdb07 07/13: Replace async-shell-command with start-process in kiwix-launch-server
Date: Mon, 4 Jan 2021 01:12:51 -0500 (EST)

branch: externals/kiwix
commit 05fdb078b3e72914c9da7182ac621c008e1847af
Author: stardiviner <numbchild@gmail.com>
Commit: stardiviner <numbchild@gmail.com>

    Replace async-shell-command with start-process in kiwix-launch-server
---
 kiwix.el | 30 +++++++++++++++++-------------
 1 file changed, 17 insertions(+), 13 deletions(-)

diff --git a/kiwix.el b/kiwix.el
index 47cae9d..0a3d466 100644
--- a/kiwix.el
+++ b/kiwix.el
@@ -190,20 +190,24 @@ Like in function `kiwix-ajax-search-hints'.")
 (defun kiwix-launch-server ()
   "Launch Kiwix server."
   (interactive)
-  (let ((library-option "--library ")
-        (port (concat "--port=" kiwix-server-port " "))
-        (daemon "--daemon ")
-        (library-path kiwix-default-library-dir))
+  (let ((library-path kiwix-default-library-dir))
     (if kiwix-server-use-docker
-        (async-shell-command
-         (concat "docker container run -d "
-                 "--name kiwix-serve "
-                 "-v " (file-name-directory library-path) ":" "/data "
-                 "kiwix/kiwix-serve "
-                 "--library library.xml"))
-      (async-shell-command
-       (concat kiwix-server-command
-               library-option port daemon (shell-quote-argument 
library-path))))))
+        (start-process
+         "kiwix-server"
+         " *kiwix server*"
+         "docker"
+         "container" "run" "-d"
+         "--name" "kiwix-serve"
+         "-v" (concat (file-name-directory library-path) ":" "/data")
+         "kiwix/kiwix-serve"
+         "--library" "library.xml")
+      (start-process
+       "kiwix-server"
+       " *kiwix server*"
+       kiwix-server-command
+       "--port" kiwix-server-port
+       "--daemon"
+       "--library" (concat library-path "library.xml")))))
 
 (defun kiwix-capitalize-first (string)
   "Only capitalize the first word of STRING."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]