New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Minor improvement: option to disable query for whether to open newly saved file #16362
Comments
Well, and something related that would be very intuitive to have is a default binding for creating a new buffer and saving it as a new file. |
You can just use |
Indeed, I totally missed that possibility. Thank you for improving my workflow! Regarding the |
I would not object to adding a user option. In any case, one could of course change the behaviour locally with something like: (defun my/spacemacs/save-as (filename)
(interactive (list (expand-file-name (read-file-name "Save buffer as: " nil nil nil
(when current-prefix-arg (buffer-name))))))
(spacemacs/save-as filename :current))
(spacemacs/set-leader-keys "fc" 'my/spacemacs/save-as) This is slightly inconvenient as there does not seem to be an idiomatic way to call a function using its interactive specification for some of its arguments, and using fixed values for the remaining ones. Hence I just copied the interactive specification1 of the first argument from Footnotes
|
This is just a minor issue I have with saving copies of files since a while ago. I remember when first using spacemacs, I did not have this issue:
Whenever I save a buffer as a copy with
SPC f c
, spacemacs queries me whether I want to open the file. I have never not opened the new file. I understand that for some users who frequently create backups of files usingSPC f c
, not opening the newly saved file should be an option. What I would like to have is an optiondotspacemacs-default-open-file-on-copy
or something similar that I can set to "current", "other", or "nil" to avoid the extra query.If this would be undesirable, feel free to directly reject the issue, it is really just a very minor annoyance.
The text was updated successfully, but these errors were encountered: