all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Paul Eggert <eggert@cs.ucla.edu>
To: 55117@debbugs.gnu.org, larsi@gnus.org
Cc: Paul Eggert <eggert@cs.ucla.edu>
Subject: bug#55117: [PROPOSED] Fix gnus-html-image-cache-ttl FIXME
Date: Mon, 25 Apr 2022 18:00:13 -0700	[thread overview]
Message-ID: <20220426010013.146545-1-eggert@cs.ucla.edu> (raw)

* 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.
 
+---
+*** 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
 
 +++
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)
 
-(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) 'integer)
+  "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)
 
 (defcustom gnus-html-image-automatic-caching t
   "Whether automatically cache retrieve images."
-- 
2.35.1






             reply	other threads:[~2022-04-26  1:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-26  1:00 Paul Eggert [this message]
2022-04-26  5:04 ` bug#55117: [PROPOSED] Fix gnus-html-image-cache-ttl FIXME Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-04-26  7:07   ` Paul Eggert
2022-04-26 10:17     ` Lars Ingebrigtsen
2022-04-26 21:00       ` Paul Eggert

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=20220426010013.146545-1-eggert@cs.ucla.edu \
    --to=eggert@cs.ucla.edu \
    --cc=55117@debbugs.gnu.org \
    --cc=larsi@gnus.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.