miércoles, 18 de marzo de 2015

Corgfiguring

Org is a beast, you probably already know it, whether you use it or not.

I've been using it on and off for a few years (at least 5), but never settling with it. Now it seems it's changing. But I digress.

Something that in the beginning was disturbing me was the many many ways you had to configure its behaviour. there were these #+FOO BAR , and these :PROPERTIES:,  but you never knew which one to use, and in fact, I didn't even try to remember them.

But there's an absolutely coherent logic behind it. I'll try to explain.

If you use org as a way to manage your life, you can store different info in different files. One for calendar related things (that come from google calendar, or some rss feed), captures, captures from your browser, or from different areas of your life (work, home, fun).  Some of them could live in the same file, but you can decide to use different files (One of my biggest questions to date is what should be a file, a heading, or a tag).

So it makes sense to be able to have global configurations for everything.  For example org-startup-folded . this variable defines in which folding state will be your org files opened.

BUT!  There might be a file, which you want different settings.

     #+STARTUP: overview
     #+STARTUP: content
     #+STARTUP: showall
     #+STARTUP: showeverything

Put one of those in the beginning of your file, and this option will override the global variable.

AND! You may want one of the trees/subtrees in that file to be ruled by a different rule.  Then is when you put a property in that given subtree.  In this case, the property is called "VISIBILITY", and the allowed values are folded, children, content, and all.

So after all, it makes sense that things can be configured at so many levels.

Usually, there's a global var and a file setting for most of the options. The subtree level one is not so common, but you get the idea already.