From: "Peter Münster" <pmlists@free.fr>
To: help-gnu-emacs@gnu.org
Subject: kill buffer created by url-retrieve-synchronously
Date: Fri, 26 Feb 2016 12:25:50 +0100 [thread overview]
Message-ID: <87bn73n269.fsf@free.fr> (raw)
Hi,
A timer calls periodically this function:
--8<---------------cut here---------------start------------->8---
(defun pm/get-json (url)
"Copied from
http://frozenlock.org/2012/07/07/url-retrieve-and-json-api/."
(let* ((url-mime-encoding-string "identity")
(buffer (with-timeout (3 nil) (url-retrieve-synchronously url)))
(result
(with-current-buffer buffer
(goto-char (point-min))
(re-search-forward "^$")
(json-read))))
(kill-buffer buffer)
result))
--8<---------------cut here---------------end--------------->8---
Sometimes, the buffers created by url-retrieve-synchronously are not
killed, because I see them in (buffer-list).
What should I do to ensure, that these buffers are always killed at the
end of the function please?
TIA for any help,
--
Peter
next reply other threads:[~2016-02-26 11:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-26 11:25 Peter Münster [this message]
[not found] <mailman.5945.1456485979.843.help-gnu-emacs@gnu.org>
2016-02-27 3:58 ` kill buffer created by url-retrieve-synchronously Lars Magne Ingebrigtsen
2016-02-27 17:55 ` Peter Münster
[not found] ` <mailman.6062.1456595760.843.help-gnu-emacs@gnu.org>
2016-02-28 3:52 ` Lars Magne Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87bn73n269.fsf@free.fr \
--to=pmlists@free.fr \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.