-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
* layers/+spacemacs/spacemacs-defaults/funcs.el: customer variable for spacemacs/delete-buffer-file #16403
* layers/+spacemacs/spacemacs-defaults/funcs.el: customer variable for spacemacs/delete-buffer-file #16403
Conversation
(funcall #'spacemacs/delete-current-buffer-file | ||
spacemacs-delete-current-buffer-file-arbitrary) | ||
(unless spacemacs-delete-current-buffer-file-arbitrary | ||
(message "You can customer the \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/customer/customize
s/question/confirmation
However, to prevent you from wasting any further effort, I'd like to get @smile13241324 take on the overall approach before moving forward. |
8605a6a
to
ab89cfb
Compare
Updated with review comments. |
I wonder what was bound to spc f d before, if nothing than spc f d and spc f D would be treated equally by Spacemacs this is ask for confirmation. In this case I assume that nobody really used the capital version as its one press extra per use. If this is so then the behaviour stays the same and no smoothening of the transition is necessary. For the exceptional case that someone relied on this behaviour I would vote for adding a conf var to restore the old behaviour but not warn if it is used. In addition we could add a warning on the splash screen under the rolling release message listing the breaking change and when it occurred. Edit: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have added some changes to make the naming of the var more clear and changed the meaning to opt out of binding improvements rather than to make it the default.
If you could add a mentioning on the home buffer just after the rolling release part it would even be better.
(unless spacemacs-delete-current-buffer-file-arbitrary | ||
(message "Customer the `spacemacs-delete-current-buffer-file-arbitrary' \ | ||
to delete buffer and file without confirmation."))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove the warning if the legacy behaviour is wished. In this case its a conf decision and we should not complain about it.
(defcustom spacemacs-delete-current-buffer-file-arbitrary nil | ||
"User deletes current buffer and file without confirmation." | ||
:type 'boolean | ||
:group 'spacemacs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please change the name to "spacemacs-keep-legacy-current-buffer-delete-bindings"
Please change the description so that the key binding change is described and which keys are set when legacy is used and which are set the other way around.
Default for this var should be nil for we emphasize the new binding which brings more functionality while we still allow to keep the old bindings.
ab89cfb
to
c1a69fd
Compare
Hi @smile13241324 And I do searched the before, the The If I missed other key points, please let me know. Thanks. |
|
I strongly agree that we should not change the meaning of |
Hmmm sure we can do it this way, this would mean a second var to make spc f D non asking, with a standard value of nil. @sunlin7 would you be willing to add this one too? I think then the transition should be very smooth. |
…dings * layers/+spacemacs/spacemacs-defaults/funcs.el: New customer variable spacemacs-keep-legacy-current-buffer-delete-bindings to delete current buffer and file with/without confirmation.
c1a69fd
to
ebd6502
Compare
Sure! I pushed the the modified changes that intruduce a variable |
@sunlin7, I think #16403 doesn't quite do what was agreed upon.
The variable introduced actually has the opposite meaning but with a standard value of nil, so at the current tip of the develop branch, |
I readed your pr, and it's okay for me. Thanks |
A customer variable to control the
spacemacs/delete-current-buffer-file
behavior to provide smoth change for users.