summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
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/"))