[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/inf-clojure f420c8a 199/313: Add sanitation to inf-clojure
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/inf-clojure f420c8a 199/313: Add sanitation to inf-clojure-send-string |
Date: |
Wed, 11 Aug 2021 10:00:16 -0400 (EDT) |
branch: elpa/inf-clojure
commit f420c8a4d27c7c2dfea2ebee230d4d1b632a4e3f
Author: Andrea Richiardi <a.richiardi.work@gmail.com>
Commit: Bozhidar Batsov <bozhidar.batsov@gmail.com>
Add sanitation to inf-clojure-send-string
The function did not have sanitation and therefore it has been added. Some
more logging has been added so that .inf-clojure.log can show every
interaction.
---
inf-clojure.el | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/inf-clojure.el b/inf-clojure.el
index 61f7d73..c44694b 100644
--- a/inf-clojure.el
+++ b/inf-clojure.el
@@ -338,7 +338,10 @@ always be preferred over `comint-send-string`. It
delegates to
the string for evaluation. Refer to `comint-simple-send` for
customizations."
(inf-clojure--set-repl-type proc)
- (comint-simple-send proc string))
+ (let ((sanitized (inf-clojure--sanitize-command string)))
+ (when (not (string-empty-p sanitized))
+ (inf-clojure--log-string sanitized "----CMD->")
+ (comint-simple-send proc sanitized))))
(defcustom inf-clojure-load-form "(clojure.core/load-file \"%s\")"
"Format-string for building a Clojure expression to load a file.
@@ -559,6 +562,7 @@ to continue it."
(defun inf-clojure-preoutput-filter (str)
"Preprocess the output STR from interactive commands."
+ (inf-clojure--log-string str "<-RES----")
(cond
((string-prefix-p "inf-clojure-" (symbol-name (or this-command
last-command)))
;; Remove subprompts and prepend a newline to the output string
@@ -1177,7 +1181,7 @@ STRING if present."
(concat tag "\n")
(concat (prin1-to-string tag) "\n")))
(let ((print-escape-newlines t))
- (prin1-to-string string)))
+ (prin1-to-string (substring-no-properties
string))))
nil
(expand-file-name inf-clojure--log-file-name
(inf-clojure-project-root))
- [nongnu] elpa/inf-clojure bd06d4f 229/313: A few updates to links and formatting in README, (continued)
- [nongnu] elpa/inf-clojure bd06d4f 229/313: A few updates to links and formatting in README, ELPA Syncer, 2021/08/11
- [nongnu] elpa/inf-clojure 49390d9 231/313: Bump the copyright years, ELPA Syncer, 2021/08/11
- [nongnu] elpa/inf-clojure 799d937 250/313: Improve the README a bit, ELPA Syncer, 2021/08/11
- [nongnu] elpa/inf-clojure c30f90e 265/313: Ensure comint-truncate-buffer call is from the repl buffer, ELPA Syncer, 2021/08/11
- [nongnu] elpa/inf-clojure 784eb40 279/313: Remove unused require, ELPA Syncer, 2021/08/11
- [nongnu] elpa/inf-clojure 56810a7 284/313: Add a note about the required Emacs version, ELPA Syncer, 2021/08/11
- [nongnu] elpa/inf-clojure f333ffd 291/313: Font lock on repl inserts, ELPA Syncer, 2021/08/11
- [nongnu] elpa/inf-clojure dfc27a3 302/313: [Docs] Add a note about the REPL name inference, ELPA Syncer, 2021/08/11
- [nongnu] elpa/inf-clojure c23c55e 312/313: Release 3.1.0, ELPA Syncer, 2021/08/11
- [nongnu] elpa/inf-clojure 8c37fba 139/313: Mention some of the essential features in the README, ELPA Syncer, 2021/08/11
- [nongnu] elpa/inf-clojure f420c8a 199/313: Add sanitation to inf-clojure-send-string,
ELPA Syncer <=
- [nongnu] elpa/inf-clojure e68108d 213/313: Make three sections for the socket REPLs, ELPA Syncer, 2021/08/11
- [nongnu] elpa/inf-clojure 1295e58 214/313: [security] Don't execute arbitrary functions (#146), ELPA Syncer, 2021/08/11
- [nongnu] elpa/inf-clojure 6913798 217/313: Fix small things in README again, ELPA Syncer, 2021/08/11
- [nongnu] elpa/inf-clojure f3d6a68 223/313: Add support for joker (#160), ELPA Syncer, 2021/08/11
- [nongnu] elpa/inf-clojure 98db4c8 227/313: Bump the copyright years, ELPA Syncer, 2021/08/11
- [nongnu] elpa/inf-clojure b29a3f1 221/313: Use CircleCI for CI testing (#159), ELPA Syncer, 2021/08/11
- [nongnu] elpa/inf-clojure 0697d6f 233/313: Add insert last sexp and keymap to hold them all, ELPA Syncer, 2021/08/11
- [nongnu] elpa/inf-clojure 7a5b32f 238/313: Extend a bit the README, ELPA Syncer, 2021/08/11
- [nongnu] elpa/inf-clojure 30638a0 242/313: Remove old defcustomed, ELPA Syncer, 2021/08/11
- [nongnu] elpa/inf-clojure 1bac8fe 249/313: Tweak some messages, ELPA Syncer, 2021/08/11