summary refs log tree commit diff stats
path: root/lisp/acdw-org.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/acdw-org.el')
-rw-r--r--lisp/acdw-org.el77
1 files changed, 55 insertions, 22 deletions
diff --git a/lisp/acdw-org.el b/lisp/acdw-org.el index 566deed..f961dda 100644 --- a/lisp/acdw-org.el +++ b/lisp/acdw-org.el
@@ -203,6 +203,16 @@ If LIST is non-nil, return the result as a list instead of a string."
203 (when (org-at-heading-p) (org-align-tags)))))) 203 (when (org-at-heading-p) (org-align-tags))))))
204 204
205 205
206;;; Misc.
207
208(defun org-clock-in-or-out (prefix)
209 "If clocked in, clock out. Otherwise, clock in."
210 (interactive "P")
211 (if (org-clocking-p)
212 (org-clock-out prefix)
213 (org-clock-in prefix)))
214
215
206;;; Faces 216;;; Faces
207 217
208(defface org-bold '((t (:weight bold))) 218(defface org-bold '((t (:weight bold)))
@@ -225,10 +235,12 @@ If LIST is non-nil, return the result as a list instead of a string."
225 :custom-face 235 :custom-face
226 (org-level-1 ((t :inherit fixed-pitch 236 (org-level-1 ((t :inherit fixed-pitch
227 :weight bold 237 :weight bold
228 :height 1.2))) 238 :slant italic
239 :height 1.0)))
229 (org-level-2 ((t :inherit fixed-pitch 240 (org-level-2 ((t :inherit fixed-pitch
230 :weight bold 241 :weight bold
231 :height 1.1))) 242 :slant italic
243 :height 1.0)))
232 (org-level-3 ((t :inherit fixed-pitch 244 (org-level-3 ((t :inherit fixed-pitch
233 :weight bold 245 :weight bold
234 :height 1.0))) 246 :height 1.0)))
@@ -299,17 +311,20 @@ If LIST is non-nil, return the result as a list instead of a string."
299 (sequence "|" "CANCELED(k@)") 311 (sequence "|" "CANCELED(k@)")
300 (sequence "MEETING(m)")) 312 (sequence "MEETING(m)"))
301 org-use-fast-todo-selection 'auto 313 org-use-fast-todo-selection 'auto
302 org-use-speed-commands t) 314 org-use-speed-commands t
315 org-element-use-cache nil)
303 ;; Keys 316 ;; Keys
304 (keymap-set org-mode-map "C-M-k" #'kill-paragraph) 317 (keymap-set org-mode-map "C-M-k" #'kill-paragraph)
305 (keymap-set org-mode-map "C-M-t" #'transpose-paragraphs) 318 (keymap-set org-mode-map "C-M-t" #'transpose-paragraphs)
306 (keymap-set org-mode-map "RET" #'+org-return-dwim) 319 (keymap-set org-mode-map "RET" #'+org-return-dwim)
307 (keymap-set org-mode-map "S-<return>" #'+org-table-copy-down|+org-return-dwim) 320 (keymap-set org-mode-map "S-<return>" #'+org-table-copy-down|+org-return-dwim)
321 (keymap-unset org-mode-map "C-'" t)
322 (keymap-unset org-mode-map "C-," t)
308 ;; Hooks 323 ;; Hooks
309 (add-hook 'org-mode-hook 324 (add-hook 'org-mode-hook
310 (defun org-mode@setup () 325 (defun org-mode@setup ()
311 (when (require 'visual-fill-column nil t) 326 (when (require 'visual-fill-column nil t)
312 (setq-local visual-fill-column-extra-text-width '(8 . 8)) 327 (setq-local visual-fill-column-extra-text-width '(2 . 2))
313 (visual-fill-column-mode)) 328 (visual-fill-column-mode))
314 (variable-pitch-mode) 329 (variable-pitch-mode)
315 (turn-off-auto-fill) 330 (turn-off-auto-fill)
@@ -325,19 +340,17 @@ If LIST is non-nil, return the result as a list instead of a string."
325 'org-mode 340 'org-mode
326 `(;; List markers => org-indent 341 `(;; List markers => org-indent
327 (,(concat 342 (,(concat
328 "^[ ]*\\(\\(?:[-+]\\|\\(?:[0-9]+\\|[A-Za-z]\\)[.)]\\)" 343 "^[ ]*\\(\\(?:[-+]\\|\\(?:[0-9]+\\|[A-Za-z]\\)[.)]\\)"
329 "\\(?:[ ]+\\|$\\)\\)" 344 "\\(?:[ ]+\\|$\\)\\)"
330 "\\(?:\\[@\\(?:start:\\)?\\([0-9]+\\|[A-Za-z]\\)\\]" 345 "\\(?:\\[@\\(?:start:\\)?\\([0-9]+\\|[A-Za-z]\\)\\]"
331 "[ ]*\\)?" 346 "[ ]*\\)?"
332 "\\(?:\\(\\[[ X-]\\]\\)" 347 "\\(?:\\(\\[[ X-]\\]\\)"
333 "\\(?:[ ]+\\|$\\)\\)?") 348 "\\(?:[ ]+\\|$\\)\\)?")
334 0 'org-indent)))) 349 0 'org-indent))))
335 350
336(use-package org-clock 351(use-package org-clock
337 :bind (("M-<f9>" . org-clock-out) 352 :bind (:map org-mode-map
338 :map org-mode-map 353 ("<f8>" . org-clock-in-or-out))
339 ("<f8>" . org-clock-in)
340 ("<f9>" . org-clock-out))
341 :config 354 :config
342 (setopt org-clock-clocked-in-display 'mode-line 355 (setopt org-clock-clocked-in-display 'mode-line
343 global-mode-string 356 global-mode-string
@@ -355,13 +368,11 @@ If LIST is non-nil, return the result as a list instead of a string."
355 org-agenda-skip-scheduled-if-done t 368 org-agenda-skip-scheduled-if-done t
356 org-agenda-span 10 369 org-agenda-span 10
357 org-agenda-block-separator ?─ 370 org-agenda-block-separator ?─
358 org-agenda-time-grid 371 org-agenda-time-grid '((daily today require-timed)
359 '((daily today require-timed) 372 (800 1000 1200 1400 1600 1800 2000)
360 (800 1000 1200 1400 1600 1800 2000) 373 " ┄┄┄┄┄ " "┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄")
361 " ┄┄┄┄┄ " "┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄") 374 org-agenda-current-time-string "← now ───────────────"
362 org-agenda-current-time-string 375 org-agenda-include-diary t ; I use the org-diary features
363 "← now ─────────────────────────────────────────────────"
364 org-agenda-include-diary nil ; I use the org-diary features
365 org-agenda-todo-ignore-deadlines 'near 376 org-agenda-todo-ignore-deadlines 'near
366 org-agenda-todo-ignore-scheduled 'future 377 org-agenda-todo-ignore-scheduled 'future
367 org-agenda-include-deadlines t 378 org-agenda-include-deadlines t
@@ -371,7 +382,29 @@ If LIST is non-nil, return the result as a list instead of a string."
371 org-agenda-skip-file-regexp "sync-conflict" 382 org-agenda-skip-file-regexp "sync-conflict"
372 org-agenda-inhibit-startup t 383 org-agenda-inhibit-startup t
373 org-agenda-sticky t 384 org-agenda-sticky t
374 org-agenda-follow-indirect t) 385 org-agenda-follow-indirect t
386 org-stuck-projects '("TODO=\"WAIT\""
387 ("TODO" "NEXT")
388 nil
389 "")
390 org-agenda-custom-commands
391 `(("c" "Click Here Digital To-do"
392 ((agenda "" ((org-agenda-overriding-header "Tasks")
393 (org-agenda-span 'fortnight)
394 (org-agenda-start-day "+0")
395 (org-agenda-skip-function
396 '(org-agenda-skip-subtree-if 'todo
397 '("WAIT" "MCKENZIE" "RACHEL")))))
398 (stuck "" ((org-agenda-overriding-header "Waiting"))))
399 ((org-agenda-files ',(list (progn (require 'chd)
400 (chd/ "inbox-chd.org"))))))))
401 ;; Speedup agenda generation
402 ;; https://orgmode.org/manual/Speeding-Up-Your-Agendas.html
403 ;; https://orgmode.org/worg/agenda-optimization.html
404 (setopt org-agenda-dim-blocked-tasks nil
405 org-agenda-inhibit-startup t
406 org-agenda-use-tag-inheritance nil
407 org-agenda-ignore-properties '(effort appt stats category))
375 ;; Hooks and advice 408 ;; Hooks and advice
376 (add-hook 'org-agenda-mode-hook #'truncate-lines-local-mode) 409 (add-hook 'org-agenda-mode-hook #'truncate-lines-local-mode)
377 (add-hook 'org-agenda-mode-hook #'hl-line-mode) 410 (add-hook 'org-agenda-mode-hook #'hl-line-mode)
@@ -440,6 +473,7 @@ effect for exporting link types)."
440 :custom-face 473 :custom-face
441 (org-modern-label ((t :inherit fixed-pitch 474 (org-modern-label ((t :inherit fixed-pitch
442 :height 1.0))) 475 :height 1.0)))
476 :hook (org-mode-hook)
443 :config 477 :config
444 (setopt org-modern-star nil 478 (setopt org-modern-star nil
445 org-modern-list '((43 . "◦") 479 org-modern-list '((43 . "◦")
@@ -449,8 +483,7 @@ effect for exporting link types)."
449 org-modern-hide-stars nil 483 org-modern-hide-stars nil
450 org-tags-column 0 484 org-tags-column 0
451 org-modern-keyword nil 485 org-modern-keyword nil
452 org-modern-table nil) 486 org-modern-table nil))
453 (global-org-modern-mode))
454 487
455(use-package org-taskwise 488(use-package org-taskwise
456 :after org 489 :after org