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

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

[nongnu] elpa/geiser-kawa 1ffe084 097/119: Fixes for windows support + R


From: Philip Kaludercic
Subject: [nongnu] elpa/geiser-kawa 1ffe084 097/119: Fixes for windows support + README.org: add instructions
Date: Sun, 1 Aug 2021 18:30:46 -0400 (EDT)

branch: elpa/geiser-kawa
commit 1ffe08473650a3309c6387ad60c1137cd7dbec53
Author: spellcard199 <spellcard199@protonmail.com>
Commit: spellcard199 <spellcard199@protonmail.com>

    Fixes for windows support + README.org: add instructions
---
 README.org                   | 32 +++++++++++++++++++++++++++++++-
 elisp/geiser-kawa-arglist.el |  2 +-
 elisp/geiser-kawa-deps.el    |  8 ++++++--
 elisp/geiser-kawa-globals.el |  1 +
 4 files changed, 39 insertions(+), 4 deletions(-)

diff --git a/README.org b/README.org
index d0c8321..38e1c8e 100644
--- a/README.org
+++ b/README.org
@@ -48,7 +48,9 @@ Only versions of Kawa > 3.1 are supported, mostly due to the 
fact that before th
 
 ** Try geiser-kawa without modifying your emacs configuration
 
-1. Get Emacs and [[https://github.com/cask/cask][Cask]] and make them 
available through your $PATH
+1. Prerequisites:
+     - =java=, =emacs= and [[https://github.com/cask/cask][cask]] available 
through your =$PATH=
+     - =$JAVA_HOME= environment variable set
 2. Clone this repository
   : git clone "https://gitlab.com/spellcard199/geiser-kawa.git";
 3. cd into the cloned dir:
@@ -63,6 +65,30 @@ To try geiser-kawa you need neither Maven nor Kawa:
 - =mvnw= ([[https://github.com/takari/maven-wrapper][maven-wrapper]]) takes 
care of downloading a project-specific Maven version
 - kawa-geiser has [[https://gitlab.com/groups/kashell/][Kawa's master branch]] 
as one of its dependencies. When =quickstart.el= calls =./mvnw package= 
(wrapped by =geiser-kawa-deps-mvnw-package=), it produces a jar that includes 
kawa-geiser and all its dependencies, including Kawa itself.
 
+** Manual Installation
+
+1. Prerequisites:
+     - =emacs=
+     - =java= available through your =$PATH=
+     - =$JAVA_HOME= environment variable set
+2. Install the =geiser= package in Emacs
+3. Clone this repository
+  : git clone "https://gitlab.com/spellcard199/geiser-kawa.git";
+4. Package java dependencies:
+     1. cd into =geiser-kawa=
+     2. run =./mvnw package=
+5. Add the elisp directory inside this project to Emacs' =load-path=:
+    : (add-to-list 'load-path "<path-to-geiser-kawa/elisp>")
+6. Require =kawa-geiser=:
+    : (require 'geiser-kawa)
+7. Either:
+     - Set the =geiser-kawa-use-included-kawa= variable to non-nil: to use the 
Kawa version included in =geiser-kawa=
+     - [[https://www.gnu.org/software/kawa/Getting-Kawa.html][Get Kawa]] and 
either:
+         - set the =geiser-kawa-binary= variable
+         - add =kawa= to =$PATH=
+8. Run kawa:
+    : M-x run-kawa
+
 ** About manual lookup
 
 To use the =geiser-doc-lookup-manual= feature you need a copy of the Kawa 
manual. You can either compile it from the Kawa source code or extract it from 
the pre-compiled Kawa release available on the Kawa website: 
https://www.gnu.org/software/kawa/Getting-Kawa.html.
@@ -190,6 +216,10 @@ The easiest way is:
      : scheme.runAsApplication(kawaArgs);
 4. Use the =geiser-connect= command from emacs and insert the port number we 
specified in the previous step when prompted
 
+** Is Windows supported?
+
+It seems to work, but I don't usually use Windows.
+
 ** Difference from 
[[https://gitlab.com/spellcard199/geiser-kawa-scheme][geiser-kawa-scheme]]
 
 This project (geiser-kawa) is a translation/rewrite of 
[[https://gitlab.com/spellcard199/geiser-kawa-scheme][geiser-kawa-scheme]], 
which has been my first attempt at writing geiser-kawa. After 
geiser-kawa-scheme confirmed me that a geiser-kawa implementation was possible 
I decided to rewrite the Kawa side using Kawa's Java API, for the several 
reasons:
diff --git a/elisp/geiser-kawa-arglist.el b/elisp/geiser-kawa-arglist.el
index f3f5dcd..a771a23 100644
--- a/elisp/geiser-kawa-arglist.el
+++ b/elisp/geiser-kawa-arglist.el
@@ -93,7 +93,7 @@ Argument CLASSPATH is a string containing the classpath."
 Argument BINARY argument passed by Geiser."
   (let* ((program (if geiser-kawa-use-included-kawa
                       "java"
-                    "kawa"))
+                    binary))
          (args  (if geiser-kawa-use-included-kawa
                     (list (geiser-kawa-arglist--make-classpath-arg
                            geiser-kawa-deps-jar-path)
diff --git a/elisp/geiser-kawa-deps.el b/elisp/geiser-kawa-deps.el
index 221cdcb..f37cdce 100644
--- a/elisp/geiser-kawa-deps.el
+++ b/elisp/geiser-kawa-deps.el
@@ -33,8 +33,12 @@ at REPL startup."
   ;; Using `mvn package' from the pom.xml's directory should produce a
   ;; jar containing all the java dependencies.
   (interactive)
-  (let* ((default-directory geiser-kawa-dir)
-         (mvn-buf (compile "./mvnw package")))
+  (let* ((mvnw-package
+          (if (string-equal system-type "windows-nt")
+              "mvnw.cmd package"
+            "./mvnw package"))
+         (default-directory geiser-kawa-dir)
+         (mvn-buf (compile mvnw-package)))
     (when mvn-buf
       (let ((save-buf (current-buffer)))
         (switch-to-buffer-other-window mvn-buf)
diff --git a/elisp/geiser-kawa-globals.el b/elisp/geiser-kawa-globals.el
index d3925df..7cf153b 100644
--- a/elisp/geiser-kawa-globals.el
+++ b/elisp/geiser-kawa-globals.el
@@ -82,6 +82,7 @@ included in `geiser-kawa'."
     ;; makes harder detecting end of output and finding the correct
     ;; prompt regexp.
     "console:use-jline=no"
+    "--console"    ; required on windows
     "-e"
     "(require <kawageiser.Geiser>)"
     "--")



reply via email to

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