From 9a1f0aea68a2d84e8da3c9ab834462046249f6e5 Mon Sep 17 00:00:00 2001 From: Jeremy Dormitzer Date: Wed, 28 Aug 2024 09:41:54 -0400 Subject: [PATCH] Trim output before inserting --- emacs/.emacs.d/config/init-ide.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/emacs/.emacs.d/config/init-ide.el b/emacs/.emacs.d/config/init-ide.el index 2d57446..5a89359 100644 --- a/emacs/.emacs.d/config/init-ide.el +++ b/emacs/.emacs.d/config/init-ide.el @@ -313,7 +313,9 @@ (lambda () (with-current-buffer buf (delete-region start end) - (insert-buffer-substring temp-buffer) + (insert (with-current-buffer temp-buffer + (string-trim + (buffer-substring-no-properties (point-min) (point-max))))) (goto-char (point-min)) (forward-line (1- line)) (move-to-column col)