[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Orgmode] Automate the writing of proposals (by using dynamic blocks)
From: |
Sébastien Vauban |
Subject: |
[Orgmode] Automate the writing of proposals (by using dynamic blocks) |
Date: |
Wed, 08 Sep 2010 16:42:06 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) |
Hello,
I'm trying to automate the writing of proposals. Just a couple of tasks to
describe, to evaluate, and then put a price on the total amount. That's about
it.
Though, I have some problems making that dream a full reality yet, even if Org
already makes me go really far!
The following is an minimal example of what I try to achieve, and of the
different problems and questions related to it.
Thanks for helping.
--8<---------------cut here---------------start------------->8---
#+TITLE: Using columnview dynamic blocks
#+AUTHOR: Seb Vauban
#+DATE: 2010-09-08
#+LANGUAGE: en_US
* Context
** Current implementation
This is what I understood.
** Objectives
This is what should be done.
** Tasks to do
:PROPERTIES:
:COLUMNS: %40ITEM(Task) %6Effort(Estim.){+}
:Effort_ALL: 0.25 0.50 1.00 1.50 2.00 3.00 4.00 5.00 7.00 10.00
:ID: ddfb9674-ce79-4ecc-8699-da5af2c12f6b
:END:
*** Analyze the steps
:PROPERTIES:
:Effort: 0.25
:END:
*** Implement the full chain
:PROPERTIES:
:Effort: 1.50
:END:
*** Test the whole lot
:PROPERTIES:
:Effort: 3.00
:END:
* Proposal
** Work
Generated dynamic block:
#+BEGIN: columnview :hlines 2 :id "ddfb9674-ce79-4ecc-8699-da5af2c12f6b"
| Task | Estim. |
|------------------------------+--------|
| ** Tasks to do | 4.75 |
| *** Analyze the steps | 0.25 |
| *** Implement the full chain | 1.50 |
| *** Test the whole lot | 3.00 |
#+END:
Though, I would like to get it more like this:
#+TBLNAME: prestations
| | \textbf{Task} | \textbf{Description} | \textbf{p.j} |
|---+---------------+--------------------------+--------------|
| | Task 1 | Analyze the steps | 0.25 |
| | Task 2 | Implement the full chain | 1.50 |
| | Task 3 | Test the whole lot | 3.00 |
|---+---------------+--------------------------+--------------|
| # | | \textbf{Total} | 4.75 |
| ^ | | | total |
#+TBLFM: $total=vsum(@address@hidden);%.2f
Wait a minute! I did not say it must be exactly like that, but I would like,
for example, to get rid of the multiple stars, and have an =hline= separating
the total from the individual components of the sum.
** Finance
Then, from the above, we can compute the cost to write in the proposal, like:
| Total of prestations (in man days) | 4.75 | m.d |
| Daily rate | 400.00 | \EUR |
| Total price | 1900.00 | \EUR |
#+TBLFM: @1$2=remote(prestations,$total);%.2f::@address@hidden@2$2;%.2f
* Problems, comments and questions <<< <<< <<<
5 topics:
** Table column names in bold
I would like (my boss, to be honest) to see the headings of the table in bold.
Wait, this is minor, but I discovered something special when trying to do so.
I put =*= around the word =Task= in the =:COLUMNS:= specification of the tasks
subtree:
#+begin_src org
,:COLUMNS: %40ITEM(Task) %6Effort(Estim.){+}
#+end_src
That automatically inserts an extra =hline= above the table. Quite weird, but
OK.
#+BEGIN: columnview :hlines 2 :id "ddfb9674-ce79-4ecc-8699-da5af2c12f6b"
|------------------------------+--------|
| *Task* | Estim. |
|------------------------------+--------|
| ** Tasks to do | 4.75 |
| *** Analyze the steps | 0.25 |
| *** Implement the full chain | 1.50 |
| *** Test the whole lot | 3.00 |
#+END:
** Use two-decimal floats in cells
I needs amounts such as =0.25=, =0.50= and =1.50= as efforts.
*** Writing them in Effort\_ALL with 2 decimals
Writing the figures with 2 decimals in =Effort_ALL= has no impact on the
presentation in the table...
What you see in the table comes "verbatim" from the =Effort= property itself:
if you get there 2 decimals, then you'll have 2 decimals in the table output.
Though, having a 2-decimal in the property =Effort= gives troubles to the
table editor:
- Write =:Effort: 3.00=, then =S-right= that value: it begins back from
=0.25=...
- Write =:Effort: 3.0=, then =S-right= that value: it goes on to =4.0=.
*** Using formatting of decimals
Trying to declare how many decimals I want. For the sake of clarity, ask for
4 decimals:
#+begin_src org
,:COLUMNS: %40ITEM(Task) %6Effort(Estim.){+;%.4f}
#+end_src
It only works for the total, though... Not applied to the column itself.
#+BEGIN: columnview :hlines 2 :id "ddfb9674-ce79-4ecc-8699-da5af2c12f6b"
| Task | Estim. |
|------------------------------+--------|
| ** Tasks to do | 4.7500 |
| *** Analyze the steps | 0.25 |
| *** Implement the full chain | 1.50 |
| *** Test the whole lot | 3.0 |
#+END:
** Have an hline between individual tasks and total
To get something like this:
#+BEGIN: columnview :hlines HOW? :id "ddfb9674-ce79-4ecc-8699-da5af2c12f6b"
| Task | Estim. |
|------------------------------+--------|
| ** Tasks to do | 4.75 |
|------------------------------+--------|
| *** Analyze the steps | 0.25 |
| *** Implement the full chain | 1.50 |
| *** Test the whole lot | 3.00 |
#+END:
I guess the implementation must be changed, as neither 2 nor 3 are right
values for such a thing.
The definition says:
=:hlines=
When t, insert an hline after every line. When a number N, insert an hline
before each headline with level <= N.
Here, I would wanna change it to: "insert an hline before *and after* each
level N headline".
In fact, that would become clearer if the only distinction between the levels
was not limited to the number of stars before the name of the task.
The table I showed above is *not* the only way to make the difference between
totals and cells explicit. It's just an example...
** Get rid of stars?
Is there a way to get rid of the common amount of stars? I mean: if the top
headline is at level 3, get rid of 2 stars everywhere in the table.
** Use the total number of days?
As you see in my manual block, I give a name to the cell containing the total,
so that I can use that figure for computing how much the work will cost.
How can we do such a thing with the dynamic block?
--8<---------------cut here---------------end--------------->8---
Best regards,
Seb
--
Sébastien Vauban
- [Orgmode] Automate the writing of proposals (by using dynamic blocks),
Sébastien Vauban <=