Add functions to show a special capture frame, add agenda command
Add functions to show a capture frame so that I can call it from anywhere and quickly capture some Org notes. Add an agenda command that shows me all the tasks that have been scheduled for today.
This commit is contained in:
parent
b7caee9eb6
commit
46b25df002
1 changed files with 20 additions and 1 deletions
21
oni-org.el
21
oni-org.el
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
;; Author: Tom Willemse <tom@ryuslash.org>
|
;; Author: Tom Willemse <tom@ryuslash.org>
|
||||||
;; Keywords: local
|
;; Keywords: local
|
||||||
;; Version: 20190528075843
|
;; Version: 20190607115302
|
||||||
;; Package-Requires: (org-plus-contrib org-bullets hydra org-wild-notifier)
|
;; Package-Requires: (org-plus-contrib org-bullets hydra org-wild-notifier)
|
||||||
|
|
||||||
;; This program is free software; you can redistribute it and/or modify
|
;; This program is free software; you can redistribute it and/or modify
|
||||||
|
@ -82,6 +82,22 @@ ones that have a predecessor."
|
||||||
(oni-org-heading-has-predecessor-p))
|
(oni-org-heading-has-predecessor-p))
|
||||||
(oni-org-next-heading-position))))
|
(oni-org-next-heading-position))))
|
||||||
|
|
||||||
|
(defun oni-org-delete-frame-once ()
|
||||||
|
"Run `delete-frame'.
|
||||||
|
|
||||||
|
After running it once remove it from `org-capture-after-finalize-hook'."
|
||||||
|
(delete-frame)
|
||||||
|
(remove-hook 'org-capture-after-finalize-hook 'oni-org-delete-frame-once))
|
||||||
|
|
||||||
|
(defun oni-org-run-capture-in-dedicated-frame ()
|
||||||
|
"Run `org-capture' in a dedicated frame."
|
||||||
|
(with-selected-frame (make-frame '((minibuffer)))
|
||||||
|
(org-capture nil "t")
|
||||||
|
(delete-other-windows)
|
||||||
|
(setf (frame-width) 80)
|
||||||
|
(setf (frame-height) 24)
|
||||||
|
(add-hook 'org-capture-after-finalize-hook 'oni-org-delete-frame-once)))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun oni-org-open-index ()
|
(defun oni-org-open-index ()
|
||||||
"Open the index of my org-based personal wiki."
|
"Open the index of my org-based personal wiki."
|
||||||
|
@ -108,6 +124,9 @@ ones that have a predecessor."
|
||||||
(setq org-agenda-todo-ignore-scheduled 'future)
|
(setq org-agenda-todo-ignore-scheduled 'future)
|
||||||
(setq org-agenda-skip-function-global #'oni-org-skip-tasks)
|
(setq org-agenda-skip-function-global #'oni-org-skip-tasks)
|
||||||
|
|
||||||
|
(setq org-agenda-custom-commands
|
||||||
|
'(("c" "Today's (Current) tasks" tags "SCHEDULED=\"<today>\"")))
|
||||||
|
|
||||||
(setq org-agenda-files
|
(setq org-agenda-files
|
||||||
(mapcar #'oni-org-expand-to-home
|
(mapcar #'oni-org-expand-to-home
|
||||||
'("documents/gtd/todo.org"
|
'("documents/gtd/todo.org"
|
||||||
|
|
Loading…
Reference in a new issue