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

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

[elpa] master af88a02: Add a command to save the bugs list


From: Lars Ingebrigtsen
Subject: [elpa] master af88a02: Add a command to save the bugs list
Date: Fri, 04 Mar 2016 11:47:17 +0000

branch: master
commit af88a0271d5f361f79766e7f521c6fc53b3a5fd1
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>

    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.
---
 packages/debbugs/debbugs-gnu.el |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/packages/debbugs/debbugs-gnu.el b/packages/debbugs/debbugs-gnu.el
index d22dd81..08c8425 100644
--- a/packages/debbugs/debbugs-gnu.el
+++ b/packages/debbugs/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]