Skip to content

Commit c4dac2d

Browse files
committed
Restyle inf-clojure-log-activity output
1 parent 0bb2700 commit c4dac2d

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

inf-clojure.el

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -958,14 +958,16 @@ Inf-Clojure will create a log file in the project folder named
958958
`inf-clojure--log-file-name' and dump the process activity in it
959959
in case this is not nil." )
960960

961-
(defun inf-clojure--log-string (string &optional type)
961+
(defun inf-clojure--log-string (string &optional tag)
962962
"Log STRING to file, according to `inf-clojure-log-response'.
963963
The optional TYPE will be converted to string and printed before
964964
STRING if present."
965965
(when inf-clojure-log-activity
966966
(write-region (concat "\n"
967-
(when type
968-
(concat (prin1-to-string type) " | "))
967+
(when tag
968+
(if (stringp tag)
969+
(concat tag "\n")
970+
(concat (prin1-to-string tag) "\n")))
969971
(let ((print-escape-newlines t))
970972
(prin1-to-string string)))
971973
nil
@@ -984,7 +986,7 @@ string will start from (point) in the results buffer. If
984986
END-STRING is nil, the result string will end at (point-max) in
985987
the results buffer. It cuts out the output from and including
986988
the `inf-clojure-prompt`."
987-
(inf-clojure--log-string command :cmd)
989+
(inf-clojure--log-string command "----CMD->")
988990
(let ((work-buffer inf-clojure--redirect-buffer-name))
989991
(save-excursion
990992
(set-buffer (get-buffer-create work-buffer))
@@ -1007,7 +1009,7 @@ the `inf-clojure-prompt`."
10071009
(prompt (when (search-forward inf-clojure-prompt nil t)
10081010
(match-beginning 0)))
10091011
(buffer-string (buffer-substring-no-properties beg (or prompt end))))
1010-
(inf-clojure--log-string buffer-string :res)
1012+
(inf-clojure--log-string buffer-string "<-RES----")
10111013
buffer-string))))
10121014

10131015
(defun inf-clojure--nil-string-match-p (string)

0 commit comments

Comments
 (0)