url-retrieve-synchronously unexpectedly returns an empty buffer: emacs -Q --eval '(with-current-buffer (url-retrieve-synchronously " https://google.com") (print (buffer-string)))' --batch Contacting host: google.com:443 "" If I add (sit-for 2) in url-retrieve-synchronously after the (url-retrieve ...) call: (setq asynch-buffer (url-retrieve url (lambda (&rest ignored) (url-debug 'retrieval "Synchronous fetching done (%S)" (current-buffer)) (setq retrieval-done t asynch-buffer (current-buffer))) nil silent inhibit-cookies)) (sit-for 2) then I see the expected output. In GNU Emacs 26.1 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.5) of 2019-09-22, modified by Debian built on x86-grnet-01 Windowing system distributor 'The X.Org Foundation', version 11.0.12004000 System Description: Debian GNU/Linux 10 (buster) Recent messages: var a=window.location,b=a.href.indexOf(\"#\");if(0<=b){var c=a.href.substring(b+1);/(^|&)q=/.test(c)&&-1==c.indexOf(\"#\")&&a.replace(\"/search?\"+c.replace(/(^|&)fp=[^&]*/g,\"\")+\"&cad=h\")};
Search Images Maps Play YouTube News Gmail Drive More »
Web History | Settings | Sign in

\"Google\"

 

Advanced search

© 2020 - Privacy - Terms

" completing-read-default: Command attempted to use minibuffer while in minibuffer Quit [2 times] Configured using: 'configure --build x86_64-linux-gnu --prefix=/usr --sharedstatedir=/var/lib --libexecdir=/usr/lib --localstatedir=/var/lib --infodir=/usr/share/info --mandir=/usr/share/man --enable-libsystemd --with-pop=yes --enable-locallisppath=/etc/emacs:/usr/local/share/emacs/26.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/26.1/site-lisp:/usr/share/emacs/site-lisp --with-sound=alsa --without-gconf --with-mailutils --build x86_64-linux-gnu --prefix=/usr --sharedstatedir=/var/lib --libexecdir=/usr/lib --localstatedir=/var/lib --infodir=/usr/share/info --mandir=/usr/share/man --enable-libsystemd --with-pop=yes --enable-locallisppath=/etc/emacs:/usr/local/share/emacs/26.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/26.1/site-lisp:/usr/share/emacs/site-lisp --with-sound=alsa --without-gconf --with-mailutils --with-x=yes --with-x-toolkit=gtk3 --with-toolkit-scroll-bars 'CFLAGS=-g -O2 -fdebug-prefix-map=/build/emacs-StqULU/emacs-26.1+1=. -fstack-protector-strong -Wformat -Werror=format-security -Wall' 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2' LDFLAGS=-Wl,-z,relro' Configured features: XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 THREADS LIBSYSTEMD LCMS2 Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Emacs-Lisp Minor modes in effect: text-scale-mode: t diff-auto-refine-mode: t hi-lock-mode: t global-erjoalgo-command-mode: t erjoalgo-command-mode: t company-mode: t show-paren-mode: t global-text-scale-mode: t tooltip-mode: t global-eldoc-mode: t eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t Load-path shadows: /home/ealfonso/quicklisp/dists/quicklisp/software/slime-v2.24/slime-tests hides /home/ealfonso/.emacs.d/elpa/slime-20191224.2328/slime-tests /home/ealfonso/quicklisp/dists/quicklisp/software/slime-v2.24/slime-autoloads hides /home/ealfonso/.emacs.d/elpa/slime-20191224.2328/slime-autoloads /home/ealfonso/quicklisp/dists/quicklisp/software/slime-v2.24/slime hides /home/ealfonso/.emacs.d/elpa/slime-20191224.2328/slime /home/ealfonso/git/autobuild/autobuild hides /home/ealfonso/git/dotemacs/lisp/core/autobuild /home/ealfonso/.emacs.d/elpa/s-20180406.808/s hides /home/ealfonso/git/dotemacs/lisp/libs/s /home/ealfonso/.emacs.d/elpa/dash-20191109.1327/dash hides /home/ealfonso/git/dotemacs/lisp/libs/dash /home/ealfonso/quicklisp/dists/quicklisp/software/slime-v2.24/contrib/slime-cl-indent hides /home/ealfonso/git/dotemacs/lisp/libs/slime-cl-indent Features: (shadow sort mailalias mail-extr emacsbug misearch multi-isearch face-remap ffap vc-git diff-mode cl-print diary-lib diary-loaddefs cal-iso org-rmail org-mhe org-irc org-info org-gnus nnir gnus-sum gnus-group gnus-undo gnus-start gnus-cloud nnimap nnmail mail-source utf7 netrc nnoo parse-time gnus-spec gnus-int gnus-range gnus-win org-docview doc-view jka-compr image-mode org-bibtex bibtex org-bbdb org-w3m org-agenda files-x tmp-completions tetris-o-1 beeper translation babel mm-url gnus nnheader wm-windows slime-fancy slime-trace-dialog slime-fontifying-fu slime-package-fu slime-references slime-compiler-notes-tree slime-scratch slime-presentations bridge slime-macrostep macrostep slime-mdot-fu slime-enclosing-context slime-fuzzy slime-fancy-trace slime-fancy-inspector slime-c-p-c slime-editing-commands slime-autodoc slime-repl elp slime-parse slime hi-lock company-oddmuse company-keywords company-etags company-gtags company-dabbrev-code company-dabbrev company-files company-capf company-cmake company-xcode company-clang company-semantic company-eclim company-template company-bbdb elec-pair lisp-mnt gud apropos compile etags xref project arc-mode archive-mode hyperspec browse-url ox-texinfo ox-odt rng-loc rng-uri rng-parse rng-match rng-dt rng-util rng-pttrn nxml-parse nxml-ns nxml-enc xmltok nxml-util ox-latex ox-icalendar ox-html table ox-ascii ox-publish ox org-crypt org-element avl-tree generator org org-macro org-footnote org-pcomplete pcomplete org-list org-faces org-entities noutline outline org-version ob-emacs-lisp ob ob-tangle org-src ob-ref ob-lob ob-table ob-keys ob-exp ob-comint comint ring ob-core ob-eval org-compat org-macs org-loaddefs cal-menu calendar cal-loaddefs erc-goodies erc erc-backend erc-compat thingatpt warnings mm-archive network-stream starttls url-http tls gnutls url-gw nsm url-cache url-auth url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util mailcap bbdb-mua bbdb-com crm bbdb-message sendmail message rmc puny dired dired-loaddefs format-spec rfc822 mml mml-sec epa derived epg gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr mailabbrev mail-utils gmm-utils mailheader bbdb bbdb-site timezone cus-edit cus-start cus-load wid-edit selcand proxy-mode project-opener org-omnibar erjoalgo-command-mode command-mode-commands anonymizer genpass ert pp ewoc debug autobuild-examples autobuild flycheck cl-extra ansi-color json map find-func help-mode rx subr-x header2 sticky-windows company edmacro kmacro pcase dedicated dash-functional plusx my-emacs-settings paren server isearch-fast-reverse buttons zoom-global easy-mmode quick-yes advice goto-last-change f dash s finder-inf slime-autoloads info cl package easymenu epg-config url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache url-vars seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 756814 34360) (symbols 48 57815 1) (miscs 40 371 724) (strings 32 216401 1715) (string-bytes 1 5916797) (vectors 16 66163) (vector-slots 8 1863704 71522) (floats 8 317 616) (intervals 56 1674 208) (buffers 992 37))