From 3ab50cde20150ffb3ba5b11ffc2e74e8ca35c959 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Wed, 11 Apr 2018 00:47:13 +0200 Subject: 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. --- w3m-session-backup.el | 19 ++++++++++--------- 1 file 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" ; ))) -- cgit v1.2.3