Re: [O] Testers / Feedback wanted: Gantt charts via org-gantt.el

2015-06-20 Thread Bernhard Schmitz

Hi Karl, hi Eric,

I know it has been a while. I think every suggestion has been implemented by 
now, except for linking independent headlines.
I wanted to ask for your input again, as I'm still not sure how to handle this, 
and both of your suggestions seemed to fall into the same category for me.

* Eric S Fraga  wrote:
>
> The only comments I have at the moment is that it is missing support for
> milestones and all of my GANTT charts have such and that I would like to
> be able to link tasks across headlines (i.e. groups).  Can I suggest a
>:milestone: tag or MILESTONE property for the former and a LINKED-TO or
> similar for the latter?

Should this link only be a graphical link, or should the start time of the 
second headline be determined by the end time of the first (as it is done with 
ordered headlines)? Or can what you have in mind be expressed by org-depend 
(see below)?

Karl:

> Oh, I was too lazy to write a working example.
> 
> ,[ working example ]
> | ** DONE My pretty task
> | CLOSED: [2015-04-30 Thu 07:50] SCHEDULED: <2015-04-30 Thu>
> | :PROPERTIES:
> | :CREATED:  [2015-04-17 Fri 15:36]
> | :ID:   2015-04-17-Dach-zu
> | :TRIGGER:  foo1(NEXT) bar1(WAITING)
> | :BLOCKER:  previousXY prevZ
> | :END:
> `
> 
> So when this task got marked as DONE, the headings with the ID
> propertes "previousXY" and "prevZ" must not have been in an open
> state. Further more, the headings with ID "foo1" got the new states
> NEXT and "bar1" WAITING accordingly.

Your example clarified the effects of org-depend on the actual org file, but 
I'm not sure how this should translate to the gantt chart.
The :BLOCKER: property says that when this gets marked as done, the blockers 
must not be open. So actually, the :BLOCKER: property has no effect on either 
the start time, nor on the end time of a headline. It only clarifies the 
earliest possible end time - which cannot be expressed in a gantt chart.
Similarly, the :TRIGGER: property does not define a start or an end time of the 
triggered property either. The only case in which it does is if it triggers a 
(DONE), which would mean that an unrelated task suddenly becomes done simply by 
another task being done, and I don't think that happens all too often.

I now know that I can implement whatever you suggest with relatively little 
effort, but first I need to know what actually should happen.

Regards,
Bernhard






Re: [O] Testers / Feedback wanted: Gantt charts via org-gantt.el

2015-06-05 Thread Bernhard Schmitz
OK, small update:

- Milestones are implemented. All headlines with tags that are in 
:milestone-tag (org-gantt-default-milestone-tag, resp.; :milestone: by default) 
are marked as Milestones.

- tag highlighting is working correctly. The alists :tags-bar-style and 
:tags-group-style ("tag" . "style") set the styles, :tag-style-effect sets 
whether this style is applied only to the headline with that style, or to all 
its subheadlines ('subheadlines). (All options are available as 
org-gantt-default... as well).

- tag inclusion/exclusion is working correctly. If :use-tags is non-nil, only 
headlines with at least one of the given tags (and its subheadlines) will be 
used. If :ignore-tags is non-nil, headlines with one of the given tags (and its 
subheadlines) will be ignored.

- I have added an option :tikz-options . If this is non-nill, the entire chart 
will be placed inside a tikzpicture environment with the given parameters. E.g. 
scaling is possible with :tikz-options "scale=0.5, every 
node/.style={scale=0.5}". This seems to work fine, so the lowlevel-scale option 
has been removed.

Regards,
Bernhard 

> -Ursprüngliche Nachricht-
> Von: emacs-orgmode-bounces+bernhard.schmitz=vis.uni-stuttgart...@gnu.org
> [mailto:emacs-orgmode-bounces+bernhard.schmitz=vis.uni-
> stuttgart...@gnu.org] Im Auftrag von Karl Voit
> Gesendet: Mittwoch, 3. Juni 2015 17:17
> An: emacs-orgmode@gnu.org
> Betreff: Re: [O] Testers / Feedback wanted: Gantt charts via org-gantt.el
> 
> * Eric S Fraga  wrote:
> >
> > The only comments I have at the moment is that it is missing support for
> > milestones and all of my GANTT charts have such and that I would like to
> > be able to link tasks across headlines (i.e. groups).  Can I suggest a
> >:milestone: tag or MILESTONE property for the former and a LINKED-TO or
> > similar for the latter?
> 
> How about a heading task who got only DEADLINE (no SCHEDULED) and
> does not span more than 1 day? This seems to be a mile-stone to me.
> 
> (Or *additionally* this tag?)
> 
> --
> mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML to Org-mode:
>> get Memacs from https://github.com/novoid/Memacs <
> 
> https://github.com/novoid/extract_pdf_annotations_to_orgmode + more on
> github
> 




Re: [O] Testers / Feedback wanted: Gantt charts via org-gantt.el

2015-06-02 Thread Bernhard Schmitz
> 
> > I have added an option :lowlevel-scale (e.g. 0.5 or 0.75) that will scale 
> > the
> complete resulting chart.
> > You can of course also use the pgfgantt options (:options) x unit chart and 
> > y unit
> chart for more specific scaling.
> 
> Lowlevel-scale doesn’t seem to have an effect, adjusting y units may prove 
> more
> useful.

Hmm, this seemed to work fine, but I now notice it does not really do what I 
intended.
I'll have to look at it again.

> > Unfortunately, if you have sub-day effort estimates, this will currently 
> > not be
> displayed correctly, as the start and end shift is computed based on days. I 
> should
> probably look into that.
> > Supporting weeks is difficult, as pgf-gantt does not natively support them 
> > for
> compression, only for title calendar.
> 
> This is probably something that should be addressed in pgfgantt.
> A flight to Alpha Centauri takes about 1600 days.[1]
> If you assume 5 mm per day that would still need 8 m of wallpaper (and a 
> larger
> office).
> I probably wouldn’t care about sub-day efforts in this case.
> Emptying the litter box will be a checkpoint item, not a scheduled task.

This was just a warning about the current state. Correctly computing the offset 
for compressed calendars (so that the offset displays the day) should not be 
difficult.

> 
> >> I'm not sure about inheritance:
> >> If I have a deadline for a task, should the subtasks inherit that deadline 
> >> unless
> an
> >> explicit deadline is given?
> >> If I have a deadline for a task and efforts for all subtasks, should the 
> >> task
> inherit
> >> that effort?
> >>
> >> That way I can give a deadline to the task and estimate efforts to get an 
> >> initial
> >> chart.
> >> Using this chart I can divide the subtasks between workers, rearrange the
> >> deadlines for the subtasks and finally define a scheduled date for the main
> task.
> >
> > This works for ordered subheadlines. Deadlines are propagated downwards, if
> the subheadlines are ordered.
> > If the subheadlines are not ordered, deadlines are only propagated upwards, 
> > as
> it is not clear which task(s) should inherit the deadline.
> > So you can set a deadline to the (last) subtask, and it will be propagated 
> > to its
> super task.
> 
> The last (as in time, not position in file) deadline will be promoted to the 
> super
> task, right?
> That way I can keep an „Integration of Submodules“ task and deadline that.

Yes, the last deadline (and the first schedule) of any task is promoted to the 
super task, if the supertask does not have a deadline/schedule itself. But I 
don't understand why you would need an Integration task with a deadline, you 
can just deadline the supertask itself.

> >> This gives me another idea:
> >> Filter / color by tag.
> >> Print only tasks tagged :Axel: to show my workload, and print tasks tagged
> >> :Sam_One: to show tasks I have delegated.
> > Isn't this already doable by using sparse trees?
> 
> Can I build a gantt chart from a sparse tree?
> The sparse tree shows me what is assigned to whom.
> What I want to see is the effort and the time the effort is scheduled.
> 
> This is probably too much to ask since org is more personal manager and not a
> project planer.

The comment about sparse trees was not quite well thought out from my side. I 
will have to look at it again.
There are now some options for tags (:use-tags :ignore-tags :tags-bar-style and 
:tags-group-style) that does all of this, but tags are not yet correctly 
promoted to subheadlines, so it does not really work correctly, atm.
You can use :tags-bar-style and :tags-group-style, which is an alist of 
("tagname" . "style") conses, that styles headlines with tags for groups and 
bars. The current ganttexperiment.org has an example.
I will probably not be able to work on this any further until the end of the 
week.

Regards,
Bernhard


Re: [O] Testers / Feedback wanted: Gantt charts via org-gantt.el

2015-06-02 Thread Bernhard Schmitz
Hi,

> Von: Karl Voit [mailto:devn...@karl-voit.at]
> 
> And accomplishing this, I personally would like to see that your
> method takes org-depend into consideration. Namely the properties
> BLOCKER and TRIGGER:(NEXT|TODO|STARTED). I plan my projects using
> mostly BLOCKER and TRIGGER:NEXT to express dependencies.

This should be possible (might take a while, and no promises), at least for 
those simple dependencies. More complicated things expressed via org-depend 
would require some serious effort.
I don't understand the TRIGGER:(NEXT) syntax, though. According to the 
org-depend documentation TRIGGER: requires an id or a chain-siblings string.
So if you can describe a consistent way that org-gantt should handle 
org-depend, then I might implement it (again, no promises), but as I have never 
used org-depend I don't know if whatever I could come up with would make sense.

Regards,
Bernhard



Re: [O] Testers / Feedback wanted: Gantt charts via org-gantt.el

2015-06-01 Thread Bernhard Schmitz
Hi Axel,

thanks for your feedback

> I tried org-gantt on a current project and ran into one problem:
> 
> I track progress with
> * Task [%]
> and
> * Task [/]
> 
> Of course the % causes a problem when exporting to LaTeX.
> I suggest to either ignore [%] and [/] or use them as an alternative to show 
> how
> much is completed.
> It is probably a better metric than hours worked.

I do not quite understand: Is this an org mode feature (I could not find any 
documentation - you can possibly tell I haven't been using or mode for too 
long), or is this just something that you do yourself?
While I agree that it would be a good idea to use those numbers, I'm a bit wary 
of implementing something that is not based on official org mode features.
As a preliminary measure, I now ignore % signs.

> pgfgantt doesn't handle \ganttbar commands without start and end date.
> Therefor I can't export an incomplete chart.
> You may want to set the entries with missing scheduling information to the 
> first
> day of the chart.
> (Maybe mark the task or label with a color to indicate that they are 
> incomplete.)
> (See below for some different ideas.)

I fixed this. You can now set :incomplete-date-headlines and :no-date-headlines 
to keep, inactive or ignore.
If inactive, the styles set via :inactive-bar-style and :inactive-group-style 
are used.
All options also have an org-gantt-default... defcustom, which can be set if 
you don't want to set it for each chart.
 
> A two month chart doesn't fit into \textwidth.
> I wrapped it into a sideways environment (provided by rotating.sty), maybe a
> sideways option?

Hmm, I don't see an advantage of having a sideways option vs. wrapping it 
manually, but perhaps I'm missing something?
I have added an option :lowlevel-scale (e.g. 0.5 or 0.75) that will scale the 
complete resulting chart.
You can of course also use the pgfgantt options (:options) x unit chart and y 
unit chart for more specific scaling.

> For a project with 2000 person hours[1] I'll probably need a separate export 
> and
> print it on A0 paper[2].
> Some kind of scaling would be fine (show weeks / month instead of days).

You can already set :title-calendar to "year, month[=name]" and add "compress 
calendar" to the :options list to use months instead of days.
Note that you should set :weekend-style and :workday-style to the same thing, 
as org-gantt will otherwise mark some months as weekends.
Unfortunately, if you have sub-day effort estimates, this will currently not be 
displayed correctly, as the start and end shift is computed based on days. I 
should probably look into that.
Supporting weeks is difficult, as pgf-gantt does not natively support them for 
compression, only for titlecalendar. 

 
> For a huge project it may be nice to limit the levels printed:
> Just Module 1 - 8 for the Management and each Module with the submodules for
> the project leader.
> Similar to maxlevel in the clocktable.

I added an option :maxlevel (and org-gantt-default-maxlevel)

> I'm not sure about inheritance:
> If I have a deadline for a task, should the subtasks inherit that deadline 
> unless an
> explicit deadline is given?
> If I have a deadline for a task and efforts for all subtasks, should the task 
> inherit
> that effort?
> 
> That way I can give a deadline to the task and estimate efforts to get an 
> initial
> chart.
> Using this chart I can divide the subtasks between workers, rearrange the
> deadlines for the subtasks and finally define a scheduled date for the main 
> task.

This works for ordered subheadlines. Deadlines are propagated downwards, if the 
subheadlines are ordered.
If the subheadlines are not ordered, deadlines are only propagated upwards, as 
it is not clear which task(s) should inherit the deadline.
So you can set a deadline to the (last) subtask, and it will be propagated to 
its supertask.

> This gives me another idea:
> Filter / color by tag.
> Print only tasks tagged :Axel: to show my workload, and print tasks tagged
> :Sam_One: to show tasks I have delegated.
Isn't this already doable by using sparse trees? Or would this involve some 
unnecessary hassle? I'm not an experienced enough org user to determine that, 
but I don't want to replicate functionality that already exists.

> Color tasks by tags to show who is assigned, white for unassigned tasks.
 Noted for future support.

Regards,
Bernhard



[O] Testers / Feedback wanted: Gantt charts via org-gantt.el

2015-05-30 Thread Bernhard Schmitz
Hi,

my org-gantt.el is now in a usable state. It creates gantt charts via pgfgantt 
directly from headlines in org mode, using deadlines, schedules, effort 
estimates and (optionally) clocked time.
In contrast to ox-taskjuggler it does not require an external program, and in 
contrast to Eric Fraga's gantt chart creation it reads from the headlines 
instead of a specific table. Something like this has been discussed on this 
list, but I couldn't find that anyone has actually implemented it. 

For some examples, take a look at the charts in the manual:
https://github.com/HeyFlash/emacs-stuff/blob/master/experiments/org-gantt-manual.pdf
Source:
https://github.com/HeyFlash/emacs-stuff/blob/master/experiments/org-gantt-manual.org

As I think this might be useful for others I wanted to make it available. I 
would be happy about feedback. 

The file itself can be found here:
https://github.com/HeyFlash/emacs-stuff/blob/master/experiments/org-gantt.el

Regards,
Bernhard


Re: [O] org-mode, tikz and beamer

2015-05-22 Thread Bernhard Schmitz
Hi  Cédric,

If I understand it correctly, you want to include a graphical representation of 
you headlines into you beamer file, created via tikz/pgf.
That sounds quite similar to what I'm doing at the moment, only I create gantt 
charts instead of mind maps.
As far as I can tell, the best possibility to do that inside of emacs, is to 
use custom dynamic blocks. 
http://orgmode.org/manual/Dynamic-blocks.html
Simply create your own org-dblock-write:... function that parses the file and 
creates the tikz output you want.
You can have a look at org-dblock-write:clocktable and 
org-dblock-write:columnview for inspiration.
I think using org-element-parse-buffer and org-element-map should get you what 
you need.

You can also have a look at my gantt chart creation here:
https://github.com/HeyFlash/emacs-stuff/tree/master/experiments
(One el file and one org file for testing)
You can probably ignore most of the file, as you don't need the complex time 
calculations I do.
Keep in mind that this is wip and I'm not an experienced elisp / org person, so 
if anyone has better suggestions, listen to them.

I will be without internet from later today until the middle of next week, so 
if you have any questions I will not be responding until then.

Regards,
Bernhard

> -Ursprüngliche Nachricht-
> Von: cédric ody [mailto:cedric.lis...@gmail.com]
> Gesendet: Donnerstag, 21. Mai 2015 16:41
> An: emacs-orgmode@gnu.org
> Betreff: [O] org-mode, tikz and beamer
> 
> Dear org-mode users,
> 
> I have used org-mode for some months now. I find it very useful. I
> have recently used it to prepare mathematic teaching lessons using the
> beamer exporter.
> 
> I wanted to combine org-mode and tikz latex's package from latex In
> order to insert some kind of mind-mapping from the headlines between
> the main parts of the lesson. I enclose an example so that you can see
> what I am talking about. Note that you can move forth and back through
> the presentation with hyperlinks. Note also only the chapter "Droites
> dans le plan" is filled so most of links fail.
> 
> I have done that from a single org-mode file using shell scripting
> calling org-mode and emacs in a batch mode way.
> 
> Before improving my shell script, I would like to know if there is a
> proper way to handle that within org-mode in lisp language. I have no
> idea about how to do that but someone may know if it is possible or
> not, and may give me hints to follow so that I could have a try.
> 
> Thanks,
> 
> Cédric Ody


[O] Exporting custom dynamic blocks

2015-05-20 Thread Bernhard Schmitz
Hi,

What is the canonical way of exporting custom dynamic blocks? Is there a 
mechanism similar to org-dblock-write: only for exporting dblocks? I cannot 
find any documentation on this.

To give a little background to my question: I am currently writing a conversion 
from deadlines/schedules/effort to pgf-gantt charts. This was discussed before 
on this list, but I couldn't find anyone actually implementing it.
Ideally I would like to create a custom dynamic block that contains the result 
of my parsing and computation, and then have a custom exporter for that dynamic 
block that creates the pgf-gantt code, so that I can later add exporters for 
other formats, e.g. html.

If there is no such mechanism, what is the best way of storing that pgf-gantt 
source code so that it gets integrated into latex export, but doesn't interfere 
with other exporters? Currently I'm simply writing the pgf-gantt code into the 
custom block, and this does get exported correctly to latex, but produces error 
boxes in html.

Regards,
Bernhard



[O] Exporting custom dynamic blocks

2015-05-19 Thread Bernhard Schmitz
Hi,

What is the canonical way of exporting custom dynamic blocks? Is there a 
mechanism similar to org-dblock-write: only for exporting dblocks? I cannot 
find any documentation on this.

To give a little background to my question: I am currently writing a conversion 
from deadlines/schedules/effort to pgf-gantt charts. This was discussed before 
on this list, but I couldn't find anyone actually implementing it. (In case 
someone wants to try: 
https://github.com/HeyFlash/emacs-stuff/blob/master/experiments/org-gantt-experiment.el
 )
Ideally I would like to create a custom dynamic block that contains the result 
of my parsing and computation, and then have a custom exporter for that dynamic 
block that creates the pgf-gantt code, so that I can later add exporters for 
other formats, e.g. html.

If there is no such mechanism, what is the best way of storing that pgf-gantt 
source code so that it gets integrated into latex export, but doesn't interfere 
with other exporters? Currently I'm simply writing the pgf-gantt code into the 
custom block, and this does get exported correctly to latex, but produces boxes 
with error messages in html.

Thank you & regards,
Bernhard