From cd2f969272a8ad95c1da19e8e6a7fa4b5f201f08 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Wed, 11 Apr 2018 03:23:26 +0200 Subject: Make the save directory configurable Put the save directory in a variable to make it configurable. Default it to the current directory. Thanks to Trey Jackson for the `FILE-NAME-AS-DIRECTORY` function: https://stackoverflow.com/questions/3964715/what-is-the-correct-way-to-join-multiple-path-components-into-a-single-complete/3964815#3964815 --- w3m-session-backup.el | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/w3m-session-backup.el b/w3m-session-backup.el index 2f8fda4..89f74dd 100644 --- a/w3m-session-backup.el +++ b/w3m-session-backup.el @@ -1,3 +1,6 @@ +;; Configurable save directory, default to current path +(setq save-directory ".") + (defun buffers () "TODO" (nth 2 @@ -38,7 +41,10 @@ (defun save-backup () "TODO" - (with-temp-file (concat "~/" (filename)) + (with-temp-file + (concat + (file-name-as-directory save-directory) + (filename)) (insert (string-join (mapcar -- cgit v1.2.3