all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Mark Plaksin <happy@usg.edu>
Subject: Re: url-cache - (require 'url)
Date: Fri, 06 Jan 2006 13:12:14 -0500	[thread overview]
Message-ID: <871wzlp6o1.fsf@stone.tss.usg.edu> (raw)
In-Reply-To: 87irsynxvz.fsf-monnier+emacs@gnu.org

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>>> Could you make a proper bug report?  I have no idea what you've  done to
>>> get the above messages, so it's kind of hard to debug it.
>
>> I wouldn't consider it a bug -- but the messages in the echo area and  in
>> *Messages* make url-retrieve less useful in a programmatic usage context,
>> where I don't want to annoy the user with unnecessary warnings.
>
> I see your point.  Maybe there should be a more "raw" command than
> url-retrieve, which doesn't try and fiddle with history, cache, ...

It would also be nice if there was an easy way to get at the HTTP headers
associated with a response.  Maybe there is a way but I can't find it.

I'm trying to make nnrss do the right thing for feeds which use ETag [1]
and am fumbling through advising url-retrieve-synchronously to get the
necessary headers.  Something like this:

(defadvice url-retrieve-synchronously (after map-save-headers)
  "Save headers in nnrss-feed-headers."
  ;; FIXME: Somehow save-excursion didn't work.
  ;;(save-excursion
  (let ((buffer (current-buffer)))
    (switch-to-buffer ad-return-value)
    (mail-narrow-to-head)
    (setq nnrss-feed-headers
          `(("Last-Modified" . ,(mail-fetch-field "Last-Modified"))
            ("ETag" . ,(mail-fetch-field "ETag"))))
    (widen)
    (switch-to-buffer buffer))))

Footnotes: 
[1]  http://fishbowl.pastiche.org/2002/10/21/http_conditional_get_for_rss_hackers

  reply	other threads:[~2006-01-06 18:12 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-01 17:48 url-cache - (require 'url) David Reitter
2006-01-02  5:08 ` Stefan Monnier
2006-01-02  9:47   ` David Reitter
2006-01-02 16:25     ` Stefan Monnier
2006-01-02 18:03       ` David Reitter
2006-01-03  1:46         ` Stefan Monnier
2006-01-03  9:51           ` David Reitter
2006-01-03 15:54             ` Stefan Monnier
2006-01-03 16:15               ` David Reitter
2006-01-03 20:05                 ` Stefan Monnier
2006-01-05 22:11                 ` Stefan Monnier
2006-01-06 18:12                   ` Mark Plaksin [this message]
2006-01-09  1:37                     ` Stefan Monnier
2006-01-14 18:32                       ` Mark Plaksin
2006-01-15  4:45                         ` Stefan Monnier
2006-01-15  4:59                           ` Mark Plaksin
2006-01-15  6:09                             ` Stefan Monnier
2006-01-15 18:18                               ` Mark Plaksin
2006-01-16  2:26                                 ` Stefan Monnier
2006-01-16  2:49                                   ` Mark Plaksin
2006-01-16 18:45                                     ` Stefan Monnier
2006-02-19 19:56                                       ` Mark Plaksin

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=871wzlp6o1.fsf@stone.tss.usg.edu \
    --to=happy@usg.edu \
    /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.