From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: Re: PATCH: completion caching layer
Date: Wed, 2 Aug 2000 11:36:10 +0200 (MET DST) [thread overview]
Message-ID: <200008020936.LAA08517@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: Adam Spiers's message of Tue, 1 Aug 2000 17:31:52 +0100
Adam Spiers wrote:
> ...
>
> OK, I've implemented this via the 'cache-policy' style, which should
> contain the name of a function which returns zero iff the cache needs
> rebuilding. _cache_invalid is a helper function which makes it easy
> to perform this calculation.
>
> Here's the patch (with documentation too, woohoo!) It's quite big,
> mainly because of reindentation. I'd be very grateful if one or two
> people could give it a quick thrashing to see whether I've
> missed/broken anything (it seems fine for me but ...) I'll commit it
> if it works for someone else or if I get bored of waiting for people
> to try :-)
It's a bit unfortunate that _cache_invalid can be called twice (in
your examples), once directly and once from _retrieve_cache. I think.
And why do _cache_invalid and _retrieve_cache re-define themselves?
There's nothing else in the files (_retrieve_cache doesn't even call
its new definition). Or have I missed something?
And the styles or not in the style list in compsys.yo. Nor in _zstyle
(I always forget that, too ;-).
About the lookup: I /think/ it would be more convenient if the type of
information cached would appear in the context, so that you could say
`zstyle ":completion:*:rpms" cache-policy ...'. Haven't really played
with it yet, though.
And another thing: with `zstyle -e' one could use a boolean style
`cache-invalid' or whatever and let the user do the rest. It's hard to
give arguments to that, though. Other than by documenting
$_cache_path, that is.
Minor comment: `foo && return 0' is both smaller and faster than
`if foo; then return 0; fi'. But since I may have done that myself,
I'll better not say this too loudly ;-}
Bye
Sven
--
Sven Wischnowsky wischnow@informatik.hu-berlin.de
next reply other threads:[~2000-08-02 9:36 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-08-02 9:36 Sven Wischnowsky [this message]
2000-08-02 13:35 ` Adam Spiers
-- strict thread matches above, loose matches on Subject: below --
2000-08-04 6:59 Sven Wischnowsky
2000-08-03 7:11 Sven Wischnowsky
2000-08-02 14:13 Sven Wischnowsky
2000-08-02 15:01 ` Adam Spiers
2000-08-03 12:21 ` Adam Spiers
2000-07-27 8:00 Sven Wischnowsky
2000-08-01 16:31 ` Adam Spiers
2000-08-01 17:03 ` Bart Schaefer
2000-08-01 17:09 ` Bart Schaefer
2000-08-01 23:37 ` Adam Spiers
2000-08-02 3:53 ` Bart Schaefer
2000-07-19 14:48 Sven Wischnowsky
2000-07-26 19:53 ` Adam Spiers
2000-07-17 14:38 Adam Spiers
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=200008020936.LAA08517@beta.informatik.hu-berlin.de \
--to=wischnow@informatik.hu-berlin.de \
--cc=zsh-workers@sunsite.auc.dk \
/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 public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).