diff options
-rw-r--r-- | lib/eos/jao-dirmon.el | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/lib/eos/jao-dirmon.el b/lib/eos/jao-dirmon.el index ad90038..a2535ad 100644 --- a/lib/eos/jao-dirmon.el +++ b/lib/eos/jao-dirmon.el @@ -41,6 +41,17 @@ (defvar jao-dirmon-threshold 100) (defvar jao-dirmon-last-delta nil) +(defun jao-dirmon--show-deltas (old current deltas) + (with-temp-buffer + (insert "High deltas since " (car old) "\n------------------\n\n") + (dolist (d deltas) + (insert d "\n")) + (beginning-of-buffer) + (pop-to-buffer (current-buffer) nil t) + (when (y-or-n-p "Save current state?") + (setf (multisession-value jao-dirmon-last) + (cons (current-time-string) current))))) + ;;;###autoload (defun jao-dirmon-report () (interactive) @@ -52,11 +63,7 @@ (when (> d jao-dirmon-threshold) (push c high)))) (setq jao-dirmon-last-delta high) - (let ((prompt (format "High deltas since %s: %s. Save state?" - (car old) high))) - (when (y-or-n-p prompt) - (setf (multisession-value jao-dirmon-last) - (cons (current-time-string) current)))) + (jao-dirmon--show-deltas old current jao-dirmon-last-delta) jao-dirmon-last-delta)) (provide 'jao-dirmon) |