From: Lars Ingebrigtsen <larsi@gnus.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Gregory Heytings <gregory@heytings.org>, emacs-devel@gnu.org
Subject: Re: master daea9b3 1/2: Read mailcaps again only when necessary
Date: Tue, 02 Nov 2021 15:54:41 +0100 [thread overview]
Message-ID: <874k8umwum.fsf@gnus.org> (raw)
In-Reply-To: <jwv4k8vh93h.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Mon, 01 Nov 2021 17:31:56 -0400")
Stefan Monnier <monnier@iro.umontreal.ca> writes:
> (defun mailcap-parse-file (file &optional cache)
> (unless (file-name-absolute-p file) (setq file (expand-file-name file)))
> (or (and cache
> (file-unchanged-p file cache)
> (gethash (cons file 'mailcap-parse-file) cache))
> (let ((data <do the actual parsing>))
> (when cache
> (puthash (cons file 'mailcap-parse-file) data cache))
> data)))
That does have the advantage that the package can store the data for
many files in the same place, which is nice. But the interface doesn't
seem as clear as it could be.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
prev parent reply other threads:[~2021-11-02 14:54 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20211101135344.25800.81476@vcs0.savannah.gnu.org>
[not found] ` <20211101135346.2EBEB20B72@vcs0.savannah.gnu.org>
2021-11-01 16:56 ` master daea9b3 1/2: Read mailcaps again only when necessary Stefan Monnier
2021-11-01 17:01 ` Lars Ingebrigtsen
2021-11-01 17:19 ` Eli Zaretskii
2021-11-01 17:21 ` Lars Ingebrigtsen
2021-11-01 17:24 ` Eli Zaretskii
2021-11-01 17:29 ` Lars Ingebrigtsen
2021-11-01 18:13 ` Eli Zaretskii
2021-11-01 18:35 ` Stefan Monnier
2021-11-01 18:56 ` Eli Zaretskii
2021-11-01 21:07 ` Stefan Monnier
2021-11-02 12:54 ` Eli Zaretskii
2021-11-02 13:51 ` Stefan Monnier
2021-11-01 18:20 ` Stefan Monnier
2021-11-01 18:31 ` Eli Zaretskii
2021-11-01 18:06 ` Stefan Monnier
2021-11-01 18:48 ` Lars Ingebrigtsen
2021-11-01 18:50 ` Stefan Monnier
2021-11-01 19:04 ` Lars Ingebrigtsen
2021-11-01 21:31 ` Stefan Monnier
2021-11-02 14:54 ` Lars Ingebrigtsen [this message]
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=874k8umwum.fsf@gnus.org \
--to=larsi@gnus.org \
--cc=emacs-devel@gnu.org \
--cc=gregory@heytings.org \
--cc=monnier@iro.umontreal.ca \
/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.