0

I am trying to use popwin to make org-agenda related windows popup windows. My goal is to dismiss agenda windows with C-g when done, leaving the whole window configuration the same way as it was before the agenda windows showed up.

(Dismissing agenda windows with q seems to delete some of the existing windows that they replace.)

I've installed popwin via MELPA and tried to set the related variable in init.el as described in the documentation:

(require 'popwin)
(push '(org-agenda-mode :position bottom) popwin:special-display-config)
(popwin-mode 1)

However, this does not seem to work. Pressing C-g doesn't dismiss the agenda window (which is launched with C-c a t and then t). I've also tried using agenda-mode instead of org-agenda-mode in above without success. Yet, popwin and C-g works on occur-mode, and the customization show up in M-x customize-variable interface.

(This is with Emacs 27.1 installed via PPA under Ubuntu 20.04)

My question is:

How to correctly set up emacs so that existing windows are preserved after closing org agenda windows?

Related:

popup windows, popwin problem?

How to control in which window a buffer is displayed? (solution doesn't seem to work)

1

Quite by chance, I encountered this blog, which has the following setting from org-mode itself that does exactly what I need:

Restore layout after exit from agenda view

(setq org-agenda-restore-windows-after-quit t)

After adding this to init.el, hitting q on transitional org agenda windows no longer deletes the windows that they replace.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.