From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.bugs Subject: bug#55117: [PROPOSED] Fix gnus-html-image-cache-ttl FIXME Date: Mon, 25 Apr 2022 18:00:13 -0700 Message-ID: <20220426010013.146545-1-eggert@cs.ucla.edu> Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31209"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Paul Eggert To: 55117@debbugs.gnu.org, larsi@gnus.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Apr 26 03:01:31 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nj9a6-0007zE-VG for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 26 Apr 2022 03:01:30 +0200 Original-Received: from localhost ([::1]:47222 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nj9a5-0002eJ-NV for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 25 Apr 2022 21:01:29 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54528) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nj9Zf-0002dC-C0 for bug-gnu-emacs@gnu.org; Mon, 25 Apr 2022 21:01:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42520) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nj9Ze-00028h-Nc for bug-gnu-emacs@gnu.org; Mon, 25 Apr 2022 21:01:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nj9Ze-00060s-JN for bug-gnu-emacs@gnu.org; Mon, 25 Apr 2022 21:01:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 26 Apr 2022 01:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 55117 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org, larsi@gnus.org Original-Received: via spool by submit@debbugs.gnu.org id=B.165093484323074 (code B ref -1); Tue, 26 Apr 2022 01:01:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 26 Apr 2022 01:00:43 +0000 Original-Received: from localhost ([127.0.0.1]:36417 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nj9ZK-000606-MX for submit@debbugs.gnu.org; Mon, 25 Apr 2022 21:00:42 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:56266) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nj9ZI-0005zy-W4 for submit@debbugs.gnu.org; Mon, 25 Apr 2022 21:00:41 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54496) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nj9ZI-0002ZZ-Ol for bug-gnu-emacs@gnu.org; Mon, 25 Apr 2022 21:00:40 -0400 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:60648) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nj9ZG-00021j-PS for bug-gnu-emacs@gnu.org; Mon, 25 Apr 2022 21:00:40 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 3EF181600F6; Mon, 25 Apr 2022 18:00:36 -0700 (PDT) Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id 7Xkctg25dayb; Mon, 25 Apr 2022 18:00:35 -0700 (PDT) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 5944B1600EF; Mon, 25 Apr 2022 18:00:35 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id P_78QVVyOJ3b; Mon, 25 Apr 2022 18:00:35 -0700 (PDT) Original-Received: from penguin.cs.ucla.edu (Penguin.CS.UCLA.EDU [131.179.64.200]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 375AE1600EB; Mon, 25 Apr 2022 18:00:35 -0700 (PDT) X-Mailer: git-send-email 2.35.1 Received-SPF: pass client-ip=131.179.128.68; envelope-from=eggert@cs.ucla.edu; helo=zimbra.cs.ucla.edu X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:230674 Archived-At: * lisp/gnus/gnus-html.el (gnus-html-image-cache-ttl): Make it a seconds count. --- etc/NEWS | 6 ++++++ lisp/gnus/gnus-html.el | 10 +++------- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index 40e914cd32..f24177cf55 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -935,6 +935,12 @@ representation as emojis. Configuration is very similar to the notmuch and namazu backends. It supports the unified search syntax. =20 +--- +*** gnus-html-image-cache-ttl is now a seconds count. +Formerly it was a pair of numbers (A B) that represented 65536*A + B, +to cater to older Emacs implementations that lacked bignums. +The older form still works but is undocumented. + ** EIEIO =20 +++ diff --git a/lisp/gnus/gnus-html.el b/lisp/gnus/gnus-html.el index 8b2200af54..41c488a2b5 100644 --- a/lisp/gnus/gnus-html.el +++ b/lisp/gnus/gnus-html.el @@ -40,15 +40,11 @@ (require 'help-fns) (require 'url-queue) =20 -(defcustom gnus-html-image-cache-ttl (days-to-time 7) - "Time used to determine if we should use images from the cache." +(defcustom gnus-html-image-cache-ttl (time-convert (days-to-time 7) 'int= eger) + "Number of seconds used to determine if we should use images from the = cache." :version "24.1" :group 'gnus-art - ;; FIXME hardly the friendliest type. The allowed value is actually - ;; any time value, but we are assuming no-one cares about USEC and - ;; PSEC here. It would be better to make it a number of seconds. - :type '(choice (cons integer integer) - (list integer integer))) + :type number) =20 (defcustom gnus-html-image-automatic-caching t "Whether automatically cache retrieve images." --=20 2.35.1