emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/debbugs 10f5c39 177/311: Add a command to save the bugs


From: Stefan Monnier
Subject: [elpa] externals/debbugs 10f5c39 177/311: Add a command to save the bugs list
Date: Sun, 29 Nov 2020 18:42:06 -0500 (EST)

branch: externals/debbugs
commit 10f5c393ef4eec0dc3901875c4d368e5f1616b8a
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    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:



reply via email to

[Prev in Thread] Current Thread [Next in Thread]