Added Org-recur
This commit is contained in:
parent
23a2f074f3
commit
7a01028187
1 changed files with 124 additions and 62 deletions
62
config.org
62
config.org
|
|
@ -50,7 +50,11 @@
|
||||||
- [[#inbox][Inbox]]
|
- [[#inbox][Inbox]]
|
||||||
- [[#capture-a-task-directly-into-project][Capture a task directly into Project]]
|
- [[#capture-a-task-directly-into-project][Capture a task directly into Project]]
|
||||||
- [[#org-agenda][Org Agenda]]
|
- [[#org-agenda][Org Agenda]]
|
||||||
|
- [[#refresh][Refresh]]
|
||||||
|
- [[#auto-update-agenda][Auto update agenda]]
|
||||||
- [[#todos-only-from-projects][TODOs only from Projects]]
|
- [[#todos-only-from-projects][TODOs only from Projects]]
|
||||||
|
- [[#org-recur][Org-recur]]
|
||||||
|
- [[#small-settings][Small settings]]
|
||||||
- [[#todos-in-today][Todos in Today]]
|
- [[#todos-in-today][Todos in Today]]
|
||||||
- [[#auto-refresh-agenda-view][Auto refresh agenda view]]
|
- [[#auto-refresh-agenda-view][Auto refresh agenda view]]
|
||||||
- [[#org-timeblock][org-timeblock]]
|
- [[#org-timeblock][org-timeblock]]
|
||||||
|
|
@ -95,6 +99,9 @@
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(global-set-key [remap list-buffers] 'ibuffer)
|
(global-set-key [remap list-buffers] 'ibuffer)
|
||||||
(global-set-key (kbd "M-o") 'other-window)
|
(global-set-key (kbd "M-o") 'other-window)
|
||||||
|
(global-set-key (kbd "C-c o t") 'vterm-toggle)
|
||||||
|
(global-set-key (kbd "C-c o a") 'org-agenda)
|
||||||
|
(global-set-key (kbd "C-c o d") 'dashboard-open)
|
||||||
;;(windmove-default-keybindings) ;; move between windows with S-<left>, S-<right>, S-<up>, S-<down>
|
;;(windmove-default-keybindings) ;; move between windows with S-<left>, S-<right>, S-<up>, S-<down>
|
||||||
#+end_src
|
#+end_src
|
||||||
** Focus new windows
|
** Focus new windows
|
||||||
|
|
@ -459,6 +466,7 @@ Emacs Dashboard is an extensible startup screen showing you recent files, bookma
|
||||||
"Sync org-roam and agenda"
|
"Sync org-roam and agenda"
|
||||||
(lambda (&rest _)
|
(lambda (&rest _)
|
||||||
(org-roam-db-sync)
|
(org-roam-db-sync)
|
||||||
|
(kylekrein/org-roam-refresh-agenda-list)
|
||||||
(org-agenda-redo)
|
(org-agenda-redo)
|
||||||
(message "Org-Roam and Agenda synced!")))
|
(message "Org-Roam and Agenda synced!")))
|
||||||
|
|
||||||
|
|
@ -861,6 +869,22 @@ capture was not aborted."
|
||||||
(global-set-key (kbd "C-c n t") #'kylekrein/org-roam-capture-task)
|
(global-set-key (kbd "C-c n t") #'kylekrein/org-roam-capture-task)
|
||||||
#+end_src
|
#+end_src
|
||||||
* Org Agenda
|
* Org Agenda
|
||||||
|
** Refresh
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(defun org-agenda-refresh ()
|
||||||
|
"Refresh all `org-agenda' buffers."
|
||||||
|
(dolist (buffer (buffer-list))
|
||||||
|
(with-current-buffer buffer
|
||||||
|
(when (derived-mode-p 'org-agenda-mode)
|
||||||
|
(org-agenda-maybe-redo)))))
|
||||||
|
#+end_src
|
||||||
|
** Auto update agenda
|
||||||
|
*** On Schedule
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(defadvice org-schedule (after refresh-agenda activate)
|
||||||
|
"Refresh org-agenda."
|
||||||
|
(org-agenda-refresh))
|
||||||
|
#+end_src
|
||||||
** TODOs only from Projects
|
** TODOs only from Projects
|
||||||
Collect and show todos only defined in files with tag ~Project~
|
Collect and show todos only defined in files with tag ~Project~
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
|
|
@ -887,6 +911,44 @@ Collect and show todos only defined in files with tag ~Project~
|
||||||
;; Build the agenda list the first time for the session
|
;; Build the agenda list the first time for the session
|
||||||
(kylekrein/org-roam-refresh-agenda-list)
|
(kylekrein/org-roam-refresh-agenda-list)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
** Org-recur
|
||||||
|
[[https://github.com/mrcnski/org-recur][Org-recur]] adds simple syntax, that enhances repeating tasks funktionality
|
||||||
|
*Examples:*
|
||||||
|
| Usage | Description |
|
||||||
|
|-------------+---------------------------------|
|
||||||
|
| ~\vert+2\vert~ | Recur every other day |
|
||||||
|
| ~\vert+w\vert~ | Recur every week |
|
||||||
|
| ~\vert1\vert~ | Recur the first of every month |
|
||||||
|
| ~\vert{}Thu\vert~ | Recur every Thursday |
|
||||||
|
| ~\vert{}Sun,Sat\vert~ | Recur every Sunday and Saturday |
|
||||||
|
| ~\vert{}Wkdy\vert~ | Recur every weekday |
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(use-package org-recur
|
||||||
|
:hook ((org-mode . org-recur-mode)
|
||||||
|
(org-agenda-mode . org-recur-agenda-mode))
|
||||||
|
:ensure t
|
||||||
|
:config
|
||||||
|
(define-key org-recur-mode-map (kbd "C-c d") 'org-recur-finish)
|
||||||
|
|
||||||
|
;; Rebind the 'd' key in org-agenda (default: `org-agenda-day-view').
|
||||||
|
(define-key org-recur-agenda-mode-map (kbd "d") 'org-recur-finish)
|
||||||
|
(define-key org-recur-agenda-mode-map (kbd "C-c d") 'org-recur-finish)
|
||||||
|
|
||||||
|
(setq org-recur-finish-done t
|
||||||
|
org-recur-finish-archive t))
|
||||||
|
#+end_src
|
||||||
|
** Small settings
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
;; Log time a task was set to DONE.
|
||||||
|
(setq org-log-done (quote time))
|
||||||
|
|
||||||
|
;; Don't log the time a task was rescheduled or redeadlined.
|
||||||
|
(setq org-log-redeadline nil)
|
||||||
|
(setq org-log-reschedule nil)
|
||||||
|
|
||||||
|
;; Prefer rescheduling to future dates and times
|
||||||
|
(setq org-read-date-prefer-future 'time)
|
||||||
|
#+end_src
|
||||||
** Todos in Today
|
** Todos in Today
|
||||||
Automatically copies all *DONE* TODOs to Today's daily
|
Automatically copies all *DONE* TODOs to Today's daily
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue