aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2018-04-11 00:47:13 +0200
committerTeddy Wing2018-04-11 00:47:13 +0200
commit3ab50cde20150ffb3ba5b11ffc2e74e8ca35c959 (patch)
tree0d77e53892f91cd2fe0912feb4b7ec3049755441
parentda82655a896c69ba5835cfdfec05a91b6731879c (diff)
downloadw3m-session-backup-3ab50cde20150ffb3ba5b11ffc2e74e8ca35c959.tar.bz2
Fix file saving issues
* Use a real path for the temporary file because otherwise it either doesn't get saved, or I have no idea where it gets saved to. * Use the `INSERT` function to actually write the string to the temporary file buffer. * Use `(last page 1)` with the `1` argument at the end now as a way to try to get it to return us the string instead of a single-element list containing the page title. Not sure if this works though.
-rw-r--r--w3m-session-backup.el19
1 files changed, 10 insertions, 9 deletions
diff --git a/w3m-session-backup.el b/w3m-session-backup.el
index 62e5b65..f98bb8c 100644
--- a/w3m-session-backup.el
+++ b/w3m-session-backup.el
@@ -29,15 +29,16 @@
(defun save-backup ()
"TODO"
- (with-temp-file "tmp-w3m-session.txt"
- (string-join
- (mapcar
- (lambda (page)
- (format "%s\n%s"
- (first page)
- (first (last page))))
- (my-w3m-session-backup))
- "\n\n")))
+ (with-temp-file "~/tmp-w3m-session.txt"
+ (insert
+ (string-join
+ (mapcar
+ (lambda (page)
+ (format "%s\n%s"
+ (first page)
+ (last page 1)))
+ (my-w3m-session-backup))
+ "\n\n"))))
; (format
; "%s\n%s\n\n"
; )))