summaryrefslogtreecommitdiffhomepage
path: root/lib/eos
diff options
context:
space:
mode:
Diffstat (limited to 'lib/eos')
-rw-r--r--lib/eos/jao-afio.el15
-rw-r--r--lib/eos/jao-buffers.el16
2 files changed, 29 insertions, 2 deletions
diff --git a/lib/eos/jao-afio.el b/lib/eos/jao-afio.el
index caacc8c..1400949 100644
--- a/lib/eos/jao-afio.el
+++ b/lib/eos/jao-afio.el
@@ -22,6 +22,7 @@
(require 'multisession)
(require 'cl-lib)
(require 'jao-doc-session)
+(require 'jao-pdf)
(defvar jao-afio-use-frames (not window-system))
(defvar jao-afio-frame-parameters nil)
@@ -144,6 +145,16 @@
(jao-eww-session-load)))
;;;###autoload
+(defun jao-afio-org-agenda ()
+ (interactive)
+ (org-agenda nil "j")
+ (when-let* ((w (get-buffer-window "*Org Agenda*")))
+ (set-window-margins w 2 1)
+ (with-current-buffer (window-buffer w)
+ (setq-local cursor-in-non-selected-windows nil
+ line-spacing 0.2))))
+
+;;;###autoload
(defun jao-afio-open-www ()
(interactive)
(require 'jao-eww-session)
@@ -165,7 +176,7 @@
;;;###autoload
(defun jao-afio-open-gnus ()
(interactive)
- ;; (jao-org-agenda)
+ (jao-afio-org-agenda)
(calendar)
(find-file (expand-file-name "inbox.org" org-directory))
(delete-other-windows)
@@ -180,7 +191,7 @@
(set-window-dedicated-p nil t)
(split-window-below (/ (window-height) 3))
(other-window 1)
- (jao-org-agenda)
+ (jao-afio-org-agenda)
(set-window-dedicated-p nil t)
(split-window-below -8)
(other-window 1)
diff --git a/lib/eos/jao-buffers.el b/lib/eos/jao-buffers.el
index 5a41486..cae6c0f 100644
--- a/lib/eos/jao-buffers.el
+++ b/lib/eos/jao-buffers.el
@@ -51,7 +51,23 @@
(add-to-list 'display-buffer-alist
(jao-attached-buffer-entry name-rx height)))
+;;;###autoload
+(defun jao-buffer-same-mode (&optional mode pre-fn switch-fn)
+ (interactive)
+ (let* ((mode (or mode major-mode))
+ (modes (if (symbolp mode) (list mode) mode))
+ (pred `(lambda (b)
+ (let ((b (get-buffer (if (consp b) (car b) b))))
+ (member (buffer-local-value 'major-mode b)
+ ',modes))))
+ (buff (read-buffer "Buffer: " nil t pred)))
+ (when pre-fn (funcall pre-fn))
+ (if switch-fn (funcall switch-fn buff) (switch-to-buffer buff))))
+;;;###autoload
+(defun jao-buffer-same-mode-cmd (&optional pop)
+ (interactive "P")
+ (jao-buffer-same-mode nil nil (and pop #'pop-to-buffer)))
(provide 'jao-buffers)
;;; jao-buffers.el ends here