-
Notifications
You must be signed in to change notification settings - Fork 1
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
Option to limit current-window-only to org-agenda and org-capture #7
Comments
Thank you for the RFE @rtrppl, Generally, my approach so far was "This is an opinionated package and it is all or nothing". But there have been requests to opt out for certain modes. For example Magit, which is now documented in the README - https://github.com/FrostyX/current-window-only?tab=readme-ov-file#tips-and-tricks So it may be worth it to add some level of configuration. The (defun current-window-only--switch-to-buffer-other-window
(buffer-or-name &optional norecord)
(switch-to-buffer buffer-or-name norecord t))
(defun current-window-only--delete-other-windows
(&optional window interactive)
(ignore window)
(ignore interactive)) The predicate would be entirely user-defined. If it was evaluated to The question is, what arguments should it take, if any? And will it work for everybody who wants to opt-out in some circumstance? |
Another approach that I've been thinking about was having a possibility to enable |
Both ideas sound reasonable. I also have no experience with buffer-local modes. As a user I just wanted more control over the scope of |
In its current version
current-window-only
affects all calls toswitch-to-buffer-other-window
. A user, however, may want to limit the scope of current-window-only to, for example, org-agenda and org-capture. The following modification of the functioncurrent-window-only--switch-to-buffer-other-window
would do just this:The text was updated successfully, but these errors were encountered: