Table of Contents
1 Org
One of the big reasons to use emacs is org-mode.
In this post I will do a overview of some of the bigger features for org-mode, I might dig in deeper on specific areas in later posts.
1.1 Document Authoring
Org mode is really good at helping you write plain text documents, but then there is actually a lot of power behind the scenes a bit like markdown, just a bit different. Also the exporting is just amazing, if you need something beyond the already available export options there are plenty options in the repositories to find other ways to export your document.
1.1.1 Tables
If you write something like scientific papers you will be very happy about the ability to include tables directly in org-mode, if you are an accountant you will be very happy about the ability to use formulaes in said tables.
So to create a table inside org-mode you just type a few | and push tab then you have a table, if you tab through the table it will create a new row at the end. If you press enter through the table it will also generate new rows at the bottom.
1.1.2 Latex support
If you are a mathematician you will appreciate the latex support inside org-mode, as far as I understand it you can just write part of the latex document, and org will make that work. So you do not have to setup the document, and begin it, though it is honestly only a few lines.
\begin{equation}
x=\sqrt{b}
\end{equation}
I was not sure how well this would do when exported to html, but that seems to be no problem, so pretty amazing.
Thought there could be some corner cases depending on how wild your latex gets, that might not work when exporting to html, but beyond that there should be no problems.
1.2 Scheduling
Org mode is only amazing at scheduling tasks for particular days, if you need to do something specific day, you can schedule it, but if you have a deadline org-mode also can do deadlines. recurring tasks are no problem either, you can specify how many days, weeks, months or years you want in between.
To insert a day type C-c . and choose the day you want to insert, you can get the menu up and type next mon and org will understand what you mean, but that is just inserting a date like
if you want to schedule something about a task (coming up) you would type C-c C-s for time schedule and for deadline is C-c C-d.Any header in a org-mode document can be a task (asterisks indicate header). roughly equal to # in markdown.
1.3 Literate Coding
You might not be familiar with this, it is a pretty old idea, but it never really caught on literate coding is the idea that you not only write code, but you write the documentation along side the code with small blocks of code being interspersed along the documentation, then when you have a nice document the idea is that you can extract all the code, either block by block or you referred to other blocks while you were writing the code, then it can be automated how to extract all the code and put it into files across your entire file system.
The same goes for your documentation this can be extracted as well, but when you do this all the code will stay and in better system show up in code boxes, so that you can see the code, and the relevant information right next to it. This can be a very powerful thing, but it does incur a somewhat bigger cost of maintainance, on the other hand your documentation will possibly make it easier to maintain the code. Anyway org-mode has very good support for working in this style.
print("hello, world.") print("This is python")
That is what a code block looks like, I can make this write out to a file anywhere on my system. But I can also give this block a name and refer to it in other blogs building more complex software.
Also when working with org mode, the print statement will in fact not do what you expect, and you cannot really do multiple outputs, if you expect to see any output from your block the way it needs to be done is like
return ("Hello, World\n This is python")
since print 'ing is a commandline thing and there is no commandline in org, also with the way it is running this makes sense.
When you run a snippet of code in org-mode like this, you are asking the language to evaluate the snippet, then returning to org-mode, therefore the code is completed when you get back so return makes sense.
1.3.1 Killer Feature.
One really cool feature this has is the ability to use several different language, since you can use a block sort of like a function. That is you can give them arguments and get output from a block, meaning if you have a part of a project that makes sense to write in X language, but everything else is better in Y this is totally possible, without having to write a lot of plumbing. There is a small problem with this setup for major programs, the org mode way of running programs are not all that great.
If you export a project using multiple languages the glue keeping everything together will sort of disappear, since that was org-mode, but when you export there is no org-mode.