diff options
author | Jonas Bernoulli <jonas@bernoul.li> | 2016-08-12 23:57:00 +0200 |
---|---|---|
committer | Jonas Bernoulli <jonas@bernoul.li> | 2016-08-12 23:57:00 +0200 |
commit | 5bb0b8ae05bc7c42779cbbf3f0368b5dd4b996b3 (patch) | |
tree | 031dbc13f2d27a4caee68416a4734f6af32e45c5 /with-editor.org | |
parent | 706c8ce2b217edeaa9ea157cdfc18efc0313116f (diff) |
with-editor-sleeping-editor: document csh complications
Closes #9.
Diffstat (limited to 'with-editor.org')
-rw-r--r-- | with-editor.org | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/with-editor.org b/with-editor.org index edf0134..7fb73fc 100644 --- a/with-editor.org +++ b/with-editor.org @@ -127,7 +127,26 @@ it receives a signal. not a complete substitute for a proper Emacsclient, it can only be used as ~$EDITOR~ of child process of the current Emacs instance. - It is unlikely that you should ever have to customize this option. + Some shells do not execute traps immediately when waiting for a + child process, but by default we do use such a blocking child + process. + + If you use such a shell (e.g. ~csh~ on FreeBSD, but not Debian), then + you have to edit this option. You can either replace ~sh~ with ~bash~ + (and install that), or you can use the older, less performant + implementation: + + #+BEGIN_SRC emacs-lisp + "sh -c '\ + echo \"WITH-EDITOR: $$ OPEN $0\"; \ + trap \"exit 0\" USR1; \ + trap \"exit 1\" USR2; \ + while true; do sleep 1; done'" + #+END_SRC + + This leads to a delay of up to a second. The delay can be shortened + by replacing ~sleep 1~ with ~sleep 0.01~, or if your implementation does + not support floats, then by using ~nanosleep 0.01~ instead. ** Using With-Editor commands |