A small update.
I found that when I used internet from a slower connection, the hang returned, so I have a more robust workaround now. I simply abort the function if there is a hang.
13c13,14
< (let ((retrieval-done nil)
---
> (let ((inhibit-quit t)
> (retrieval-done nil)
17c18,19
< (timed-out nil))
---
> (timed-out nil)
> (abort-hang nil))
29c31,32
< (let ((proc (get-buffer-process asynch-buffer)))
---
> (let ((proc (get-buffer-process asynch-buffer))
> (counter 0))
38a42
> (not abort-hang)
72,74c76,87
< (unless (or (with-local-quit
< (accept-process-output proc 1))
< (null proc))
---
> (if (input-pending-p)
> (progn
> (setq counter (1+ counter))
> (if (> counter 20)
> (setq abort-hang t))))
> ;; accept-process-output hangs without while-no-input; input has
> ;; nowhere to go. So avoid it.
> (unless (or
> (while-no-input
> (with-local-quit
> (accept-process-output proc 0.1)))
> (null proc))
```
Shane Mulligan
How to contact me: |
| |
13c13,14
< (let ((retrieval-done nil)
---
> (let ((inhibit-quit t)
> (retrieval-done nil)
17c18,19
< (timed-out nil))
---
> (timed-out nil)
> (abort-hang nil))
29c31,32
< (let ((proc (get-buffer-process asynch-buffer)))
---
> (let ((proc (get-buffer-process asynch-buffer))
> (counter 0))
38a42
> (not abort-hang)
72,74c76,87
< (unless (or (with-local-quit
< (accept-process-output proc 1))
< (null proc))
---
> (if (input-pending-p)
> (progn
> (setq counter (1+ counter))
> (if (> counter 20)
> (setq abort-hang t))))
> ;; accept-process-output hangs without while-no-input; input has
> ;; nowhere to go. So avoid it.
> (unless (or
> (while-no-input
> (with-local-quit
> (accept-process-output proc 0.1)))
> (null proc))