summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2021-01-30 00:18:38 -0500
committerKyle Meyer <kyle@kyleam.com>2021-06-11 23:14:14 -0400
commit339961efd7135904a6d3da09f342b9e38ce1e991 (patch)
tree4c805de71246b053ba08ec24e0a03655ea55a4d5 /lisp
parent7737204be36e973cdc4d0bd0f7b9d796824dc6fb (diff)
downloademacs.d-339961efd7135904a6d3da09f342b9e38ce1e991.tar.gz
org-agenda: Use other window and pop to existing
Diffstat (limited to 'lisp')
-rw-r--r--lisp/km-org-agenda.el8
1 files changed, 8 insertions, 0 deletions
diff --git a/lisp/km-org-agenda.el b/lisp/km-org-agenda.el
index 45518b9..e377f69 100644
--- a/lisp/km-org-agenda.el
+++ b/lisp/km-org-agenda.el
@@ -23,6 +23,14 @@
(require 'org-agenda)
(require 'km-org)
+;;;###autoload
+(defun km/org-agenda (&optional arg)
+ (interactive "P")
+ (if-let ((buffer (and (not arg)
+ (get-buffer org-agenda-buffer-name))))
+ (pop-to-buffer buffer)
+ (org-agenda)))
+
(defun km/org-agenda-cd-and-read-dir-locals ()
(unless (get 'org-agenda-files 'org-restrict)
(setq default-directory (expand-file-name "~/notes/"))