Closed ackerleytng closed 2 weeks ago
The whole accept-process-output
business seems a bit questionable and blaming/tracing history didn't reveal any explanations.
I probably won't get around to this for a few weeks, can you just patch this locally until then?
Actually, please also give (while (accept-process-output process 0.1 nil t))
a try.
(while (accept-process-output process 0.1 nil t))
seems to work too. I'll report back if there are more issues.
It only works sometimes. I think (while (accept-process-output process 0.2))
works more reliably.
I think we might need perhaps something more reliable than a timeout? If I understand correctly the purpose of this is to wait for the prompt to be ready and then export EDITOR
to the shell. If this understanding is right, I could try to figure out some solution :)
Here's what I'm seeing, even though I've increased the timeout to 0.5
export EDITOR="/usr/bin/emacsclient --socket-name=/run/user/1048788/emacs/server"
clear
^[[?1;2c
ackerleytng@ackerleytng-machine ~
❯ 1;2c
I have to create releases and just doing one more thing first "just one more time", isn't going to help. I'll look into this later. I am referring you back to
I probably won't get around to this for a few weeks, can you just patch this locally until then?
Thanks so much, no hurry on this at all!
I've bumped it up to a full second.
If I understand correctly, now
with-editor-export-editor
tries to read everything as the shell starts up for0.1
s.https://github.com/magit/with-editor/blob/322ee26d3a7d3d67840293041837b7e70cffa8d1/lisp/with-editor.el#L746
My shell takes a little long to start up (sometimes), so the export ends up writing something broken to the shell. Setting this to
0.2
seems to work more reliably for me.Can we make this configurable?