[emacs-w3m:13653] [FEATURE REQUEST] Remembering most recent save-path
Boruch Baum <[email protected]> Sun, 16 Aug 2020 21:41:01 -0400
| Newsgroups | gmane.emacs.w3m |
|---|---|
| Message-ID | <[email protected]> |
Hi, Katsumi-san. I was originally preparing this as a simple pull request, but then I noticed something to make me feel I should ask a question first on how you would want to proceed. The idea is pretty simple, and exists in pretty much any other browser: The default save directory should be remembered from the last time a save was performed during the current session. For my personally-modified version of the project, it seemed simple at first to insert (setq w3m-save-buffer-directory (file-name-directory name)) in two places, but then I saw that there seems to be an unnecessary duplication of the variables `w3m-save-buffer-directory' and `w3m-default-save-directory': w3m-save.el:33:(defcustom w3m-save-buffer-directory (expand-file-name w3m-save.el:57:Save the current buffer as `w3m-save-buffer-directory'/NAME.html, w3m-save.el:59:folder `w3m-save-buffer-directory'/NAME-files/. Use of w3m-save.el:60:`w3m-save-buffer-directory' may be over-ridden by including a w3m-save.el:87: (file-name-as-directory w3m-save-buffer-directory) w3m-save.el:91: (setq w3m-save-buffer-directory (file-name-directory name)) w3m-save.el:114: (setq name (expand-file-name name w3m-save-buffer-directory))) w3m.el:784:(defcustom w3m-default-save-directory w3m.el:4813: (setq dir (file-name-as-directory (or dir w3m-default-save-directory))) w3m.el:4817: (setq w3m-default-save-directory w3m.el:4818: (or (file-name-directory file) w3m-default-save-directory)) w3m.el:4819: (setq w3m-default-save-directory file) w3m.el:5833: (eval (car (get 'w3m-default-save-directory 'standard-value)) w3m.el:5835: (error w3m-default-save-directory)))) w3m.el:5845: w3m-default-save-directory basename) w3m.el:9311: w3m-default-save-directory)) w3m-save.el:35: w3m-default-save-directory) Someone at some point clearly did think it was a good idea to have two separate variables (see the defcustom at w3m-save.el:33), but maybe that decision should be revisited? It seems to me to be only an invitation for confusion. If you agree, then the next question would be which to keep and which to discard, and how to do it so the change won't break any users' current and long-standing set-up. Let me know what you think and I can prepare a pull request accordingly, or if its not worth the bother to you and you want to make the commit yourself, that's also fine of course. -- hkp://keys.gnupg.net CA45 09B5 5351 7C11 A9D1 7286 0036 9E45 1595 8BC0