branch: elpa/eat commit ebc77efd0f44784d7b75f365be4da3abb3fe31d5 Author: Akib Azmain Turja <a...@disroot.org> Commit: Akib Azmain Turja <a...@disroot.org>
Escape control characters in trace output * eat.el (eat--trace-log): Escape control characters (codepoints from 0 to 31) in trace output. --- eat.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eat.el b/eat.el index d9cc29d158..88ae5de007 100644 --- a/eat.el +++ b/eat.el @@ -5789,7 +5789,8 @@ to the end of (accessible portion of) buffer." (goto-char (point-max)) ;; Hope that `float-time' won't roll over while tracing. ;-) (insert (replace-regexp-in-string - "\n" "\\\\n" + (rx (any (0 . 31))) + (lambda (string) (format "\\\\x%02x" (aref string 0))) (format "%S" `(,(float-time time) ,operation ,@args))) ?\n))