From: Lars Ingebrigtsen Date: Fri, 4 Mar 2016 11:46:59 +0000 (+0000) Subject: Add a command to save the bugs list X-Git-Url: https://code.delx.au/gnu-emacs-elpa/commitdiff_plain/af88a0271d5f361f79766e7f521c6fc53b3a5fd1 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. --- diff --git a/packages/debbugs/debbugs-gnu.el b/packages/debbugs/debbugs-gnu.el index d22dd8170..08c842548 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: