aboutsummaryrefslogtreecommitdiffstats
path: root/w3m-session-backup.el
diff options
context:
space:
mode:
Diffstat (limited to 'w3m-session-backup.el')
-rw-r--r--w3m-session-backup.el7
1 files changed, 6 insertions, 1 deletions
diff --git a/w3m-session-backup.el b/w3m-session-backup.el
index 47710d5..2f8fda4 100644
--- a/w3m-session-backup.el
+++ b/w3m-session-backup.el
@@ -38,7 +38,7 @@
(defun save-backup ()
"TODO"
- (with-temp-file "~/tmp-w3m-session.yml"
+ (with-temp-file (concat "~/" (filename))
(insert
(string-join
(mapcar
@@ -50,4 +50,9 @@
(my-w3m-session-backup))
"\n"))))
+(defun filename ()
+ "Generates a default filename using the current date & time."
+ (format "w3m-tabs-%s.yml"
+ (format-time-string "%Y%m%d-%Hh%M")))
+
(save-backup)