1
0
Fork 0

[oni-org] Add function to write oni-project-steps dblock

This allows me to run ‘org-dynamic-block-insert-dblock’ instead of having to
write it manually each time.
This commit is contained in:
Tom Willemse 2022-05-26 23:13:28 -07:00
parent 67fbdf607e
commit c63f5f0fec

View file

@ -4,7 +4,7 @@
;; Author: Tom Willemse <tom@ryuslash.org> ;; Author: Tom Willemse <tom@ryuslash.org>
;; Keywords: local ;; Keywords: local
;; Version: 2022.0523.185109 ;; Version: 2022.0526.181315
;; Package-Requires: (oni-yasnippet oni-alert oni-hydra org org-contrib org-bullets org-edna diminish all-the-icons olivetti mixed-pitch) ;; Package-Requires: (oni-yasnippet oni-alert oni-hydra org org-contrib org-bullets org-edna diminish all-the-icons olivetti mixed-pitch)
;; This program is free software; you can redistribute it and/or modify ;; This program is free software; you can redistribute it and/or modify
@ -579,13 +579,7 @@ also move point to the start of the heading."
(setq org-agenda-window-setup 'only-window) (setq org-agenda-window-setup 'only-window)
(setq org-agenda-custom-commands (setq org-agenda-custom-commands
'(("i" `(("t" "Todo at this computer" tags-todo ,(format "TODO=\"TODO\"+%s" (system-name))
"Inbox: The giant list of things that I havent sorted through yet."
todo ""
((org-agenda-files (list org-default-notes-file))
(org-agenda-cmp-user-defined (lambda (_ _) -1))
(org-agenda-sorting-strategy '(user-defined-up))))
("t" "Todo" tags-todo "TODO=\"TODO\"-CATEGORY=\"inbox\"+SCHEDULED=\"\""
((org-overriding-columns-format "%TODO %46ITEM %1BLOCKED %Effort"))) ((org-overriding-columns-format "%TODO %46ITEM %1BLOCKED %Effort")))
("r" "Reading list" tags-todo "TODO=\"READ\"+SCHEDULED=\"\"-Effort=\"\"" ("r" "Reading list" tags-todo "TODO=\"READ\"+SCHEDULED=\"\"-Effort=\"\""
((org-overriding-columns-format "%8CATEGORY %ITEM %3EFFORT") ((org-overriding-columns-format "%8CATEGORY %ITEM %3EFFORT")
@ -860,7 +854,14 @@ This is an around advice for org-html--svg-image as FUN."
"\n")) "\n"))
(org-update-statistics-cookies nil))) (org-update-statistics-cookies nil)))
(defun oni-org-insert-project-steps ()
"Create a dynamic block capturing the steps in a project."
(interactive)
(org-create-dblock '(:name "oni-project-steps"))
(org-update-dblock))
(defalias 'org-dblock-write:oni-project-steps 'oni-org-dblock-write-project-steps) (defalias 'org-dblock-write:oni-project-steps 'oni-org-dblock-write-project-steps)
(org-dynamic-block-define "oni-project-steps" #'oni-org-insert-project-steps)
;;; Moving subtrees ;;; Moving subtrees