summaryrefslogtreecommitdiffhomepage
path: root/lib/eos/jao-afio.el
diff options
context:
space:
mode:
Diffstat (limited to 'lib/eos/jao-afio.el')
-rw-r--r--lib/eos/jao-afio.el50
1 files changed, 33 insertions, 17 deletions
diff --git a/lib/eos/jao-afio.el b/lib/eos/jao-afio.el
index 28e6f67..2a4efbb 100644
--- a/lib/eos/jao-afio.el
+++ b/lib/eos/jao-afio.el
@@ -127,26 +127,42 @@
(gnus)
(jao-gnus--set-summary-line))
+(defun jao-afio--mail-sidebar ()
+ (other-window 1)
+ (delete-other-windows-vertically)
+ (find-file (expand-file-name "inbox.org" org-directory))
+ (split-window-below (/ (window-height) 3))
+ (other-window 1)
+ (org-agenda-list)
+ (split-window-below -9)
+ (other-window 1)
+ (switch-to-buffer "*Calendar*")
+ (other-window 1))
+
+;;;###autoload
+(defun jao-afio-open-notmuch ()
+ (interactive)
+ (delete-other-windows)
+ (split-window-horizontally -80)
+ (notmuch)
+ (jao-afio--mail-sidebar))
+
+(defun jao-afio-open-mail-function ()
+ (interactive)
+ (jao-trisect)
+ (other-window 2)
+ (delete-window)
+ (other-window 1)
+ (funcall jao-afio-mail-function)
+ (jao-afio--mail-sidebar))
+
;;;###autoload
(defun jao-afio-open-mail ()
(interactive)
- (if (or (null jao-afio-mail-function) (eq 'gnus jao-afio-mail-function))
- (jao-afio-open-gnus)
- (calendar)
- (jao-trisect)
- (other-window 2)
- (delete-window)
- (other-window 1)
- (funcall jao-afio-mail-function)
- (other-window 1)
- (find-file (expand-file-name "inbox.org" org-directory))
- (split-window-below (/ (window-height) 3))
- (other-window 1)
- (org-agenda-list)
- (split-window-below -9)
- (other-window 1)
- (switch-to-buffer "*Calendar*")
- (other-window 1)))
+ (unless (get-buffer "*Calendar*") (calendar))
+ (cond ((eq 'gnus jao-afio-mail-function) (jao-afio-open-gnus))
+ ((eq 'notmuch jao-afio-mail-function) (jao-afio-open-notmuch))
+ (jao-afio-open-mail-function (jao-afio-open-mail-function))))
(defun jao-afio--goto-frame (next &optional reset)
(when (or reset (not (eq next jao-afio--current-config)))