diff options
| author | Teddy Wing | 2018-04-11 03:23:26 +0200 | 
|---|---|---|
| committer | Teddy Wing | 2018-04-11 03:23:26 +0200 | 
| commit | cd2f969272a8ad95c1da19e8e6a7fa4b5f201f08 (patch) | |
| tree | 0708ca93cfae528bfdba505fa3b418c8cdda37fa | |
| parent | 8924a9d277ae8bd52ac9c9b47f8b27c8f40bed4d (diff) | |
| download | w3m-session-backup-cd2f969272a8ad95c1da19e8e6a7fa4b5f201f08.tar.bz2 | |
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
| -rw-r--r-- | w3m-session-backup.el | 8 | 
1 files changed, 7 insertions, 1 deletions
| 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 | 
