#+COLUMNS: %50ITEM %5Effort %5CLOCKSUM %5Remaining #+BEGIN_SRC emacs-lisp ;; (unload-feature 'my-progress) ;; (setq org-clock-in-prepare-hook nil ;; org-clock-out-hook nil ;; org-export-filter-final-output-functions nil) (load (concat default-directory "my-progress.el") nil t t) (add-to-list 'org-export-filter-final-output-functions 'my-progress-remove-toc-heading) #+END_SRC #+BEGIN_SRC emacs-lisp (setq org-properties-postprocess-alist '(("Remaining" lambda(value) (let ((clocksum (org-clock-sum-current-item)) (effort (org-duration-string-to-minutes (org-entry-get (point) "Effort")))) (org-minutes-to-hh:mm-string (- effort clocksum)))))) (require 'org-inlinetask) (add-hook 'org-clock-in-prepare-hook 'my-progress-org-mode-ask-effort 'append) (add-hook 'org-clock-out-hook (lambda () (org-set-property "Remaining" 0)) 'append) #+END_SRC * Heading One ** A sub heading *************** TODO Inline ting CLOCK: [2012-10-10 Wed 11:07]--[2012-10-10 Wed 11:34] => 0:27 CLOCK: [2012-10-10 Wed 10:55]--[2012-10-10 Wed 11:04] => 0:09 :PROPERTIES: :Effort: 1:00 :Remaining: 0:51 :END: *************** END ** Another sub heading *************** TODO Write this bit CLOCK: [2012-10-10 Wed 11:10]--[2012-10-10 Wed 11:59] => 0:49 :PROPERTIES: :Effort: 1:20 :Remaining: 0:31 :END: *************** END ** Heading with no inline tasks *** a This heading could be omitted because it has no tasks. * Heading Two *************** TODO Finish writing under heading two *************** END ** Sub heading that will show up in the table *** Will this one? *************** TODO Test CLOCK: [2012-10-10 Wed 11:55]--[2012-10-10 Wed 11:56] => 0:01 CLOCK: [2012-10-10 Wed 11:50]--[2012-10-10 Wed 11:54] => 0:04 :PROPERTIES: :Effort: 0:20 :Remaining: 0:14 :END: *************** END **** And this? ** Yet another subheading *** A sub sub heading And an inline task: *************** TODO Do an inline thing CLOCK: [2012-10-10 Wed 11:45]--[2012-10-10 Wed 11:50] => 0:05 :PROPERTIES: :Remaining: 0:15 :Effort: 0:20 :END: *************** END *** Another sub sub heading **** This heading contains no tasks ...and so will not appear in the progress table. #+INCLUDE: "b.org" :minlevel 1 * Progress table #+name: progressTbl #+BEGIN: columnview-toc :id file:/home/myles/tmp/toctbl/mwe/a.org | ITEM | Effort | CLOCKSUM | Remaining | | |----------------------------------------------------+--------+----------+-----------+---| | .1 Heading One | | 1:25 | | | | ... 1.1 A sub heading | | 0:36 | | | | . Inline ting | 1:00 | 0:36 | 0:51 | | | ... 1.2 Another sub heading | | 0:49 | | | | . Write this bit | 1:20 | 0:49 | 0:31 | | | ... 1.3 Heading with no inline tasks | | | | | | ...... 1.3.1 a | | | | | | .2 Heading Two | | 0:10 | | | | . Finish writing under heading two | | | | | | ... 2.1 Sub heading that will show up in the table | | 0:05 | | | | ...... 2.1.1 Will this one? | | 0:05 | | | | . Test | 0:20 | 0:05 | 0:14 | | | ... 2.2 Yet another subheading | | 0:05 | | | | ...... 2.2.1 A sub sub heading | | 0:05 | | | | . Do an inline thing | 0:20 | 0:05 | 0:15 | | | ...... 2.2.2 Another sub sub heading | | | | | | .5 Progress table | | | | | |----------------------------------------------------+--------+----------+-----------+---| | Total time [H:M]: | 1:35 | | | | #+END: #+BEGIN_SRC elisp (org-export-as 'my-progress-toc) #+END_SRC #+RESULTS: #+begin_example 1 Heading One .. 1.1 A sub heading .. 1.2 Another sub heading .. 1.3 Heading with no inline tasks ..... 1.3.1 a 2 Heading Two .. 2.1 Sub heading that will show up in the table ..... 2.1.1 Will this one? .. 2.2 Yet another subheading ..... 2.2.1 A sub sub heading ..... 2.2.2 Another sub sub heading 3 Heading Three of main doc .. 3.1 An included sub heading .. 3.2 Yet another included subheading ..... 3.2.1 An included sub sub heading 4 Heading Four 5 Progress table #+end_example