Emacs Org-mode - a system for note-taking and project planning




Uploaded by GoogleTechTalks on 16.07.2008

Transcript:
>>
RAMAN: Thank you for coming everyone. I'm happy to introduce Carsten Dominik, the author
of Org-mode for Emacs. Org-mode actually means a lot of things to a lot of people. You can
use it as a very nice getting things done day planner/organizer, which is what a lot
of us on our internal Emacs users' lists have talked about it. Now Org-mode also has another
interesting aspect to it which is ease of authoring. Take it from me, I'm someone who's
authored markup LaTeX html by hand for the last 15 years. The last three years after
I discovered Org-mode, I've stopped writing html by hand. That should actually tell you
something. So, without taking any more of Carsten's time, so that we get the best of
his time here, I'll hand it over to you Carsten and take it away. Thank you.
>> DOMINIK: Yeah, thank you very much Raman for this nice introduction and I'm, of course,
very happy to be here and to introduce to you my Org-mode package and tell you the--a
few technical things about it and I'll also give a short introduction to the package itself.
I would like to start asking by are there any people are not Emacs users sitting here?
And are there any people who have not use Org-mode before and just--are just here to
find out about--okay that's actually very good, so. It will make sense to have a bit
introduction. Well, Emacs Org-mode is a package which I started writing in 2003, it's an open
sourced project which is also now part of Emacs. Since Emacs 22, it's part of Emacs,
and so distributed to [INDISTINCT] Emacs. So, there's a webpage here if you want to
get the latest version you can grab from this--from this site and find lots of other--other information.
But first of all, working with text files in the--in the 3rd millennium, do we still
do this? Why--well, does it still make sense to work with text files for example organizing
your stuff, for writing little things? And of course we are not all Raman who really
has a big advantage of using text files, but there are many other [INDISTINCT] but I still
think that text files are the only truly portable format for files so it can write things down
and read it anywhere, read it on a small device, read it on a big device, on any computer;
Linux, Windows, on a Macintosh, whatever. You can read it truly anywhere, that data
will never get lost. So, 20 years from now, you will still be able to read these files
which you wrote. You can, of course, use grep and other UNIX tools to process such files,
to search through them. Or you can use something like perl or python to just run through them,
extract information which you would like to have and do that. Another interesting thing
is that it's very easy to get a history if you use a version control system on these
text files, you can always go back, look at what the exact state of these files was in
an earlier time have very little diff--yeah, I'll put off the diff programs to exactly
see what has changed and when it has changed, things like this. And another thing which
I've only found out recently is that you can actually use version control system with text
files to do synchronization. So, I actually have my old files on a couple of different
computers at home and on my laptop and on my work computer, and I just use a git repository
to just push back and forth and pull to--in order to synchronize. So, for a small set
up, that actually really works well. Another reason to use these kind of files. Okay. The
idea for writing Org-mode started really from--from a moment when I decided I had to organize
my notes better, because I had been--I'm an astronomer, I work at a university, and I
sit in meetings all the time, I have to make notes and write things down. And so the idea
was--I wanted to organize my notes and I wanted to organize what I had to do. And one problem
was basically all the getting things done and [INDISTINCT] and similar tools around.
One form I see is that they really put a task, it's essential item of these programs. And
for me this is not necessarily the right approach because for me if I start a new project, if
I discuss with people, everything actually starts with notes. So you have brainstorming,
you make some notes, you put these notes into an outline [INDISTINCT] then you organize
them, and think about them over--think them over. And in this process, what happens is
that a tasks develop, so the task then, come to be. And I think it's the most natural thing
to actually--in your notes file, mark a line and say, "Well, this is actually a task, somebody
has to act on this. This is something that has to be done." And so the idea is to have
a notes file where note taking really is a fundamental action. So you write--in a text
file you write everything you think about, every--all ideas which you have, everything
you might want to do. And then you just mark in their place what you think is a task that
should done at some point. And so I really wanted to avoid separate tools for notes and
planning because I think it's stupid to go just back and forth between two programs just
do to these two basic tasks. The other thing is, of course, once you have done a task,
you actually have to make a note in your notes file to say, "Well, okay this is done. Let's
move on to the next thing." So it really makes you move back and forth, and I don't think
that's a useful way of dealing with things. That was the idea, to start Org-mode. Well,
I'm an Emacs user and--so most Emacs users really love to live in Emacs and really don't
want to leave it, so am I. So I decided--I wanted to start with Outline-Mode. Also, I
think, outlines are really great way to organize your thoughts because you can have categories
and then go to the small details in a very nice way. You can really organize your thoughts.
Outlines is a good representation of how humans think, I think, so that works really well.
However the Emacs Outline-Mode, I don't know if anyone of you has ever used it, I think
it's really broken. It's just a disaster. Technically, it works internally, so it has
actually a nice implementation. The old implementation was really bad, was just basically replacing
all the new lines with the--with the... >> [INDISTINCT]
>> DOMINIK: Yes. And the control r and then just hiding the text of the new implementation
internally [INDISTINCT] is much better, much easier to program. But there's two problems
with it. So this is one of those Emacs outlines. [INDISTINCT] see each outline note has one
star or two stars or three stars in front of it, and then you can just put some text
below all of these headings, that's--that's how it works. And this works reasonably well
if you write a book, so if each of these headlines is some section title also. But if you also
want to use this for--in a more list like approach, this is really much harder to read
that an ordinary outline where you have proper indentation. So the first thing that I tried
to change was making these outlines more readable in a way that we actually--we still actually
keep the stars here in order to mark things which are an outline note, but they are hidden
and they are just actually--they get a font which--a face which is invisible or almost
invisible in this case, you can still see the little shadow. And yes, so proper indentation
and now this outline actually is much more a normal outline, this structure. Okay, so
that looks better, you can do list with this, but the place where Outline-Mode really is
broken, is the user interface. So these are the commands which you use to operate Outline-Mode
and it's just a list of--I think, it's twelve commands. Each of these commands has two different--has
two keys which you have to press--the letters which have been chosen are pretty bad so I
never was able to remember what these commands are. And I just said it's really--I just thought
it's really ridiculous to be able--to have to remember all these commands only in order
to fold my outline. If you take another outline program like [INDISTINCT] for example, basically
all you do is really open and close a note, and then you can dig into this outline. That's
nice. It's also nice to have a command to really see everything [INDISTINCT] but that's
all you need. You don't need all these complicated other programs, other commands do this. And
so the next step that was happening while I was writing Org-mode was [INDISTINCT] compress
this entire outline functionality into one or maybe two commands. And the process of
which you use now to dig into an outline I call "cycling"--visibility cycling. So there's
really only two actions. One is cycle the visibility of a subtree and then there's another
command, cycle the visibility of the global outline, really, everything. And so if you
now look at it, it'll--outline here, this is basically--the outline is totally folded
down now to the top level headings, and now we use these keys in order to cycle tools,
so I'm going to press three times tab and then I'm going to press three times shift
tab to just cycle [INDISTINCT] so this is the first one. If you have--the [INDISTINCT]
on this first headline. So, with one tab, you get just the direct children of this--of
this [INDISTINCT] and if you want, you can now move the cursor down here and dig deeper,
or you can stay on that headline and press that same key again, and then you just get
the entire subtree folded open, [INDISTINCT] all the text and--below it. That's it. You
press it a third time and you are back to the folded state. So it's really on top of--it's
very fast, you just [INDISTINCT] if you use the global cycling, one of the first step
actually gets you to something which looks like a table of contents. So it shows you
all the headings but all the text below any headings is hidden. And then the next time
you press it, you just see the entire file, everything is shown. And the third time, you
just go back to this initial thing. It's really all you need, and it makes it much easier
to [INDISTINCT] to remember these commands, and so I think that already helps a lot. The
next thing which is important, if you use an outline to organize your though, is that
you need to be able to restructure it because an outline starts as a brainstorming process.
You just sit down, you [INDISTINCT] everything you can think of into that outline and in
the end you will want to organize it in a--to sort of--it makes more sense that you can
derive the actions from this. So you need to evenly--easily--to be able to do this.
And then Org-mode you do this by just holding down the Meta or Meta and shift keys and then
you just use the cursor keys. So, if you press up then the entry is moving up, it's going
to be swapped with the entry above it, with the sibling above it. If you move it--move
it down, it will move down, and you can promote and demote. And that's simpler than any outline
program I know, in order to restructure these things. And that's basically already the setup
which you need for a note taking application. And then there's lots of little tiny helpful
things inside Org-mode which makes it really easy to write notes. So, one thing of course,
it improves greatly the standard text- and outline-modes. I don't use text-mode anymore.
Org-mode is my fundamental mode, my standard mode, so any file which doesn't have a specified
mode will be an Org-mode, just because it's a nice and easy text-mode. There's support
for editing unordered and ordered lists, so not outline notes but just internally you
can have a list with numbers, you can read it easily, edit them. There's a big part which
is hyperlinks, so can link inside the document for one headline to the next or something
like this. And you can also link internally, so for example, if you are working in an email
or in an [INDISTINCT] in gnus, you can easily create a link to that message and put it into
your Org file which will be a clickable link. If you click it, you are taken back into gnus
to exactly use that message. And it works for all the Emacs mail programs I know of.
It works for the Big Brother's Database, for gnus, links to files, webpages, to ERC, unix
man pages, info pages, and it's extensibles. So, if you have anything else you would like
to link to, that's easily done. For external--so, for html for example, it will fire up your
browser and to make you look at it, the file. Then there is a plain-text table editor and
spreadsheet, I'm going to say a little bit more about this. This is sort of my favorite
tag in the whole program. I had the most fun writing this. Another interesting thing which
I'm not sure how much that it's interesting for people but it is for where I come from,
I come from a university, we have to write lots of scientific texts with lots of formula,
and creations and everything. And so note taking with the computer is really a pain
unless you can use something like LaTeX which is a type setting system that is used by many
mathematical and--other scientific journals. And Org-mode actually makes it very easy to
write LaTeX, actually in a very sloppy way. You don't have to put in all the math markers,
you can basically very easily just write little snippets, you just write [INDISTINCT] in order
to mean the Greek letter alpha and everything, that's an easy way to type. And then you can
transform this later to PDF file and print your notes in a nice and pretty way. So, that's--that's
what you need for note taking application and that's what Org-mode gives you.
>> RAMAN: So for the record, table-mode was what finally made me switch from writing HTML
by hand to using Org-mode. >> DOMINIK: Yes. Tables--writing tables by--in
HTML is a--is a mess. By the way, [INDISTINCT] any question, any time. I mean, I don't need
to go through this talk without questions. We can have the questions during the talk.
Okay, and then the--then the next step is what I hinted to earlier. Now you are in your
notes files, you have written down note, you have started to organize it. Now you can identify
task--tasks and then happens by over laying Meta data over this outline. So, here's just
a section from a buffer where I have put in all the possibilities for Meta data in this.
So, the first one is what we call the TODO keyword, it's just a keyword, the first keyword
in a headline. And in a normal task--in a normal GTD application, this would be basically
a checkbox. You can check it off once it's done. In Org-mode, it's actually a little
word and that means you can have multiple states. So, many people, you only use TODO
or done so that's a checkbox on off but again also [INDISTINCT] states for example, you
can say waiting and that will indicate that you are waiting for the reply from somebody
else before you can continue working on it. It means you have already started working
on it but now you are waiting. Or you can say cancel, that means you haven't done this
but you don't actually want to do it, you just cancel it. So, this is a single word
which can have one of many states, and you are completely free to define what kind of
states you want to use here. The next one is a priority cookie--I actually never use
this myself, I never really understood the purpose of priorities but since everybody
wants priorities I put it in. But I actually never use it myself because and--I think you
spend more time assigning priorities than it's really worth--worthwhile, the sorting
you get from it. Okay, the next one is tag text so at [INDISTINCT] at the end of [INDISTINCT]
line, you get a number of strings separated by colons and you are completely fine to define
what this means. So if you are working in a GTD environment this might be context, for
example, at computer, at phone, at home, the usual GTD context. But you can also use names
or, yeah, I've used fry--buy--something I want to buy and I want to buy that fries,
so I put it here, and this is something for work, so you can just put a number of tags
and it's later useful to find these things back. Then you can have time planning information
and that's asked by a little keyword. Anywhere in this entry, you are free to put it wherever
you want, usually it's the first line after that headline. And so, there you can have
DEADLINE that means you define the deadline, you can have SCHEDULE that means you want
to work on this on a certain date, it can be CLOSE and it will indicate when this actually
was finished, this item. So next, it is a time stamp, here just a time indication or
of the date. And then we have PROPERTIES, which is just a little drawer which starts
with the word PROPERTIES and ends with END, and in between you can have keyword, [INDISTINCT]
pairs as many as you want, freely defined. The Meta Data in a--it--remember that we are
working in an outline. So, this is a Hierarchical Document and that means it makes sense to
talk about Meta Data in a hierarchical way, and Org-mode [INDISTINCT] in two ways. So,
there's downward propagation and that's just a different word for inheritance. So if you
assign a tag to some outline level, then all the children can inherit this tag. You can
also configure it to not do so but by [INDISTINCT] it will--all the children will inherit the
tag. And also the same works with properties, properties can also be inherited down into
a tag. And there is also upward propagation for properties, so you can have properties
being the sum of all the children's values of the same property. In order to set Meta
data and to edit it and to change it, Org has a--Org-mode has a couple of special interfaces
which are designed to be really fast, so, that you can do with very few keys, you can
actually change all this Meta data. There's a couple of these interfaces. I'm mentioning
a few here. There's actually a few more that what is--for example, there's a one key per
tag interface. So if you--if you switch on the tag interface you can toggle [INDISTINCT]
with a single key per tag. So, that goes really fast. There's of course completion, Emacs
would not be Emacs without completions, so whenever it's useful to complete [INDISTINCT]
that you complete. For example, I you type a tag name, it will give you completion on
all the tags in file and in any other circumstances as well. There's also a date--date/time reading
function and I would like to challenge you to show me one way you can actually enter
faster a date or a time. This is really I think the fastest and easiest way to specify
a date and a time, what we have implemented here in Org-mode. And then we have a column
view which is a fast tabular way to--in order to edit Meta data. So, just to show you the
data/time interface, what happens whenever you have to enter a date and time, there's
a little calendar which you--which is put up that you can click but you can also very
easily use the keyboard, control this calendar, and just jump to a different date. And you
can type something like this here which is +2Sun 2pm and that means two Sundays from
now at 2 PM. So, it's just a very short way, if you're a fast typer and then you get the
state, insert it. And that you can use for setting deadlines and for scheduling items
and things like this. And here's the other interface I wanted to show, that's the column
view, so you have an outline with a top level and then top level things, which are a couple
of to do items and below these items, you may have property drawers. You don't see them
right now, they are hidden, but they may be there. And if you want to edit many of these
properties in an organized way, then you just switch to column view and that gives you a
little table of--but you see the outline structure of this entire file but then as table columns
you get all these different properties, like the text or the TODO state priority and these
are properties which are define further down. You can then easily edit them from this view.
So, if you, for example, have used only outliner I think that's like the column view and on
the outliner, it's a similar concept. And you can also then see numbers which aren't
being edit up here, it also works in the column view. Okay, these are the special interfaces.
Well, then the next step is--one important part if you try to organize the tasks which
you have to do, is that you have an easy way to capture, that's a very important part of--part
of getting things done of--anyway of planning, that you have an easy way to capture. You
get a phone call, somebody [INDISTINCT] walks into your office and shows an idea [INDISTINCT]
it just pops to your head. You have a fast idea, you want to write it down so that you
don't loose it, but you also don't want to be interrupted. It's an--a very important
part. And for this we use the remember package by John Wiegley which is designed exactly
for this, so it will pop you into a buffer where you can make a note and file it away
and put you back into the original environment. So, that's a very nice tool by--which John
has written and which we just use. They extended it a little bit because you can actually define
a couple of templates so for--for different kinds of notes, for a task--for a task which
has to do with an email, for a journal entry, just set up a couple of templates which make
it--makes things easier. And the templates can define like a--that it should be a TODO
keyword or what kind of a state it should have. It can contain an automatic link. So,
if for example, if you make or create a task from a certain source file--source code file
[INDISTINCT] and then this little buffer can contain a link to that location and the source
code files. If you, for example, notice a [INDISTINCT] which you can't work on now,
you just make a link, that you will go back to this and work on it later. And that the
template also defines a target location. So, unlike in the original, remember, where everything
goes to a single file, you can actually select a couple of files, or a couple of locations
in your Org files, where you would like to put the note which you get. So let--let's
just say [INDISTINCT] let's assume what happens to me daily, several hours that I'm working
on Org-mode and sitting here in my little Emacs lisp buffer and working on something.
And then there's an idea for example, I get an email from Raman, he wants me to send the
title and the abstract for this talk here. And so my--it's on a Macintosh laptop so my
email application is open as well and the message from Raman is [INDISTINCT] one, I
select that one. I press at a template and I get a litter buffer which contains a link
here. This is a link to that email. When I click this, Apple mail will open and show
me that email again and it--I already know what to do. I can fill in some information
like what is this about, I can put a deadline and a scheduling timestamp and some more information
where I want. I press--I press control C twice and that message is filed away in my inbox,
where I'll grab them later, go to deal with it. That's capturing with Remember. It's a
very fast and efficient way, I think. Many people actually use this for many different
ways. For example, I have people on--or a mailing list who [INDISTINCT]customers often,
so we'll get often calls which I then can bill. So what I do is I have a special remember
buffer which pops up and immediately starts a clock and when they file away, this remember
buffer as a clock is closed and so that time will automatically be billed to that customer.
So one of the things I'm actually not going to talk about, that Org-mode has a full clocking
system in there. So you can clock all the time which was spent on task and get a table
about this, I'm not going to show this in detail but it's available.
>> RAMAN: So for the Google audience, another [INDISTINCT] interesting use of remember in
Org is when you're doing Google searches. Why, I actually wrote myself templates where--rather
than maintaining a web browser [INDISTINCT] you can actually make notes for yourself using
remember as your search and build up a very rich file of searches and what you read. It's
a very, very nice way of doing it. >> DOMINIK: Okay, That's, I guess, it works
best if you use a browser which inside Emacs [INDISTINCT] yes, exactly.
>> Why would you not [INDISTINCT] >> DOMINIK: Well, yeah, not everybody does,
but yes, of course. Okay, so step number six, we're already at step number six in this development.
The next one--the next thing is of course Collects and Display because the problems
of course with this approach, we have decided to make a note file and put all the task into
notes and they will be widely scattered. It will give us several files with notes, some
for projects at home, some for projects at work, notes from certain meeting, and these
all will contain little notes that say something is a task which has to be acted upon. And
so now, the important task is to actually get these things, fill that out, collected
and displayed in a certain way. Yeah, so task can be in special list, they can be [INDISTINCT]
scattered over many large files. How to find them? And so Org-mode let's you define queries
in a couple of ways and it has two main ideas on how to display these. And these are called
Sparse Trees and Agenda View. A Sparse Tree is only for single file and has the idea that
you still use the outline tree which you have in that file but--that you hide as much as
possible of the contents and only show images. And the direct hierarchy above it so that
you still know some context. I'm going to show an example in a minute but it's a very
nice way of finding things which are deeply hidden in an outline tree and still have something--some
information about the context. And the other possibility is an Agenda View and that's actually
a flat projection, so even though all your documents are [INDISTINCT] the documents,
this view will actually collect any task or whatever you have selected as your query,
and put into a flat list which does not really remember where in the tree it was. So you
can have--you have the deep outline you can have on level 25, you can have--define a little
task, and that searched will actually pull it out and put it into your flat list of task
which you have to do. So, let's take a little example here, [INDISTINCT] a little example
file, it's just a single file to make things easy. You have some home task like clean the
garage, I only picked this because David Allen always cleans his garage when he talks about
getting things done. You have some work tasks, for example, prepare Google Tech Talk, of
course you can define if this is work or not, let's call it work. Then I have--I have a
list where I collect ideas for presents. If I want to gift something, a person, and I
have an idea, I put it in that list so that--so that I don't forget. And some media, for example
some books I want to read, some DVDs I want to watch, things like this, this is what you
can put on here. And then you can just start your searches. For example you can make a
sparse tree looking for buy. This is for the--for the tag buy and then this whole file looks
like this, you see in home and in work as every thing is folded down. But in ideas for
presents for my kids there I actually see little things which I want to buy. So, this
is a list which you can take with you when you go shopping next time. And also there's
a book on there that also shows up. Well, then you can go to the Agenda View, this is
what we call the daily or weekly agenda. This is a weekly agenda where there are seven days.
This plate for the current day, there's actually a little time [INDISTINCT] and then you have
a schedule of my work of--actually there's a waiting tasks which means I have to make
a phone call in order to get the garbage container to clean my garage. It's basically listed--listed
in here. And then there's also the other task that I have to do something, I have to build--build
[INDISTINCT] there's a deadline in 19 days coming up. So, it's just a pre warning that
you have to get started about this because it's only 19 days from now. And then of course
here on Tuesday there will be the Google Tech Talk it's also in this table. So, this is
just a daily--the weekly agenda you can also focus in on the just on the day, that's only
limited to a single day. And then you can move forward quickly from day to day, it's
just like a normal calendar. The other Agenda Views actually look at--search for something,
for example here's a search for all the TODO keywords so all the task which are not done
in that list are now collected here. So, there's this waiting task and then there's also the
TODO task which I just [INDISTINCT] all you can do is search for all task with buy and
now with in this flat list, it's no longer in this outline but it's in the flat list,
they just see all the things which--which you wanted to buy. and you can just--and the
Agenda View allows you to work from the agenda so if you--let's say you start working on
this, you actually go ahead and buy a small tent for hiking or something like this. Then
you can actually tic the task off from this list. So, you don't have to go back to the
original buffer where it is. You just say here it's done and then it will be change
here in this list and also back ends the original file. Okay, that's basically what I wanted
to say about this [INDISTINCT] and not a big area of [INDISTINCT] I'm not going to talk
too much about today is exporting and publishing. So, you can export and publish all the content
of an Org-mode file as HTML and as LaTeX. These are the both--the main back ends which
we have implemented right now. So, LaTeX is a gateway to PDF, that make a nice, pretty
scientific documents. HTML, and among other things we have--we have some JavaScript support
in there which actually gives you a very nice way of--read a large document on the web.
It's very much Emacs Info. So, if you work in Emacs and you have the info documentation
where you can just--by pressing single case--single keys, zip through the entire info documentation
in a very fast way, this JavaScript actually, it does something like this for working in
a web browser. It's a very nice thing written by Sebastian [INDISTINCT] one of the people
who help me with this kind of stuff because I have no clue about JavaScript. But you can
look at an example [INDISTINCT] the file of changes you can try this out if you want.
LaTeX [INDISTINCT] is also an ASCII back end which is just basically takes the Org-mode
file which already is pretty readable but make it even more readable so that it's very
nice to send an email, or send to people. It's just a very straight and easy look of
that thing. And you can also define whole projects, a publishing project where you link
any number of Org files and then just publish this at the whole--as a whole website in the
linked pages. It's a sub--a subsystem of Org-mode, which works like this. Okay? Then I wanted
to talk a little bit about a few tricks which you can do with Org-mode and which are a lot
of fun. And one thing is there's a table editor in there. Of course, editing tables in ASCII
is normally a big hassle because after each letter you have changed, you have to change
all the rearrangements and things like this. In Org-mode you basically can start writing
a table by just writing--starting the line with a vertical bar--with a vertical bar.
That character means this is part of a table. And then you just write the different fields
and when you press stop you actually in--in a little table. There's a separator line here
and then you can just go in and fill in all these different fields. And so, if you start
writing a name, for example Pete, it's actually Peter which I want to type here, so until
here it fits. And one of the interesting things already that--Org actually doesn't shift these
out while it writes Pete. So, it actually automatically switches to an overwrite mode
while in a table field. And I'm going to say a little bit more about this later. It's a
context dependent behavior of keys, and actually Org makes--Org makes extensive use of this
idea for many--for many of its features. So, if I type the R now, of course then the rest
of the line will be pushed out because it has to be spaced. But next time you press
tabulate in order to move into the next field, the table will be fixed and it will look nice
again. And then you can just go ahead, just fill it in and put in a couple of people,
put in their phone numbers, room numbers, anything like this. And for example, you will
notice that the room numbers here are aligned to the right hand side, so it automatically--automatically
checks if it's--if it's a column where there are mostly numbers, it would just right align
it. If it's mostly words, it will left align it. So just these little things make it easy
to look at. And then there are very fast ways to edit this tables. So, for example if we
decide we actually want to swap the columns of room and phone number and actually want
to put this last line first, so we just put the cursor here, we hold on the meta key [INDISTINCT]
left and twice up and then this table will be rearranged and just--so it's very easy
to swap columns around, I think much easier than any application--other application I
know. So that's just kind of fun but the real fun start a little later. I don't know who
of you knows the Emacs calculator package? The calc package which to--in my opinion is
really--absolutely the most amazing program that has ever been written for Emacs, just
totally amazing. It's a [INDISTINCT] mathematica and Emacs lisp.
>> RAMAN: It's been running since 1991... >> DOMINIK: Yes.
>> RAMAN: ...is what is most amazing about it.
>> DOMINIK: Yes. And it's a beau--it's really beautiful program. And so, the Org-mode tables
actually have a link back into the calc package and you can, if you want, write in a field
[INDISTINCT] equation, for example here I've a couple of columns which is a function and
then an N for the degree of the Taylor polynomial which I want to develop it. And then it's
a location at X or X=0 or 1, and then here in this column I just write yes, okay I want
the Taylor expansion of this function $1 with respect to the position X and then of degree
N, that's $2. And I want to have the numbers which come out with--there's an accuracy of
three digits. And if you put this in an equation [INDISTINCT] will actually be valid for the
entire column. So you actually don't have to go down and pull it, if you write it like
this, it will be for the entire column and it will just fill in these little things,
all in an [INDISTINCT] table. Which is of course, this application is kind of funny
but if you just want to add a couple of numbers or do a couple of small calculations or calculates
the efficiency of a computer while you have a table which has some running times and things
like in here, it's very useful to be able to this right there in your [INDISTINCT] notes.
Another trick which you can do with table is something which we call Radio Tables. And
so the way this is works--this works is you can actually--you're allowed to embed an Org-mode
table into any mode. That uses the same trick of having context dependent functionality
of keys. I will explain a little minute how that actually works. So you can put it in
any--into any mode, like into C mode, JavaScript, LaTeX file, whatever you want. And then you
can define--it's a single line, you define a translation on how to convert this table
into the correct syntax, and to define a location where the transformed should be inserted.
And then you can just edit the Org-mode table and the translated table will be changed too.
So let me take an example. This is--for this JavaScript which we use to quickly view webpages,
this is just a little table which define which keys do what. This is a table which we display
in html and since this is--this is JavaScript, of course, somewhere in your JavaScript you
have a location where you define the table. And it's a--JavaScript actually have to have
little strings which you'll string together here in order to make this little table. As
you see it looks totally ugly, you don't see a thing. So, you don't see if the table is
correct or not correct, if you have missed something. It's really very bad. But you see
that there's two comment lines here, BEGIN RECEIVE ORGTBL and END RECEIVE ORGTBL. And
the table has the name Shortcuts, so you can actually have many such tables in a file.
And then at some other location you can choose wherever you want, we have--in another comment,
in a comment block, we just have a little Org-mode table which defines this table in
a very clear way, you can just easy look at it. And it just says ORGTBL SEND Shortcuts
and then there's a--there's a transformation step. And so whenever you change this table,
the other table will be changed too. And that can be used in any circumstances and I find
it extremely useful. For example, when I make exercises for my students, I write those in
LaTeX and I do little calculations and I have a little table in the end. I always do it
like this because the table calculates, [INDISTINCT] I can do all the exercise calculations just
in that table and have it as a solution in the same documents, [INDISTINCT] very efficiently.
Yes, I want to explain one internal technical thing for the people who are actually, maybe,
Emacs hackers and know a little bit more about it, and this is about these Context-sensitive
Keys of which Org-mode makes really extensive use. So, many of the keys work different depending
on where you are. For example, if you hold on the Meta key and use a cursor it depend
on where you are. If you are on a headline, that will do structure editing of your outline.
So it will demote, promote, move something up or down. If you are in a table, it will
actually change, swap columns and rows, these exact--exact same keys. The extreme example
is the key ctrl-c ctrl-c which I use, I think, in 12 different ways so depending on context,
this always means look and update, for example, in a table it means, well, realign this table
and redo all the calculations, something like this. And in other circumstances that means
similar things but different in every case. The tabulator, for example, it does visibility
cycling in the headline, it does motion evaluations in tables, and it does LaTeX template expansion
also. And then even all printing character use the same thing because they switch automatically
to overwrite mode in tables. And the way this is implemented is--well, in Org-mode itself
of course, no problem I can just bind any key to any function which will locally look
for the context and do the right thing. But the interesting part is if I allow an Org-mode
table to be embedded in C-mode for example, then it gets more interesting because, of
course, all keys have some functionality in C-mode which you want to be able to use. And
so you export the table functionality as a minor mode, and the way this works is that
you bind the keys in the minor mode in--to a wrapper, the wrapper checks for the context
MI in an Org-mode table even though I'm in a Java file, for example. When I am in the
desired context then the Org-mode command is executed and that's it and if not then
what the wrapper does is actually turn off that minor-mode and do a key lookup, well,
what should I really be doing in this mode? And so, in this way you can actually project
this functionality into any mode in a completely automatic way. So, here's just a little bit
of lisp pro-code for those of you who understand it. So, this is just one of those functions
which is an interactive function. So it's a command of course, and it does a check,
well MI, at the table. It's just a little function which checks if there's a table.
Looks--does it look like a table? If yes, then I call for example org-table-eval-formula.
If not, then there's a let binding form which actually sets the value of orgtbl-mode to
nil which means the minor mode is switched off--switched off. And then in this--in the
dynamic scope of this let statement, there's actually a key look up, you look up which
key--what should I actually, normally be executing and then this function is executed. And so,
there's actually two--two such minor mode, one for the structural commands and one for
the table commands which use this functionality to project these functions into any major
mode in Emacs. Another technically interesting thing is also that we have multibuffer undo.
So for example, if you have an agenda file then--and we do something, we can undo it
both in the current file and in another buffer. That's another interesting thing, but I haven't
really worked this out, to show you this in detail. Ask me questions about it if you want
later. Okay, I'm getting to the end. So, how Org-mode is--how's Org-mode use today? In
many different ways; of course, it's being used for taking notes by many different people
I think. Then it's being used for tasks and planning but in many different ways. So, some
people use is as a simple TODO list manager, so not as a notes file at all, it's just a
list file and they just have all their TODO tasks, you know, that's it. It can be used
like a day planner, and a day planner means you have a page for every day and you put
all your tasks on a certain day. So that means you immediately schedule every task. It can
be use like this and a couple of people have used it like this. For example, John Wiegley
who actually wrote Planner himself, it's a different software, but that's more like a
planner--Emacs planner work--way of using this program and so you can do it like this.
Or you can do it like Getting Things Done a la David Allen. So, you have TODO states
for the main GTD list, for example, the next action could be a TODO state or waiting or
names, agendas for people. And you can just use the tags for contexts and agendas and
whatever you want. The thing is it's completely free, I'm not forced to use this in any way
you can just decide how you want. You can also do detailed time planning and accounting
as I said. Some people use this as a small data base, just use the properties and all
that to store some data and use it as that. There's quiet a few people who actually use
it as a way of writing html and constructing web pages, writing little manuals, technical
documents, it's a very pleasant way of doing this, I think. Or making drafts, for example.
Very often, when I have to write a scientific paper which has to be LaTeX in the end, I
start in Org-mode, write a draft and when I'm reasonably satisfy and need to go to the
files minor details, then I just export it as a LaTeX file and take it from there. But
it's not really all--basically people use it a Swiss army knife because it does many
different things and you can just apply it to many different things. But Org-mode is
not, well, Org-mode is not fiddle-free. So it keeps you fiddling with your system because
it allows you to change your system but on the other hand, Emacs users, I guess if you're
all Emacs users, we like this because we like our computer to work exactly as it should
be. We don't want to have it a little bit off, we want to have it exactly right. And
so, I want to fiddle and that's why I allow you to fiddle with Org-mode. It's probably
not for the masses because it's only Emacs users and we are still a reasonably small
fraction of the human population, I think. >> RAMAN: Quality [INDISTINCT]
>> DOMINIK: Yes, it's not for VI users, sorry folks, but I don't think we have any here.
Only few people switched to Emacs because of Org-mode but some do. I have now a few
cases where this has happened. Then I want to [INDISTINCT] one final slide. There's a
few remarks about Evolved Software because Org-mode is a pretty bad example for Evolved
Software. It started in 2003 as a very small project so the original scope was really,
take notes, define a few tasks and that's it. Of course I put it out on the Web and
created a web mailing list for it and there's a whole [INDISTINCT] of wishes and ideas of
whatever comes. Ninety five percent of the features were added later which were not in
the original design, just added later. And as you--probably all of you know, who write
codes, this can be very difficult, [INDISTINCT] complicated because you try to be [INDISTINCT]
compatible and things like this. You don't get a fresh start, you don't get a clean look
at an original design. So that can be very bad, in fact. What I've tried to do is to
use two over ruling principles. And the first one is to really keep the simple core intact.
So the basic idea, it's--you can still takes note with it, you can still [INDISTINCT] a
few things as being a task and if that's all you want to do, that's fine, you can only
do this. So I'm trying very hard to never impose complexities. So the idea is that you
can start using Org-mode in an extremely simple way and as you go along, you can add the little
things. But if you stop--stay at the small things, you will never be punish for using
a big complex program. And I think that's very often the case with design software.
So, if people think about it and they have a big plan of all the stuff which can be done,
then very often, you are faced with an input window which ask you for a lot of information
which you don't even want to specify because you are not interested in this. And that is
what--something which we try to avoid. So, Org-mode doesn't really--it doesn't really
offer a finished and closed solution for whatever you want but what it tries to do is to facilitate
a learning and development process. So that you sit down and develop and learn your own
way of getting things done or planning or whatever. This is where I want to stop. There's
a few acknowledgements. First of all, the people on the mailing list emacs-orgmode@gnu.org
which is really a great community, I'm laughing around there and talking to these guys. Lots
of enthusiasm, some criticism and a constant stream of ideas which is really what has kept
this program alive. Particular thanks to Bastien Guerry, who's a French guy who has really
been the second man on the ship for a long time, implemented a lot of things and helped
me with many details. And I would also like to thank Andrew Hyatt and T.V. Raman, and
Google for giving me the opportunity to talk here. Thank you very much. And of course I'm taking to--I'm ready to take
any questions. >>
So I have a question. >> DOMINIK: Yes, I know.
>> Actually, maybe I'll go for two here so. >> RAMAN: You got to use the mic.
>> Hello, so I was wondering if there's any function--one of the things I constantly wish
for Org-mode to do because I love to use Org-mode but unfortunately, some of my colleagues are
not so enlightened and, you know, so we--and, you know, I basically have to collaborate
a lot with them on like wiki pages and stuff like that, and you know, with [INDISTINCT]
is there any--is there any way or any anticipated way to like have a back and forth translations
so I could export it to a wiki page and then like when I go edit that wiki page again,
I could retranslate it back to Org-mode? >> DOMINIK: Well, I mean, I don't really have
that use for it so I haven't plan--don't have plans to make it but I think it's easy to
do because it's just a simple plain text structure. I think it's pretty easy to do. And there's
also, there is some code from Bastien actually, which we have, which does a complete analysis
of the file. So it actually passes an Org file into a structured list. And what--I think
it should be very easy to turn that list into whatever format you want...
>> Okay. >> DOMINIK: ...and to turn whatever format
you want back to that list and then all you miss is a little routine which writes it back
as an Org-mode file. So there are actually plans for this but they're not really very
concrete. >> Okay, cool.
>> RAMAN: The problem with that particular issue is with Wiki. Wiki is sort of deceptively
simple in the sense that they claim it's a simple text-base mark up and sometimes Org
also is that. But how many spaces make up a list is different in every Wiki I know.
And, so you know, which one do you pick and how do you do that transform [INDISTINCT]
>> [INDISTINCT] for each... >> RAMAN: For each Wiki and then you have
to know it and then there are surprises. >> DOMINIK: Yes. Oh, there's this idea to
have sort of a gentle back and forth for translation into any kind of format where people [INDISTINCT]
can write their own specification. But that has not materialized yet. And I'm not sure
how quickly something like this will be done. >> RAMAN: And the question is, what [INDISTINCT]
in terms of complexity because Org is [INDISTINCT] >> DOMINIK: Yeah, no, I mean the idea would
really be to basically go through--go to an intermediate format, like this list structure,
and only communicate through this. Yes. Yes. I don't want to make the basic format of Org
more complex, I think that's complex enough. Other questions. I think I saw a hand over
there, somewhere, no? I guess no more questions. If you ask questions, if you finally have
questions, just get to our mailing list and ask me the question there, I will be happy
to answer. >> RAMAN: [INDISTINCT] any hard core Emacs
hacker join Carsten and us for lunch. We are going out to [INDISTINCT] after.
>> DOMINIK: Thanks.