-
-
Notifications
You must be signed in to change notification settings - Fork 582
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
Add a new defcustom to configure projectile-kill-buffers. #1333
Conversation
3 options are implemented: - all-buffers (corresponds to the existing behavior) - keep-processes - kill-only-files: kill only the buffer that have a buffer-file-name. * projectile-kill-buffers-filter: new defcustom.
projectile.el
Outdated
associated to a file." | ||
:group 'projectile | ||
:type '(radio | ||
(const :tag "All project files" kill-all) |
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.
files -> buffers
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.
done!
projectile.el
Outdated
:group 'projectile | ||
:type '(radio | ||
(const :tag "All project files" kill-all) | ||
(const :tag "Preserve process buffer" keep-processes) |
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 don't get what's the difference between the final two options - keep-processes and and kill-only-files are more or less the same as something's either a file buffer or some special buffer (although those won't necessary have process attached to them).
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.
You are probably right that the difference may not make much sense in terms of usage. I made the customization point extensible to allow for more fine-grained control, while removing the keep-processes choice.
projectile.el
Outdated
;; we take care not to kill indirect buffers directly | ||
;; as we might encounter them after their base buffers are killed | ||
(not (buffer-base-buffer buffer)) | ||
(case projectile-kill-buffers-filter |
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.
You probably meant to use pcase
here.
937cee6
to
e28f626
Compare
Thanks so much for this! Can't wait for it to be merged |
Thanks! |
32 options are implemented:keep-processeschangelog:
Note:
edit: eventually kept only
kill-only-files
, while allowing any predicate to be used.cc @mfiano
fix #1233