[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/geiser-kawa 2e9138c 034/119: Small refactor + update comme
From: |
Philip Kaludercic |
Subject: |
[nongnu] elpa/geiser-kawa 2e9138c 034/119: Small refactor + update comment in GeiserEval |
Date: |
Sun, 1 Aug 2021 18:30:33 -0400 (EDT) |
branch: elpa/geiser-kawa
commit 2e9138c833cc1108a1a1abcd63bdc6c23a9993da
Author: spellcard199 <spellcard199@protonmail.com>
Commit: spellcard199 <spellcard199@protonmail.com>
Small refactor + update comment in GeiserEval
---
src/main/java/kawageiser/GeiserEval.java | 27 ++++++++++++++++++---------
src/main/java/kawageiser/GeiserLoadFile.java | 2 +-
2 files changed, 19 insertions(+), 10 deletions(-)
diff --git a/src/main/java/kawageiser/GeiserEval.java
b/src/main/java/kawageiser/GeiserEval.java
index 906b41a..5303a03 100644
--- a/src/main/java/kawageiser/GeiserEval.java
+++ b/src/main/java/kawageiser/GeiserEval.java
@@ -30,12 +30,21 @@ public class GeiserEval extends Procedure2 {
@Override
public String
apply2(Object module, Object codeStr) {
- // Today (2019-12-9) Kawa has still that issue when
- // quoting (this) followed by a double colon. So, to avoid
- // it altogether, geiser:eval default is to accept Strings
- // instead of sexprs.
- // You can still evaluate expressions instead of strings using
- // the other GeiserEval:eval method explicitly.
+ // The reason this method takes a string instead of a quoted sexpr has
been solved
+ // on 2019-12-19 in Kawa's master branch:
+ //
https://gitlab.com/kashell/Kawa/-/commit/537e135c0101194702ebee53faf92b98a4ea8c6b
+ // When there is going to be a reason to change the current behavior
of GeiserEval,
+ // geiser-kawa.el should also be changed to something like this:
+ // (case proc
+ // ((eval compile)
+ // (let* ((send-this
+ // (format
+ // "(geiser:eval (interaction-environment) '%s)"
+ // cadr args))))
+ // (print send-this)
+ // send-this))
+ //
+
String code;
if (codeStr instanceof IString) {
code = ((IString) codeStr).toString();
@@ -45,17 +54,17 @@ public class GeiserEval extends Procedure2 {
throw new IllegalArgumentException(
"`codeStr' arg should be either a String or an IString");
}
- return eval((Environment) module, code);
+ return evalStr((Environment) module, code);
}
public static String
- eval(Environment module, String codeStr) {
+ evalStr(Environment module, String codeStr) {
EvalResultAndOutput resOutErr =
Geiser.evaluator.evalCatchingOutErr(module, codeStr);
return formatGeiserProtocol(evaluationDataToGeiserProtocol(resOutErr));
}
public static String
- eval(Environment module, Object sexpr) {
+ evalForm(Environment module, Object sexpr) {
EvalResultAndOutput resOutErr =
Geiser.evaluator.evalCatchingOutErr(module, sexpr);
return formatGeiserProtocol(evaluationDataToGeiserProtocol(resOutErr));
}
diff --git a/src/main/java/kawageiser/GeiserLoadFile.java
b/src/main/java/kawageiser/GeiserLoadFile.java
index 6fa7763..0ad10f1 100644
--- a/src/main/java/kawageiser/GeiserLoadFile.java
+++ b/src/main/java/kawageiser/GeiserLoadFile.java
@@ -32,7 +32,7 @@ public class GeiserLoadFile extends Procedure1 {
}
public Object load(String filepath) {
- return GeiserEval.eval(
+ return GeiserEval.evalForm(
Language.getDefaultLanguage().getEnvironment(),
LList.list2(load.load, filepath));
}
- [nongnu] elpa/geiser-kawa eb83483 070/119: Add+Refactor: add support for generic kawa-devutil completion + refactor, (continued)
- [nongnu] elpa/geiser-kawa eb83483 070/119: Add+Refactor: add support for generic kawa-devutil completion + refactor, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-kawa 3a02f86 078/119: Add first line to elisp files: description + lexical binding, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-kawa d744274 080/119: Cask file: add development dependencies, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-kawa 9cc5ee1 083/119: Update kawa-devutil version + add default for evaluator, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-kawa 19d97d2 098/119: Small fix for package linting, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-kawa 6cb6826 107/119: melpa/melpa#6858 - Change regex in geiser-impl--add-to-alist to respect convention, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-kawa fe548f9 104/119: melpa/melpa#6858 - Rename non-standard "geiser-kawa-util--eval/result" to "geiser-kawa-util--eval-get-result", Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-kawa c7c8dae 110/119: melpa/melpa#6858 - Sharp-quote "identity" function, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-kawa 52605a4 109/119: melpa/melpa#6858 - Rename 'geiser-kawa-deps--run-kawa--compil-hook' to 'geiser-kawa-deps--run-kawa--compile-hook', Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-kawa e171876 001/119: First commit, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-kawa 2e9138c 034/119: Small refactor + update comment in GeiserEval,
Philip Kaludercic <=
- [nongnu] elpa/geiser-kawa 05e1eaa 029/119: Add initial support for completing java packages, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-kawa 5d8256d 041/119: Fix re-importing exception, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-kawa 4247497 007/119: Add geiser-kawa.el (project is starting to work), Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-kawa f1d6f8d 023/119: Add maven-wrapper, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-kawa 0f5c744 016/119: Avoid issues with older Kawa versions when using quickstart.el, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-kawa 5651a3a 031/119: Add message if no completions found, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-kawa cebaa28 042/119: Add test, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-kawa 6495077 064/119: Fix: replace lang.getEnvironment() with Environment.user() as default environment, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-kawa b15c4bc 069/119: TODO.org: add todo, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-kawa 56b7524 076/119: Add more elisp tests, Philip Kaludercic, 2021/08/01