I have this function:
(defun org-agenda-show-agenda-and-todo (&optional arg)
(interactive "p")
(org-agenda arg "n"))
When calls, it will toggle a window with all of my current agenda and todo, like the pic below:
As you can see, it defaults to open a new window in a new vertical split. If i want to close this window, I can just press q
. The problem comes when I'm already working with 2 windows, like this:
| windows 1 | windows 2 |
| | |
If I call the same function, the org agenda and todo window would occupy window 2
. So, like this:
| windows 1 | org-agenda list |
| | |
When I press q
, the org-agenda list window would close, and so does my window 2
split. In other words, I am left with a single window with only window 1
.
Is there a way or an alternative to show all of my agenda and list without disrupting the current layout of my windows arrangement? I am thinking of something similar to ivy list bookmark, which you can see in the pic below:
Here, I can peek at my bookmark and just choose which one I want. If I want to stop peeking, I press Esc
and it goes away and my window arrangement is kept.