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

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

[nongnu] elpa/eat ebc77efd0f 6/7: Escape control characters in trace out


From: ELPA Syncer
Subject: [nongnu] elpa/eat ebc77efd0f 6/7: Escape control characters in trace output
Date: Wed, 7 Dec 2022 04:58:42 -0500 (EST)

branch: elpa/eat
commit ebc77efd0f44784d7b75f365be4da3abb3fe31d5
Author: Akib Azmain Turja <akib@disroot.org>
Commit: Akib Azmain Turja <akib@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))
 



reply via email to

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