emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: url-cache - (require 'url)


From: Mark Plaksin
Subject: Re: url-cache - (require 'url)
Date: Fri, 06 Jan 2006 13:12:14 -0500
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0 (gnu/linux)

Stefan Monnier <address@hidden> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]