From d273e792fbc1cc7238e156e24099d25ed0b3c53e Mon Sep 17 00:00:00 2001 From: Sean Allred Date: Sun, 2 Nov 2014 11:13:41 -0500 Subject: Add function to retrieve cache files --- stack-core.el | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'stack-core.el') diff --git a/stack-core.el b/stack-core.el index 3391d14..fde06a8 100644 --- a/stack-core.el +++ b/stack-core.el @@ -245,5 +245,14 @@ entire response as a complex alist." cons-cell)))) data)))) +(defun stack-cache-get-file (filename) + "Return a buffer for FILENAME from `stack-cache-directory'." + (let ((find-file-hook nil) + (file (expand-file-name filename stack-cache-directory))) + (unless (file-exists-p stack-cache-directory) + (mkdir stack-cache-directory)) + (unless (file-exists-p file) + (find-file-noselect file)))) + (provide 'stack-core) ;;; stack-core.el ends here -- cgit v1.2.3