defunkt/gist

ctrl-d very slow on macOS

LucaMarconato opened this issue · 5 comments

When I press ctrl-d to save the gist the terminal hangs and the gist is saved after an arbitrary long time.

Additional details.
If I keep ctrl-d pressed after few seconds the gist is uploaded, but of course the terminal is also killed. Ctrl-d works everywhere at the first press (e.g. in python or in a terminal), just gist seems to have problems.
I will try to test gist in a different macOS version.

Your gist package for emacs works perfectly, I am experiencing troubles only with this repo

@LucaMarconato very strange!

ctrl+d is not handled specially by gist, it's just the standard way to close STDIN. So, I suspect one of two things are happening:

  1. The delay you're seeing is the network delay of sending the input to gist (establishing an https connection and sending the data and waiting for the response).
  2. Your input is being buffered by something (ruby, tmux/shell, terminal emulator, ...)

One thing I noticed trying to reproduce this is that if I hit ctrl+d immediately after a new line, it seems to be mostly network bound (1-2 seconds); but if I hit ctrl+d on a line with content in it already, it never works.

Could any of those describe what you're seeing?

I get exactly the behavior you described, adding that if you keep pressed ctrl-d, then after a few seconds gist will upload the file, but since in it that precise moment ctrl-d will be still down, it will kill the terminal process too.

One thing I noticed trying to reproduce this is that if I hit ctrl+d immediately after a new line, it seems to be mostly network bound (1-2 seconds); but if I hit ctrl+d on a line with content in it already, it never works.

That part solved my issue, Add new line works!