Re: [O] How to represent this in Org-mode

2014-08-27 Thread Nicolas Richard
Hi Marcin,

Marcin Borkowski mb...@wmi.amu.edu.pl writes:
  How to represent such a partially ordered set in
 Org-mode?  One idea that comes to my mind is writing a normal outline
 (tree) with all the modules (possibly nested), and including links to
 all prerequisites in every such module.  Any other ideas?

I'm quite curious to know how you solved the problem, since I might try
to do something similar (but probably not with Org mode). Would you like
to share your solution ?

Thanks,

-- 
Nico.




Re: [O] How to represent this in Org-mode

2014-08-14 Thread Nicolas Richard
Marcin Borkowski mb...@wmi.amu.edu.pl writes:

 Hello,

 now that I learned how to use a hammer, everything looks like a nail.
 So I want to use Org-mode for this; my question is, did anyone do
 anything similar and has some suggestions how to structure this
 material?

I did not do it, but still have one suggestion.

Each module could come with a name (e.g. CUSTOM_ID) and you could add a
:PREREQ: property listing all the other modules that are
prerequisite of that one.

It might then take some lisp to convert the data into an actual
dependency graph. graphviz might also come in handy for this task : it
allows to draw directed graphs easily. see below, I ended up writing
some of that lisp.

Imagine an org file like this:
#+BEGIN_SRC org
  ,* Module A
  :PROPERTIES:
  :CUSTOM_ID: A
  :END:
  ,* Module B
  :PROPERTIES:
  :CUSTOM_ID: B
  :PREREQ:   A
  :END:
  ,* Module C
  :PROPERTIES:
  :CUSTOM_ID: C
  :PREREQ:   A
  :END:
  ,* Module D
  :PROPERTIES:
  :CUSTOM_ID: D
  :PREREQ:   A B
  :END:
#+END_SRC

It could be translated to an graphviz code like this one very easily :

#+BEGIN_SRC dot :file dot-example3.png
   digraph test123 {
   {A} - B;
   {A} - C;
   {A B} - D;
   }
#+END_SRC
which then compiles into a dependency graph. (note that {A}- B could
also be written as A - B, but an automated translation mechanism
doesn't need to do that)

Here's some more graphviz code (taken from the manpage IIRC, the
comments in french are mine) to see what it can do if you want more:

#+begin_src dot :file dot-example.png
  digraph test123 {
  // on peut faire un digraphe sans tête de flèches!
  edge [arrowhead=none];
  // créer des flèches
  a - b - c;
  // créer des flèches d'un noeud vers plusieurs
  a - {x y} [weight=10];
  // donner la forme d'un noeud
  b [shape=box];
  // donner un nom, une couleur, etc. à un noeud
  c [label=hello\nworld,color=blue,fontsize=24,
   fontname=Palatino-Italic,fontcolor=red,style=filled];
  // créer une flèche avec un label et un poids.
  // si on diminue le poids (4, 3, 2, 1, 0), la flèche se courbe.
  a - z [label=hi, weight=60];
  // label multiligne.
  x - z [label=multi-line\nlabel];
  // 
  edge [style=dashed,color=red,arrowhead=normal];
  {rank=same; b-x};
  }
#+end_src

Because I was curious, I wrote a few lines of elisp to do the
conversion:

;; call this one via M-x ...
(defun yf/org-dependencies ()
  (interactive)
  (with-output-to-temp-buffer (get-buffer-create *OrgFormatDeps*)
(princ digraph OrgDeps {\n)
(org-map-entries 'yf/org-format-dependency)
(princ })
(terpri)
(pop-to-buffer (current-buffer

;; this is a helper function
(defun yf/org-format-dependency ()
  (let ((id (org-entry-get (point) CUSTOM_ID))
(prereqs (org-entry-get-multivalued-property (point) PREREQ)))
(when (and id prereqs)
  (princ
   (concat  {
   (mapconcat 'identity prereqs  )
   } - 
   id
   ;))
  (terpri


-- 
Nico.



[O] How to represent this in Org-mode

2014-08-13 Thread Marcin Borkowski
Hello,

now that I learned how to use a hammer, everything looks like a nail.
So I want to use Org-mode for this; my question is, did anyone do
anything similar and has some suggestions how to structure this
material?

I'm going to prepare a course in mathematical analysis (together with
the former-Scrivener-user-friend, btw).  The course will be divided
into very small modules (one proof, for instance, will correspond to
*at least* one module, and often more).  We want to emphasize the
connections between the ideas behind the theorems, proofs and
calculation methods, so basically the whole material will be divided
into these modules and partially ordered by the relation ... has to be
studied before   How to represent such a partially ordered set in
Org-mode?  One idea that comes to my mind is writing a normal outline
(tree) with all the modules (possibly nested), and including links to
all prerequisites in every such module.  Any other ideas?

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University



Re: [O] How to represent this in Org-mode

2014-08-13 Thread Thorsten Jolitz
Marcin Borkowski mb...@wmi.amu.edu.pl writes:

Hello,

 now that I learned how to use a hammer, everything looks like a nail.
 So I want to use Org-mode for this; my question is, did anyone do
 anything similar and has some suggestions how to structure this
 material?

 I'm going to prepare a course in mathematical analysis (together with
 the former-Scrivener-user-friend, btw).  The course will be divided
 into very small modules (one proof, for instance, will correspond to
 *at least* one module, and often more).  We want to emphasize the
 connections between the ideas behind the theorems, proofs and
 calculation methods, so basically the whole material will be divided
 into these modules and partially ordered by the relation ... has to be
 studied before   How to represent such a partially ordered set in
 Org-mode?  One idea that comes to my mind is writing a normal outline
 (tree) with all the modules (possibly nested), and including links to
 all prerequisites in every such module.  Any other ideas?

Sounds for me like a typical taskjuggler project, and fortunately there
is ob-taskjuggler.el. See

,
| http://orgmode.org/worg/org-tutorials/org-taskjuggler.html. 
`

-- 
cheers,
Thorsten




Re: [O] How to represent this in Org-mode

2014-08-13 Thread Marcin Borkowski
Dnia 2014-08-13, o godz. 14:46:41
Pascal Fleury fle...@google.com napisał(a):

 Maybe this will help:
 http://orgmode.org/worg/org-contrib/org-depend.html
 
 --paf

Thanks, but not really.  My problem is not about /TODO/ dependencies -
I may as well actually /write/ the project in a totally different
order.  What I want to specify is the order of /studying/ that stuff,
which finally might be turned into links to the prerequisites in each
module or something like that.

Thanks anyway,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University



Re: [O] How to represent this in Org-mode

2014-08-13 Thread Marcin Borkowski
Dnia 2014-08-13, o godz. 16:53:15
Thorsten Jolitz tjol...@gmail.com napisał(a):

 Sounds for me like a typical taskjuggler project, and fortunately
 there is ob-taskjuggler.el. See

Do I get it correctly that taskjuggler is all about /TODO/
dependencies?  If yes, it seems to be a solution to a different
problem...

Thanks anyway

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University



Re: [O] How to represent this in Org-mode

2014-08-13 Thread John Kitchin
Marcin Borkowski mb...@wmi.amu.edu.pl writes:

Are you hoping to have some properties on headlines that define the
dependencies, and then export the org-file to some format that has these
dependencies as links to those sections?

I am teaching a course this fall and I am actually using org-mode as the
format of the notes (students will be reading them in Emacs). So, I will
just be putting links to org-files directly into them, and in places
where I want to remind them of previous material. I wrote up each
lecture in a separate file, and provide the order in a separate table
of contents file.

If you plan to export the org files, I would use org-id links in a
section at the top of each file that indicate which previous material
should be mastered. These should export as links in html or latex.

 Dnia 2014-08-13, o godz. 14:46:41
 Pascal Fleury fle...@google.com napisał(a):

 Maybe this will help:
 http://orgmode.org/worg/org-contrib/org-depend.html
 
 --paf

 Thanks, but not really.  My problem is not about /TODO/ dependencies -
 I may as well actually /write/ the project in a totally different
 order.  What I want to specify is the order of /studying/ that stuff,
 which finally might be turned into links to the prerequisites in each
 module or something like that.

 Thanks anyway,

-- 
---
John Kitchin
Professor
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
http://kitchingroup.cheme.cmu.edu