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

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

[nongnu] elpa/inf-clojure 49b8c4b 159/313: Restyle inf-clojure-log-activ


From: ELPA Syncer
Subject: [nongnu] elpa/inf-clojure 49b8c4b 159/313: Restyle inf-clojure-log-activity output
Date: Wed, 11 Aug 2021 10:00:07 -0400 (EDT)

branch: elpa/inf-clojure
commit 49b8c4b9ea2574c1e72782ee49a5b60f6ec3a3f9
Author: Andrea Richiardi <a.richiardi.work@gmail.com>
Commit: Bozhidar Batsov <bozhidar.batsov@gmail.com>

    Restyle inf-clojure-log-activity output
---
 inf-clojure.el | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/inf-clojure.el b/inf-clojure.el
index f319d6e..95cc6da 100644
--- a/inf-clojure.el
+++ b/inf-clojure.el
@@ -959,14 +959,16 @@ Inf-Clojure will create a log file in the project folder 
named
 `inf-clojure--log-file-name' and dump the process activity in it
 in case this is not nil." )
 
-(defun inf-clojure--log-string (string &optional type)
+(defun inf-clojure--log-string (string &optional tag)
   "Log STRING to file, according to `inf-clojure-log-response'.
 The optional TYPE will be converted to string and printed before
 STRING if present."
   (when inf-clojure-log-activity
     (write-region (concat "\n"
-                          (when type
-                            (concat (prin1-to-string type) " | "))
+                          (when tag
+                            (if (stringp tag)
+                              (concat tag "\n")
+                              (concat (prin1-to-string tag) "\n")))
                           (let ((print-escape-newlines t))
                             (prin1-to-string string)))
                   nil
@@ -985,7 +987,7 @@ string will start from (point) in the results buffer.  If
 END-STRING is nil, the result string will end at (point-max) in
 the results buffer.  It cuts out the output from and including
 the `inf-clojure-prompt`."
-  (inf-clojure--log-string command :cmd)
+  (inf-clojure--log-string command "----CMD->")
   (let ((work-buffer inf-clojure--redirect-buffer-name))
     (save-excursion
       (set-buffer (get-buffer-create work-buffer))
@@ -1008,7 +1010,7 @@ the `inf-clojure-prompt`."
              (prompt (when (search-forward inf-clojure-prompt nil t)
                        (match-beginning 0)))
              (buffer-string (buffer-substring-no-properties beg (or prompt 
end))))
-        (inf-clojure--log-string buffer-string :res)
+        (inf-clojure--log-string buffer-string "<-RES----")
         buffer-string))))
 
 (defun inf-clojure--nil-string-match-p (string)



reply via email to

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