From 339961efd7135904a6d3da09f342b9e38ce1e991 Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Sat, 30 Jan 2021 00:18:38 -0500 Subject: org-agenda: Use other window and pop to existing --- lisp/km-org-agenda.el | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lisp') 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/")) -- cgit v1.2.3