From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Michael Welsh Duggan Newsgroups: gmane.emacs.devel Subject: Re: [KSNetz@Arcor.DE: variable url-automatic-caching defined but not used] Date: Thu, 10 Feb 2005 08:54:58 -0500 Message-ID: <87zmycv7t9.fsf@cs.cmu.edu> References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1108044893 29185 80.91.229.6 (10 Feb 2005 14:14:53 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 10 Feb 2005 14:14:53 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Feb 10 15:14:44 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CzF5g-0000v9-00 for ; Thu, 10 Feb 2005 15:14:44 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CzFKQ-00027H-54 for ged-emacs-devel@m.gmane.org; Thu, 10 Feb 2005 09:29:58 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1CzFIO-0000dt-Vo for emacs-devel@gnu.org; Thu, 10 Feb 2005 09:27:53 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1CzFIM-0000cU-0t for emacs-devel@gnu.org; Thu, 10 Feb 2005 09:27:51 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CzFH8-0008QY-G5 for emacs-devel@gnu.org; Thu, 10 Feb 2005 09:26:34 -0500 Original-Received: from [205.201.10.244] (helo=maru) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1CzEmX-0005UA-M3; Thu, 10 Feb 2005 08:54:58 -0500 Original-Received: from md5i by maru with local (Exim 4.44) id 1CzEmY-00019N-V5; Thu, 10 Feb 2005 08:54:58 -0500 Original-To: rms@gnu.org In-Reply-To: (Richard Stallman's message of "Mon, 07 Feb 2005 15:51:50 -0500") User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:33191 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:33191 Richard Stallman writes: > [I sent this message twice but did not get a response.] > > Would someone please look at this and DTRT and ack? There is no > particular maintainer of URL, but we need to fix the bugs. > Would someone please fix this one? > > From: Klaus Straubinger > Subject: variable url-automatic-caching defined but not used > To: emacs-pretest-bug@gnu.org > Date: Fri, 7 Jan 2005 13:41:40 +0100 (CET) > X-SAP: out > X-Spam-Status: No, hits=0.5 required=5.0 tests=RCVD_IN_ORBS version=2.55 > X-Spam-Level: > X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) > > The file url/url-vars.el defines the variable url-automatic-caching, > but it is not used in the whole URL package anywhere. What is worse, > the current behaviour (i.e., caching always) does not correspond to > the default nil setting of this variable. > > The function url-store-in-cache in url-cache.el seems a good place to > implement the intended functionality. I didn't like the idea of making url-store-in-cache work based on the value of url-automatic-caching, so I think the following patch is the best simple fix: Index: url-http.el =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/url/url-http.el,v retrieving revision 1.9 diff -u -p -r1.9 url-http.el --- url-http.el 22 Jan 2005 10:52:28 -0000 1.9 +++ url-http.el 10 Feb 2005 13:51:47 -0000 @@ -413,7 +413,7 @@ should be shown to the user." ;; Generic success for all others. Store in the cache, and ;; mark it as successful. (widen) - (if (equal url-http-method "GET") + (if (and url-automatic-caching (equal url-http-method "GET")) (url-store-in-cache (current-buffer))) (setq success t)))) (3 ; Redirection -- Michael Welsh Duggan (md5i@cs.cmu.edu)