Using org-caldav-sync, which connects to an https server, I was consistently getting errors whose root cause was url-retrieve-synchronously returning an empty buffer. *URL-DEBUG* looked like: ... http -> url-http-end-of-document-sentinel in buffer ( *http XXX.example.org:443*) http -> Marking connection as free: XXX.example.org:443 # http -> Activating callback in buffer ( *http XXX.example.org:443*) retrieval -> Synchronous fetching done (#) The buffer returned by url-retrieve-synchronously was empty. It seems that url-http-end-of-document-sentinel does not set the variable url-gateway-method to 'tls before calling url-http when using https. Changing url-http-end-of-document-sentinel to set url-gateway-method to 'tls if the url has scheme https fixes the issue. Patch for a proposed fix, which works for me, is attached. I believe this is also the issue report here: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9592