-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Revamped caching system #199
base: master
Are you sure you want to change the base?
Conversation
Begins to address #88.
I have a general question here regarding what your plans are. Specifically, about the elements of Is |
This commit will break Travis for this branch. stash.el has yet to be released. It will be released to MELPA and then to ELPA pending paperwork (at which point it will be removed from MELPA).
This obsoletes sx-cache.
Ensure application data is written before Emacs is killed.
(defmacro sx-init-variable (variable) | ||
"Set up VARIABLE to be loaded from disk on init." | ||
`(add-hook 'sx-init--internal-hook | ||
(lambda () (stash-load ,variable)))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really think this ought to be handled by stash.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given that it's a programmer's interface, I was hesitant to introduce functionality that wasn't specifically requested. Having gone through to use it, though, you're right – there are very few cases in which it isn't desired. A no-load
flag to defstash
would suffice.
Hopefully this will also resolve those issues Travis has been having downloading the right version...
nil | ||
|
||
(defstash sx-auth-access-token | ||
"auth.el" sx nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given how catastrophic it would be to have two stashes with the same file name, maybe we should use more specific names for future stashes. Or (even better) maybe stash.el could take care of choosing unique file names based on variable name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The latter option seems good, but what else would auth
be used for (in our case specifically)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I don't know. I don't think we should change this variable specifically. It just occurred to me we might want to use longer names on future stashes.
Not ready for merge yet. Use this PR as a discussion medium.
Addresses #88.