-
Notifications
You must be signed in to change notification settings - Fork 3
Caching and stuff #1
Comments
Hi!
For now, the API is to unstable to be usable by anyone besides myself. It would be nice to split the project into smaller more reusable packages use this repo to provide an example of how these packages could be combined.
I like reinventing wheels (NIH syndrome) to get a better understanding of what the challenges and problems are. It's not the most efficient way of writing software but maybe I've come up with some new ideas that are useful for other packages.
Thanks! I'll take a look at the source code in the next few days. I've written my own tabulated-list based mode for listing headlines,
That would be great, the most abstract thing I've come up with yet would be an "org-cache" This would be useful for another package of mine where I'm currently using |
Regarding Xapian / a sqlite backend: I've started writing a PoC emacs module using https://github.com/ubolonton/emacs-module-rs, For now, keeping the (headline / file) index in memory as lisp objects and persisting it at regular intervals / on-save, using buffer-hashes to update changed files on startup, seems like a good compromise. |
Sounds good.
Cool. Rereading my quoted comment now, I realize that may have sounded as if I was rudely questioning your decision. I didn't mean it that way, and hopefully you realized that. :) I'm just very interested in what you learned from writing your own cache implementations.
I've thought several times about using tabulated-list-mode for an agenda-like view, but while the column-based sorting would be handy, it wouldn't easily support grouping like that provided by BTW, I have a prototype of a Magit-like view implementation for
That's an interesting idea. BTW, have you seen Nicolas Goaziou's
That also sounds like a useful utility! |
No worries, I didn't read that as a critique and, considering the time I spent on it vs. how useful it has been so far, it's a decision that deserves to be questioned ;) After looking through the code for Both org-ql (through its use of The workarounds I've come up with so far:
For now, I'm using the cache only to generate a list of a few interesting files |
For anyone interested, I've uploaded a first version of this cache to https://github.com/l3kn/org-el-cache. |
Hi,
I just stumbled upon this repo. It looks really interesting, and I'm surprised I haven't seen it before. Have you been trying to keep it secret? =)
I see that you use
org-ql
andts
, which is cool!I also see that you have made your own caching mechanism. I guess you know that org-ql has two kinds of caches already (actually 3, counting the tags cache, but I've yet to merge that with the node-value cache), so I would love to hear about why you implemented your own. I had the idea recently to factor out org-ql's cache into a separate library, and Nicolas Goaziou has also discussed the idea of having some kind of cache built-in to Org someday, so it would be great if a single implementation could meet all of our needs.
Also, I see that you have some kind of query language or system, and that you have a Xapian backend. One of the long-term ideas I've had for org-ql, since I was working on helm-org-rifle years ago, is to have an indexed backend for files that aren't already open in Emacs. I have a branch on the
org-rifle
repo that implements a PoC SQLite index for Org files based on John Kitchin's work, but I haven't worked on it in a long time. Ideally that would be a separate package that could provide an org-ql backend.Anyway, it looks like you're doing some really interesting work here. If there are any shortcomings of org-ql that could be addressed to meet your needs better, please let me know. Maybe we could collaborate on some solutions that would help everyone.
BTW, a couple of quick tips or ideas from looking at a small bit of your code:
org-zettelkasten/org-zk-cache.el
Line 309 in e2ffd4d
pcache
. There's another one I'm trying to think of--I think it was by Radon Rosborough, so I guess I'm thinking of https://github.com/raxod502/prescient.el (the package's primary purpose is not to provide that functionality, but he wrote some code to do it that he wasn't interested in factoring out into a library).org-zettelkasten/org-zk-cache.el
Line 199 in e2ffd4d
delay-mode-hooks
here.Thanks!
The text was updated successfully, but these errors were encountered: