From: Myles English <mylesenglish@gmail.com>
To: Emacs Org mode <emacs-orgmode@gnu.org>
Subject: Re: Remaining work/progress report: nearly useful, help needed
Date: Sat, 13 Oct 2012 02:48:10 +0100 [thread overview]
Message-ID: <877gqvjg6d.fsf@ed.ac.uk> (raw)
In-Reply-To: <878vbbk6ph.fsf@ed.ac.uk>
[-- Attachment #1: my-progress.el --]
[-- Type: application/emacs-lisp, Size: 13816 bytes --]
[-- Attachment #2: Type: text/plain, Size: 4171 bytes --]
I have a solution that does everything I need apart from exclude DONE
items from the CLOCKSUM property. Writing it here for posterity.
I get a table like this (Note: the "0:08" is from a DONE task that is
excluded from the table and the other property columns):
#+BEGIN: columnview-toc :id file:a.org
| ITEM | Effort | CLOCKSUM | Remaining | |
|----------------------------------------------------+--------+----------+-----------+---|
| .1 Heading One | 3:28 | 1:13 | 2:23 | |
| ... 1.1 First heading | | | | |
| ... 1.2 A sub heading | | 0:08 | | |
| ... 1.3 Another sub heading | | 1:05 | | |
| . Write this bit | 1:20 | 0:50 | 0:30 | |
| . Do something | 1:23 | 0:05 | 1:18 | |
| . This bit too | 0:45 | 0:10 | 0:35 | |
| ... 1.4 Heading with no inline tasks | | | | |
| ...... 1.4.1 a | | | | |
| .2 Heading Two | 0:40 | 0:12 | 0:33 | |
| . Finish writing under heading two | | | | |
| ... 2.1 Sub heading that will show up in the table | 0:20 | 0:05 | 0:14 | |
| ...... 2.1.1 Will this one? | 0:20 | 0:05 | 0:14 | |
| . Test | 0:20 | 0:05 | 0:14 | |
| ... 2.2 Yet another subheading | 0:20 | 0:07 | 0:19 | |
| ...... 2.2.1 A sub sub heading | | 0:07 | | |
| . Do an inline thing | 0:20 | 0:07 | 0:19 | |
| ...... 2.2.2 Another sub sub heading | | | | |
| .3 Heading Three of main doc | 2:28 | 1:00 | 0:30 | |
| ... 3.1 An included sub heading | | | | |
| ... 3.2 Yet another included subheading | 2:28 | 1:00 | 0:30 | |
| ...... 3.2.1 An included sub sub heading | | 1:00 | | |
| . Yet More Do an included inline thing | 1:30 | 1:00 | 0:30 | |
| .4 Heading Four | | 0:06 | | |
| . Finish writing under included heading two | | | | |
| . Somethingorother | 0:58 | 0:06 | | |
| .5 Progress table | | | | |
|----------------------------------------------------+--------+----------+-----------+---|
| Total time [H:M]: | 6:36 | | 3:26 | |
#+END:
By using the attached library (my-progress.el), having these columns
defined:
#+COLUMNS: %5ITEM %5Effort{:} %5CLOCKSUM %5Remaining{:}
and using this config:
;; ----------------------------- BEGIN my-progress.el --------
(add-to-list 'load-path "~/lib/lisp")
(require 'my-progress)
(add-to-list 'org-export-filter-final-output-functions
'my-progress-remove-toc-heading)
(add-to-list 'org-properties-postprocess-alist
'("Remaining" lambda(value)
(let ((clocksum (org-duration-string-to-minutes
(my-get-clock-sum)))
(effort (org-duration-string-to-minutes
(org-entry-get (point) "Effort"))))
(org-minutes-to-hh:mm-string (- effort clocksum)))))
(add-hook 'org-clock-in-prepare-hook
'my-progress-org-mode-ask-effort 'append)
(add-hook 'org-clock-out-hook
(lambda ()
(org-set-property my-progress-remaining-property 0))
'append)
(add-hook 'org-after-todo-state-change-hook
'my-progress-rename-properties)
;; ----------------------------- END my-progress.el ----------
Myles
next prev parent reply other threads:[~2012-10-13 1:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-10 13:49 Remaining work/progress report: nearly useful, help needed Myles English
2012-10-11 12:01 ` Myles English
2012-10-12 16:15 ` Myles English
2012-10-13 1:48 ` Myles English [this message]
2012-12-22 17:29 ` Bastien
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877gqvjg6d.fsf@ed.ac.uk \
--to=mylesenglish@gmail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).