org mode is awesome

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
today I'm going to talk about how we use org-mode in some of our day-to-day work our mode is a really wonderful outlining and structured text tool what I mean is we have headlines that start with an asterisk here we have two asterisks that makes it a second level heading and if you scroll down we can see a third level what we can do is use tab to expand and collapse these headings so if we put it our cursor on a headline and press tab you can collapse them very quickly and then see what what's there or we can press shift tab and see the whole thing in various ways if we're at the head of a in the first character we can use fast keys like n to go back and forth around things or we can press J and quickly jump to say navigation and press tab to see what we're what's going on there okay we can do a lot of interesting things so here we have a headline that's a third-level if we want to change it to second level we can use alt arrow and change only one thing or we can go up to to this cursor and if we use alt shift arrows then we can change all of the headlines within that section if you're at the beginning again you can use some speed command so R and L change those and capital R changes everything in the subtree like that okay and if you want to rearrange these that's also quite easy you can use alt up and down to change the order of the trees or if you're at the beginning you can use shift D and shift you to do that very very easily the point is work modes very good at outlining and you can very quickly see various levels of of your of your document it's also fabulous for task management so if you put a marker light to do here you can order we'll treat this as as a to-do item and we can use shift to change this to be done very quickly and even track how much of this task is done and we can do that it puts a recording of the time you can have checkboxes for various tasks and that makes it nice to make sure that you've actually finished everything that you want it to do now one point in here is if we have deadlines that tells us when we want to have things done we can use something called an agenda and see what what all is coming up so if you have the sprinkled throughout a document then we enter the agenda let's limit this to the the current buffer subtree and press a to see what things are due and down here now I can just press T and mark it as done and then similarly T market is done and if i refresh this with G then I see there's nothing else to do alright that's pretty handy it's also handy for capturing tasks as they come in so let's say you're working on something maybe giving a talk suddenly your phone rings and you don't want to interrupt your workflow you type ctrl C C to capture let's make this a to-do or item and we'll say send information and let's say we're going to have that done tomorrow that way it will be a reminder and now you just save it and it will write it out to a file called tasks org in my case so it's easy to capture things without getting too distracted tags and properties are useful so let's take a look at what those are this slide here is a tag on this headline let's look at this file here you can see contacts org is a file that I use to keep track of emails you can see this properties here is called a drawer and it stores various pieces of information so again we go to our agenda and we're going to type M which is going to be a search and we're going to search for email properties that match this expression okay that's going to give me three contacts of people that I am related to you can open them up directly here and see that you see some of these are also tagged with with various things so let's let's run that again and this time we'll look for people that are tagged by group that gives me a bunch of people here and we could also run a group say - MS that would give me people that are tagged group at not MS for example so those are pretty handy then the next very handy thing is links we can put links anywhere you can link to a various section so here is a target called end and if I click on this it will take me straight to it so you can use that for navigation or you can link to a subsection so this will go to this thing called a subsection you can link to file so this is going to open blog org at line 415 right that's a file that I used for writing blog posts you can also link to certain headings so again we can open this and it goes now to this particular heading you can have links to URLs so this will open my group website in a browser you can link to info you can even link to emails in news you can have active links that show you information or this will open a website with that DOI popping up all right so that's very handy you use these links for all kinds of things from navigation to providing functionality we like to have images in our buffers and Emacs knows how to see them so it is no problem to have images that are in line with the text that you're writing tables are extremely easy to to create and you start by putting in a line let's say we want to make this and now I press tab and I can put in some numbers every time I press tab it will automatically align and you can move around in this width by pressing tab or if you just have you can jump around in the table pretty easily okay tables maybe have really wide columns so let's say you have this one and you want to to shorten it what we do is put in a bracket L and bracket 10 and then if we align this it will shrink it and and get rid of this it's just not showing it so here if I redo this you can see that the data still there it just changes the appearance now tables are good you can sort them let's say we want to sort this in ascending order so we type control C caret and let's sort it in numeric so we press and we get one two nine if we run that with a capital n it will be in the opposite order we can also move the rows around so all we have to do is press alt and move the rows around like this and we can do the same trick with columns so we can swap the columns pretty easily sometimes you want to add or delete delete rows so let's say that we're we're here and I want to add a row then the simplest is is alt shifts down and that will create a new row that I can put some things in or if I want to delete this column then I can try alt shift left and that will delete it or I can do alt shift right and add a column back so it's easy to add rows add columns and so forth it's reasonably easy to import data so let's say I have this data here it looks like tab delimited data all I have to do is is run this command and that was data tab and it will automatically insert that and if you want to put a line there we type control C dash and you get a line need to convert your table to la tech maybe that's what you prefer to use we just highlight this and we can control C control e control D L and we'll look at it in a buffer there is your table you can paste that into your low-tech environment if you need to do that if you want HTML instead there is HTML code that represents that table okay of course we can have equations that get rendered in Emacs if you want to see the code which is type control C control C to get rid of it and you can get it back by running that you can use nice symbols like this if you use this toggle pretty entities command then they actually look kind of pretty we use executable code a lot so we are always writing blocks that here is an example of Python and we can run it and capture the results right in our buffer we can also do inline code so let's say that I want to make this 23 then I can insert the 34 and it even keeps the old result so if you if you want it okay so let's check out this looks kind of ugly here but if we export what you see is that the la Tech is not showing any of the code and it is showing these calculated numbers all right we can use that the tables to create data sources so here is a table that you saw before we can pass it as a variable here we call it data and if we run this code block it's going to print the fact that it's reading this table as an array or a list of lists in in Python and we have links here if you want to remember where this table came from we can just click on this link and see where it goes okay we can make figures pretty readily here we just save a figure in Python it's shown down here as a link and and we rescale for the presentation over here so that that's pretty convenient to show your analysis in line for your own analysis we can also write programs to the disk so we don't have to keep everything in the code block let's say I want to tangle this out to hello world hi so this is a simple Python program here we run the org Babel tangle command that generates hello world PI we can see it right here and of course we can now run a shell command that runs that Python script and there it is we can do compiled languages so if you need to write Java code here's a HelloWorld in Java we can tangle this out that tangles out hello Java we have to run a shell command to compile it and now we have a to run the program itself and there we get hello Java you can do see here's a simple C program we again tangle it and we compile it in this step here and then we can run it and see that C works of course I have all the compilers for these installed C++ we can tangle out to a-plus-plus file we make a make file here let's tangle this one and now we can run make hello and that gives us something and we run finally our a dot out and you can see that this works and last but not least we have Fortran so let's compile this one and we can do that as well alright there's a lot more language support this is an example of it our awk closure some of these that by kaskell there's all kinds of support for different languages and it's certainly possible to write new languages ok the one of the next reasons we use it is that as nice as it is to work in or mode this way most of the time we often want to actually export something for publication so let me take a look here at this manuscript this shows some setup that we're going to eventually expand into a la tech source file this is a paper we're writing you can see the outline down here we can expand it you see links in here that have all kinds of information in them and so forth there are pictures etc right what that gets converted to see if this opens is a PDF file that we can submit for publication all right so here you can see what that turns into which is pretty pretty convenient okay we can create HTML as well I showed you the export if we look at at this particular one we'll see e H o then this is going to create an HTML file and have some of the contents in here this is more or less how I write the blog there are some additional export features that that we use to filter and control how the links and are created okay extensibility is one of the main reasons you can look into the contributor so here you can see all of the things that people have contributed to make org-mode do various things and so that is something that that we like right so if you want to try doing what I've showed you you can look at this github repository it has all of the code that I used to do this it includes Emacs for Windows and it's pre-configured to do most of what you saw today except for all of the programming things you'll have to install Autec Python and other languages if you want to use them there are other options as well I've used the prelude and eMac starter kits out there and so it's pretty it's pretty handy so just to give a quick overview of of what it is we can modify this program real quick see the overview that I showed you in terms of the outline you can see this kind of table of contents look view and quickly navigate to the next next step right so that should be - slide and so that brings me to the end and you might ask after seeing those things why are you using work mode and what could you do with it as well thanks for watching
Info
Channel: John Kitchin
Views: 84,460
Rating: 4.9261537 out of 5
Keywords: org-mode, emacs
Id: fgizHHd7nOo
Channel Id: undefined
Length: 18min 6sec (1086 seconds)
Published: Fri Jul 04 2014
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.