Switch to another window when opening agenda items
This commit is contained in:
parent
f6fb70894b
commit
f2c2bb4837
1 changed files with 10 additions and 1 deletions
|
@ -4,7 +4,7 @@
|
|||
|
||||
;; Author: Tom Willemse <tom@ryuslash.org>
|
||||
;; Keywords: local
|
||||
;; Version: 2020.1115.140847
|
||||
;; Version: 2020.1117.180414
|
||||
;; Package-Requires: (oni-yasnippet oni-alert oni-hydra org-plus-contrib org-bullets org-edna diminish all-the-icons)
|
||||
|
||||
;; This program is free software; you can redistribute it and/or modify
|
||||
|
@ -299,6 +299,10 @@ also move point to the start of the heading."
|
|||
|
||||
;;;; Agenda
|
||||
|
||||
(defun oni-org-agenda-window-p (_target _action)
|
||||
"Check if the current buffer is the agenda buffer."
|
||||
(string= (buffer-name) org-agenda-buffer-name))
|
||||
|
||||
(defun oni-org-initialize-agenda-category-icons ()
|
||||
"Set ‘org-agenda-category-icon-alist’ if it hasn’t already been set."
|
||||
(when (null org-agenda-category-icon-alist)
|
||||
|
@ -341,6 +345,11 @@ also move point to the start of the heading."
|
|||
|
||||
(add-hook 'org-mode-hook #'oni-org-initialize-agenda-category-icons)
|
||||
|
||||
(add-to-list 'display-buffer-alist
|
||||
'(oni-org-agenda-window-p
|
||||
display-buffer-in-previous-window
|
||||
(inhibit-same-window . t)))
|
||||
|
||||
;;;; Capture
|
||||
|
||||
(require 'org-capture)
|
||||
|
|
Loading…
Reference in a new issue