|
|
|
|
@ -22,6 +22,7 @@ |
|
|
|
|
** TODO revert org-files on frame activation. |
|
|
|
|
What was the deal with auto-revert-mode again? |
|
|
|
|
|
|
|
|
|
** DONE Add an empty line before habits in the daily agenda |
|
|
|
|
* COMMENT About indentation in this file |
|
|
|
|
This file will be indented with ~org-adapt-indentation~ set to t |
|
|
|
|
|
|
|
|
|
@ -1114,6 +1115,61 @@ |
|
|
|
|
(setq org-use-speed-commands t) |
|
|
|
|
#+end_src |
|
|
|
|
Customize the agenda interface a bit |
|
|
|
|
- newline before habits |
|
|
|
|
#+begin_src emacs-lisp |
|
|
|
|
(defun wilder/insert-before-first (pred el list &optional base) |
|
|
|
|
"Returns a list in which EL is inserted before the first occurrence in LIST satisfying PRED" |
|
|
|
|
(if (not list) |
|
|
|
|
base |
|
|
|
|
(if (funcall pred (car list)) |
|
|
|
|
(append base (list el) list) |
|
|
|
|
(wilder/insert-before-first pred el (cdr list) (nconc base (list (car list))))))) |
|
|
|
|
|
|
|
|
|
(defun org-agenda-finalize-entries (list &optional type) |
|
|
|
|
"Sort, limit and concatenate the LIST of agenda items. |
|
|
|
|
The optional argument TYPE tells the agenda type." |
|
|
|
|
(setq org-planner list) |
|
|
|
|
(let ((max-effort (cond ((listp org-agenda-max-effort) |
|
|
|
|
(cdr (assoc type org-agenda-max-effort))) |
|
|
|
|
(t org-agenda-max-effort))) |
|
|
|
|
(max-todo (cond ((listp org-agenda-max-todos) |
|
|
|
|
(cdr (assoc type org-agenda-max-todos))) |
|
|
|
|
(t org-agenda-max-todos))) |
|
|
|
|
(max-tags (cond ((listp org-agenda-max-tags) |
|
|
|
|
(cdr (assoc type org-agenda-max-tags))) |
|
|
|
|
(t org-agenda-max-tags))) |
|
|
|
|
(max-entries (cond ((listp org-agenda-max-entries) |
|
|
|
|
(cdr (assoc type org-agenda-max-entries))) |
|
|
|
|
(t org-agenda-max-entries)))) |
|
|
|
|
(when org-agenda-before-sorting-filter-function |
|
|
|
|
(setq list |
|
|
|
|
(delq nil |
|
|
|
|
(mapcar |
|
|
|
|
org-agenda-before-sorting-filter-function list)))) |
|
|
|
|
(setq list (mapcar #'org-agenda-highlight-todo list) |
|
|
|
|
list (mapcar #'identity (sort list #'org-entries-lessp))) |
|
|
|
|
(when max-effort |
|
|
|
|
(setq list (org-agenda-limit-entries |
|
|
|
|
list 'effort-minutes max-effort |
|
|
|
|
(lambda (e) (or e (if org-agenda-sort-noeffort-is-high |
|
|
|
|
32767 -1)))))) |
|
|
|
|
(when max-todo |
|
|
|
|
(setq list (org-agenda-limit-entries list 'todo-state max-todo))) |
|
|
|
|
(when max-tags |
|
|
|
|
(setq list (org-agenda-limit-entries list 'tags max-tags))) |
|
|
|
|
(when max-entries |
|
|
|
|
(setq list (org-agenda-limit-entries list 'org-hd-marker max-entries))) |
|
|
|
|
(when (and org-agenda-dim-blocked-tasks org-blocker-hook) |
|
|
|
|
(setq list (mapcar #'org-agenda--mark-blocked-entry list))) |
|
|
|
|
|
|
|
|
|
(setq list |
|
|
|
|
(wilder/insert-before-first #'(lambda (string) |
|
|
|
|
(get-text-property 0 'org-habit-p string)) |
|
|
|
|
"" list)) |
|
|
|
|
|
|
|
|
|
(mapconcat #'identity list "\n"))) |
|
|
|
|
|
|
|
|
|
#+end_src |
|
|
|
|
- Sleeker time-grid |
|
|
|
|
#+begin_src emacs-lisp |
|
|
|
|
(setq org-agenda-time-grid '((daily today require-timed) |
|
|
|
|
|