-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
request 0.3.1 assumes utf-8 #53
Conversation
The tkf library now defaults to utf-8 encoding (so does not need to be done in anki-editor). Further the synchronous bug has been fixed.
Which is the current status of this issue? |
Thanks, but the changes to sync mode seems to make Emacs hanging. |
@dickmao I appreciate your effort into making this PR to work around this change. It appears that in the PR, a snippet of code @louietan wrote to work around callbacks was removed. Could this be why emacs is hanging with this patch? @dickmao was there a reason you removed this callback? |
I'm debugging I put some logs in that function and only get "Accepting process output..." and "Not finished yet, waiting...". (let (finished)
(prog1 (apply #'request--curl url
:semaphore (lambda (&rest _)
(request-log 'debug "Semaphore signaled !")
(setq finished t))
settings)
(let ((proc (get-buffer-process (request-response--buffer response))))
(with-local-quit
(while (not finished)
(if (request--process-live-p proc)
(progn
(request-log 'debug "Accepting process output...")
(accept-process-output proc))
(request-log 'debug "Not finished yet, waiting...")
(sleep-for 0 300))))))) |
Substitute |
Not really works though, if I make some input events to emacs while it's requesting, it still deadlocks. |
Hypothesis: synch bug is triggered depending on byte compilation of request-curl-callback.
@dickmao can you remove the "synchronous bug has been fixed" related changes? Let's first fix the encoding issue. Once the "synchronous bug has been fixed" related changes have been debugged they can be merged in a separate PR. What do you think? |
Package maintainer reports undowned semaphore with tkf/emacs-request library f466ab1. I don't believe restoring the "HACK" would cure this since ":sync t" remains.
You got it. |
Thanks! @louietan can the utf-8 fix be merged then? |
The tkf library now defaults to utf-8 encoding (so does not need to be
done in anki-editor). Further the synchronous bug has been fixed.
Closes #51 #49