From 5cada85c7571956345f04e326c8af045cdb62131 Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Thu, 27 Aug 2020 22:56:05 -0400 Subject: Switch downloads to url-retrieve-synchronously piem-download-and-decompress uses url-retrieve and a callback, setting url-asynchronous to nil. This approach doesn't seem to be sufficient because I'm getting intermittent failures in piem-b4--get-am-files related to unfinished processes. And taking a peek at url-retrieve-synchronously suggests that indeed a good amount more is needed to do a synchronous call with url-retrieve. Switch piem-download-and-decompress over to url-retrieve-synchronously. I haven't noticed any issues with the url-retrieve call in piem-inject-thread-into-maildir, but switch that over too for simplicity and consistency. Message-Id: <20200828025605.1106-1-kyle@kyleam.com> --- piem-b4.el | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'piem-b4.el') diff --git a/piem-b4.el b/piem-b4.el index 39d32be..6de0d2b 100644 --- a/piem-b4.el +++ b/piem-b4.el @@ -68,12 +68,11 @@ (buffer (condition-case nil (piem-download-and-decompress (concat url mid "/t.mbox.gz")) - (user-error nil)))) - (when (buffer-live-p buffer) - (with-current-buffer buffer - (write-region nil nil mbox-thread)) - (kill-buffer buffer) - (setq local-mbox-p t)))) + (error nil)))) + (with-current-buffer buffer + (write-region nil nil mbox-thread)) + (kill-buffer buffer) + (setq local-mbox-p t))) ;; Move to the coderepo so that we pick up any b4 configuration ;; from there. (apply #'piem-process-call coderepo piem-b4-b4-executable "am" -- cgit v1.2.3