summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorJonas Bernoulli <jonas@bernoul.li>2022-01-26 14:39:10 +0100
committerJonas Bernoulli <jonas@bernoul.li>2022-01-26 14:39:10 +0100
commit21388a4cc7e4fa8e0686a4ba99472984029dda1c (patch)
treee7a49330aa7432120bf1fa7ba82d42f3af57cd6f /lisp
parentbc8fb282f1d18f375cd357abe9cdaa95c9b2d9da (diff)
with-editor-sleeping-editor: Prefix output with newline
This makes it possible to continue to only look for the WITH-EDITOR instruction at the beginning of a line and still support hooks that might fail to print a newline character after their output.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/with-editor.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/with-editor.el b/lisp/with-editor.el
index 13d2a9e..17acfb1 100644
--- a/lisp/with-editor.el
+++ b/lisp/with-editor.el
@@ -180,7 +180,7 @@ please see https://github.com/magit/magit/wiki/Emacsclient."))))
(defcustom with-editor-sleeping-editor "\
sh -c '\
-printf \"WITH-EDITOR: $$ OPEN $0\\037 IN $(pwd)\\n\"; \
+printf \"\\nWITH-EDITOR: $$ OPEN $0\\037 IN $(pwd)\\n\"; \
sleep 604800 & sleep=$!; \
trap \"kill $sleep; exit 0\" USR1; \
trap \"kill $sleep; exit 1\" USR2; \
@@ -209,7 +209,7 @@ with \"bash\" (and install that), or you can use the older, less
performant implementation:
\"sh -c '\\
- echo \\\"WITH-EDITOR: $$ OPEN $0 IN $(pwd)\\\"; \\
+ echo -e \\\"\\nWITH-EDITOR: $$ OPEN $0 IN $(pwd)\\n\\\"; \\
trap \\\"exit 0\\\" USR1; \\
trap \\\"exit 1\" USR2; \\
while true; do sleep 1; done'\"