5

With a vertical split (C-x 3), regardless of which buffer I am in, C-c a opens the agenda on the right window, pushing my org file into the left window.

Is it possible to have the agenda open into the left window, rather than the right? If yes, how?

4
  • You have a few choices: (1) customize the variable org-agenda-window-setup within the recognized available options and just live within those limits; (2) modify the function org-agenda-prepare-window, but most people (for whatever the reasons) cringe at the thought of touching a sacred/holy built-in function; (3) add a display-buffer-alist entry to try and trump the behavior of org-switch-to-buffer-other-window when the aforementioned variable has the value of 'other-window; (4) there is another variable that is modifiable to affect the display-buffer family of functions, special ..
    – lawlist
    Commented Aug 29, 2016 at 1:56
  • Upon further looking into the code, I see that org-switch-to-buffer-other-window uses org-no-popups and switch-to-buffer-other-window. In the version of org-mode that I examined, the display-buffer-alist is temporarily let-bound to nil by org-no-popups -- thus, modifying the display-buffer-alist would not work in my case. org-no-popus runs a test to let-bind pop-up-frames display-buffer-alist or pop-up-frames special-display-buffer-names special-display-regexps special-display-function -- so depending upon the outcome of the test, some of those variables can be used.
    – lawlist
    Commented Aug 29, 2016 at 16:25
  • Thanks, lawlist. Very grateful for all your help; I'll be very happy if I have half your skill with this someday. I've saved this info into my org file -- to revisit when I'm a little deeper into emacs . . .
    – dwrz
    Commented Aug 31, 2016 at 3:41
  • 1
    Is there a chance someone can mold the above stuff into an answer? Commented Mar 3, 2020 at 8:33

1 Answer 1

0

I like my Agenda to pop up in the right window, but I made a little modification that makes it pop in the left:

(defun my-org-agenda ()
  (interactive)
  (split-window-right)
  (let ((org-agenda-window-setup 'current-window))
    (org-agenda nil "c")))

Note that I like to display my custom "c" option by default, but you can remove nil and "c" if you just want the menu.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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