From: Myles English <mylesenglish@gmail.com>
To: Emacs Org mode <emacs-orgmode@gnu.org>
Subject: Remaining work/progress report: nearly useful, help needed
Date: Wed, 10 Oct 2012 14:49:22 +0100 [thread overview]
Message-ID: <87fw5mjv31.fsf@ed.ac.uk> (raw)
[-- Attachment #1: Type: text/plain, Size: 2682 bytes --]
Hi orgees,
In March I had a go at making a "Remaining work/progress report"[1].
Having make some progress, I am looking for:
- help,
- collaborators,
- opinions on whether this would be useful enough to be worth the
effort,
- whether anyone else has something like this (but better) and
- any other wisdom,
with a view to contributing it.
Table of Contents
_________________
1 Features
2 Usage
3 How it works
4 Improvements necessary to make it truly useful
1 Features
~~~~~~~~~~
Attachments: minimal.el my-progress.el a.org b.org
Currently it can make a table consisting of a mixture of the Table of
Contents (TOC) entries and the inline tasks within each section, e.g.:
ITEM Effort CLOCKSUM Remaining
------------------------------------------------------------
.1 Heading One 1:25
... 1.1 A sub heading 0:36
. Draw a figure 1:00 0:36 0:24
... 1.2 Another sub heading 0:49
. Write this bit 1:20 0:49 0:31
Most of the code was available from various places so there is not
much original work from me in this.
2 Usage
~~~~~~~
- start emacs: emacs -Q -l minimal.el a.org
- excute the emacs-lisp source blocks
- refresh the "Remaining" properties:
goto each property and press C-c s RET RET
- Execute the dynamic block C-c c in "Progress table"
3 How it works
~~~~~~~~~~~~~~
Whenever a task is clocked in to, the value of a new "Effort" property
is prompted for. When the task is clocked out of, a new property
"Remaining" is added that is the difference of Effort special property
CLOCKSUM.
The buffer is exported ascii-like to get the TOC with its headline
numbering, and is matched with corresponding lines of the captured
column view.
4 Improvements necessary to make it truly useful
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1. include a captured column view of the INCLUDEd file b.org: the file's
headings are included in the TOC because it uses the new exporter, but
not in the column-view. Maybe exporting as org first and then
taking the column view of that buffer would work.
2. Accumulate the time Remaining in the same way that CLOCKSUM does;
it propagates upwards to higher level headings so that you can see
(e.g.) how long Chapter 1 will take in total
3. Refresh all the Remaining properties automatically
I would really appreciate some help, particularly with 1.
Thanks,
Myles
Footnotes:
[1] http://comments.gmane.org/gmane.emacs.orgmode/53567
[-- Attachment #2: minimal.el --]
[-- Type: application/emacs-lisp, Size: 180 bytes --]
[-- Attachment #3: my-progress.el --]
[-- Type: application/emacs-lisp, Size: 10843 bytes --]
[-- Attachment #4: a.org --]
[-- Type: text/plain, Size: 4978 bytes --]
#+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
[-- Attachment #5: b.org --]
[-- Type: text/plain, Size: 450 bytes --]
* Heading Three of main doc
** An included sub heading
** Yet another included subheading
*** An included sub sub heading
And an inline task:
*************** TODO Yet More Do an included inline thing
CLOCK: [2012-10-10 Wed 12:42]--[2012-10-10 Wed 13:42] => 1:00
:PROPERTIES:
:Effort: 1:30
:Remaining: 0:30
:END:
*************** END
* Heading Four
*************** TODO Finish writing under included heading two
*************** END
next reply other threads:[~2012-10-10 13:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-10 13:49 Myles English [this message]
2012-10-11 12:01 ` Remaining work/progress report: nearly useful, help needed Myles English
2012-10-12 16:15 ` Myles English
2012-10-13 1:48 ` Myles English
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=87fw5mjv31.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).