You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yesterday I installed your package and like it so far. I however noted that you add an advice to simply override delete-other-window. Which is bound to M-x 1.
This is very unfortunate, because SOMETIMES I deliberately want to windows and later delete them again. I even bound this to my F5 key:
(defun my-explode-window ()
"If there is only one window displayed, act like C-x2. If there
are two windows displayed, act like C-x1:"
(interactive)
(if (one-window-p t)
(progn
(split-window-vertically)
(other-window 1)
(my-zoom-next-buffer2)
(other-window -1))
(delete-other-windows)))
Can you perhaps do this trick:
advice org-agenda & org-capture with an before and after form
the before form adds your advice that makes delete-other-window a no-op
the after form removes your advice to delete-other-window
This would have the effect that for these both org features, delete-other-window would be "gone". But for the rest of Emacs, not so much.
The text was updated successfully, but these errors were encountered:
Addendum: this advice with before and after might not be possible, what you would need is some buffer-local advice (local to the org-agenda).
If you look up advice-add, you see that it used add-function. And add-function in turn has this helptext snippet:
If PLACE is a symbol, its default-value will be affected.
Use (local 'SYMBOL) if you want to apply FUNCTION to SYMBOL buffer-locally.
And I think advice-add will inherit this. So maybe you somehow can advice-add away delete-other-window while the org-agenda buffer is already shown? With a buffer-local advice? That would delete the function there, but not everywhere if I'm not mistaken.
Thank you for the feedback @holgerschurig and for the suggestions on how to fix the issue. Much appreciated.
The solution sounds quite complicated and I don't know if I will be able to implement it. Please feel free to send a PR.
As a workaround, maybe you can define something like
Hi FrostyX,
Yesterday I installed your package and like it so far. I however noted that you add an advice to simply override delete-other-window. Which is bound to M-x 1.
This is very unfortunate, because SOMETIMES I deliberately want to windows and later delete them again. I even bound this to my F5 key:
Can you perhaps do this trick:
This would have the effect that for these both org features, delete-other-window would be "gone". But for the rest of Emacs, not so much.
The text was updated successfully, but these errors were encountered: