branch: externals/debbugs
commit 10f5c393ef4eec0dc3901875c4d368e5f1616b8a
Author: Lars Ingebrigtsen <[email protected]>
Commit: Lars Ingebrigtsen <[email protected]>
Add a command to save the bugs list
* debbugs-gnu.el (debbugs-gnu-save-cache): New function to save
the bugs list for offline debugging.
---
debbugs-gnu.el | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/debbugs-gnu.el b/debbugs-gnu.el
index d22dd81..08c8425 100644
--- a/debbugs-gnu.el
+++ b/debbugs-gnu.el
@@ -1666,6 +1666,17 @@ If given a prefix, patch in the branch directory
instead."
(switch-to-buffer "*vc-diff*")
(other-window 1))
+(defun debbugs-gnu-save-cache ()
+ "Save the bugs cache to a file."
+ (interactive)
+ (unless debbugs-cache-data
+ (error "No data to cache"))
+ (unless (file-exists-p "~/.emacs.d/debbugs-cache")
+ (make-directory "~/.emacs.d/debbugs-cache" t))
+ (let ((coding-system-for-write 'utf-8))
+ (with-temp-file "~/.emacs.d/debbugs-cache/list"
+ (prin1 debbugs-cache-data (current-buffer)))))
+
(provide 'debbugs-gnu)
;;; TODO: