From e459842a9b32d9cc26d6f1b9fe0a3b73d735b7d8 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 26 Aug 2020 16:02:55 -0400 Subject: [PATCH] Escape newlines in backtrace frames And quote strings --- core/core-cli.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/core-cli.el b/core/core-cli.el index 9a468d9ae..cd3d5f8f2 100644 --- a/core/core-cli.el +++ b/core/core-cli.el @@ -262,7 +262,9 @@ BODY will be run when this dispatcher is called." (print! (bold "Backtrace:")) (print-group! (dolist (frame (seq-take backtrace 10)) - (print! "%0.76s" frame))) + (print! + "%0.74s" (replace-regexp-in-string + "[\n\r]" "\\\\n" (format "%S" frame))))) (with-temp-file doom-cli-log-error-file (insert "# -*- lisp-interaction -*-\n") (insert "# vim: set ft=lisp:\n")