Some people are "note takers." And most of these people are forever searching for the ultimate note taking app. Well, look no further. Emacs Org Mode has been the de facto standard for note taking for decades!
Your support is very much appreciated. Thanks, guys!
AI Generated·May contain errors
So I get questions all the time about note-taking.
I'm not really a note-taker myself,
but I know many people are into note-taking.
They depend on it for their school,
for their work, for their life.
They have to organize everything that they do.
And if you're one of these kinds of people,
note-taking is one of those,
it's kind of like a Holy Grail kind of search, right?
You're always searching
for the ultimate note-taking application.
Well, if you're into free and open source software,
and specifically if you're an Emacs user,
you already have the ultimate note-taking application
in the palm of your hands, right?
Because Emacs has Org Mode built into it.
Org Mode is this special syntax
slash markdown kind of language
that includes a lot of really neat functionality,
incredible functionality
that will not be found anywhere else,
including some really powerful note-taking functionality.
So let me switch over to my desktop
and let me go ahead and launch Emacs.
And I've got this key-binded to open myconfig.org.
I've got space FC for space find myconfig.org, right?
Because I'm always in my Emacs config file,
sometimes I have to look stuff up.
I've got that key-binded.
And of course, my Emacs config is a lengthy document.
So I have a nice table of contents
that helps me find things.
And I could go and click on Org Mode,
and that takes me to the Org Mode section of my config.
Let me zoom in a little bit
so you guys can see some of the code here.
So we have to do some settings here.
So there's a couple of very important
org programs for note-taking.
There is Org Agenda and Org Capture.
What is Org Agenda?
Org Agenda is, it displays all of your tasks,
your to-do items.
It's the stuff that you need to take care of, right?
That's your Org Agenda.
Org Capture is a way to quickly put entries
into your Org Agenda, right?
It lets you basically type a note or a message,
and it gets put into your Org Agenda.
So when you're configuring org,
the first thing you need to do
is you need to set a default org directory.
So I've got setq org-directory.
So setq in Emacs Lisp.
This assigns a variable.
This is, the variable is org-directory.
We're gonna assign it this value.
And my home directory slash nc slash org with a capital O,
that is my default org directory.
NC stands for NextCloud
because I have a NextCloud server
that syncs this org directory
between multiple machines of mine.
That way, all of my org documents
are in that NextCloud server
that I can access those files from any of my machines.
And then next, you need to setq org-agenda-files.
So Org Agenda, how does it know which files,
which org files to go and search for these agenda items,
these to-do kind of items?
Well, you need to specify which files
it needs to use as these agenda type files.
So here, I've listed tas.org, notes.org, and journal.org.
And these exist in my nc slash org slash tas.org,
notes.org, journal.org.
And for those new to Emacs Lisp,
setq, again, we're assigning a value to a variable.
The variable is org-agenda-files.
And then parentheses list,
what we're assigning to that variable is a list of items.
What is the list of items?
Well, it's path names to these files.
Concat is concatenate the org directory,
so slash nc slash org, and then tas.org, right?
So we're just giving it a list of three files.
And that's all that is.
Emacs Lisp code is really simple to graph.
It's really easy to wrap your head around.
You know, I know some people get confused
by all the parentheses,
but really, it's actually quite comfy
once you get used to it.
So now that I have that set,
I have a key binding set to open the org-agenda view.
I have space M for org-mode.
Space M is what I use for all org-mode related key bindings.
So space M, A for agenda.
And this is the agenda menu.
And if I hit A again for the agenda for the week,
it gives me a list of the days of the week.
You know, it's the seven days of this week.
And then any to-do items would appear here if I had any.
I don't have any,
because right now all of these files are blank.
They're empty files.
Why are they empty?
Well, I told you, I'm not really a note taker.
I'm doing today's video mainly
because I know a lot of you guys are note takers.
So I'm gonna go through all of this setup
and explain a lot of this stuff for you guys.
Although, you know what?
If I'm really impressed with this stuff,
maybe I will start getting into note taking.
I don't know.
I'm nearly 50 years old
and I haven't been a note taker yet in my life,
but maybe I'll change.
But since there's no to-do items
in any of these agenda files,
all I need to do,
Q on the keyboard quits out of that agenda split.
And then let's go into the next section here of code,
we need to set some things for org capture.
So org capture, if I do space M C for capture,
you have this capture template here.
So I've got I for ideas, J for journal, N for notes
and T for tasks.
What is that?
Well, it's this right here.
Let me scroll up.
Let me escape and zoom out a little bit
just to make sure you guys can see all of this.
So capture, the first thing I do
is I have a default org-default-notes-file.
That is a catch-all.
So if org-agenda or org-capture,
if they can't figure out where to put an item,
throw it in notes.org.
And notes.org was one of the agenda files anyway.
And then we need to define our org-capture-templates.
So set Q org-capture-templates.
And then you need to create some templates.
You know, one or more, you know,
you can have as many of these as you want
for purposes of this video, I did four.
And you can see, I've got idea, journal, notes, tasks.
These are kind of standard.
These are, you know, almost default for Emacs users.
A lot of people copy and paste these templates here.
You can find this code on the internet.
Of course, you can find it now in my Emacs config.
Just go to my doc files
and you can actually grab this Emacs config here.
But what it does is it tells org-capture,
hey, when I do I for idea,
I want you to write it to this file.
And what file?
I want you to go to the org-default-notes file.
Remember, we define that up here.
The org-default-notes file is my notes.org file.
So it's going to write ideas to notes.org,
but there's going to be other stuff in notes.org.
Well, let me know that this is specifically an idea
by writing it in this format.
So what this format is,
is the asterisk is a top level heading
and then percent question mark.
That's going to be what I write.
We know the input that I give it.
And then add this tag at the end.
That's a standard heading tag that you use in Emacs org mode.
You can give headings tags
that allow you to search the tags.
And then a new line break.
And then percent U is an inactive timestamp.
And then another new line break.
So let me do space MC for capture, right?
And then I for idea, and then hit enter.
And you can see what it created.
It created the top level heading
and it's waiting for me to enter something.
And then at the end of it,
it's already added the tag idea.
And then a new line break.
And then the inactive timestamp.
You can tell it's an inactive timestamp
because it has the brackets around it.
If it had angle brackets around it,
greater than, less than signs,
that would be a active timestamp.
So now let me add this idea here.
Let me go in here.
What is my idea?
How about make video on org capture?
If I can spell it correctly, let me write.
And then let me go ahead and quit out of that
as well.
Now let me do space MA, A again for agenda.
Hey, I don't have a to-do item.
I don't have anything in my agenda.
Why is that?
Well, we told it for ideas to make the timestamp
an inactive timestamp.
And by default, inactive timestamp items
do not show up in your org agenda.
If I wanted this to be an active timestamp,
instead of percent U for the timestamp,
I would do this here.
I would do the caret symbol T for active timestamp.
And that's what I did for the task entry here.
So let me do space MC for org capture.
Let me do T for task here.
And now I get a calendar.
Hey, what do I want for the date?
How about yesterday's date?
You see, I get a to-do and then a active timestamp.
I also get a link to where I was in the document
that I was doing this,
because this is a task here, right?
Basically, it assumes because it's a task,
I'm doing something in my Emacs config.
I need this as a reference later.
So that's why I've got the link back to my config.org.
It tells me exactly what this is.
And I can say working on Emacs org agenda stuff.
And then let me write and quit out of that.
Now, when I do space M-A-A in my org agenda,
you can see for Saturday, yesterday,
task to-do working on Emacs org agenda stuff.
How about that?
If I want to go into the file, I can click on it.
This opens my task.org with the heading, the timestamp,
the link back to this file.
If I click on that, it just goes to the capture link here.
It goes right into my config, where it was.
And you can see if I scroll up and go over here
and hit capture, that is linked to that.
How cool is that?
Now, if you want to toggle a timestamp,
active or inactive, right now, this is active.
I believe I can do a shift and the arrow keys.
So if I do shift up, we just turn that to inactive.
Shift down would turn that back to active.
So if you want to turn on and off
some of these items from the agenda,
that's all you have to do.
And of course, you can always go into the files themselves
and just manually delete things from the files.
And that's the great thing about these files.
They're plain text files.
This org capture template stuff,
it's just writing to these files,
kind of automating the process for you.
But if I want to go and open my task files,
I can always just manually add stuff,
manually delete stuff, whatever it is I want to do here.
So let's play a little bit with this.
So let me actually go back and let's capture a few things
because we need some things to be in our org agenda.
So I'm going to do space MC and let's do T for task again.
And what item am I going to do now?
Well, let's do an item for today's date.
And I'm going to say, how about a collab with Mr. Beast?
That'll be for today.
Let me write and quit that.
Now space MAA for the agenda for the week.
You know, I've got today, hey, you know,
I've got a collab scheduled with Mr. Beast.
I need to take care of that, right?
So now I've got something there.
And now let me quit out of that.
If I actually go back into my task.org file here,
one of the things you can do,
you can give these to-do items different priorities.
Not every to-do item is the same priority.
Some are higher priority, some are less of a priority.
So one thing I can do is I can go down here
to this item here and I can give this a priority.
I believe the default key binding and Emacs for priority
and a org document is a control C and then comma.
I've got this binded to something different.
I've got space M for org related bindings
and then P for priority.
And then it's asking A through C,
what do I want to give this?
I want to give this a priority.
And you can see it adds this new bracket
with pound capital A.
That's letting me know that's got the highest priority.
That is a priority.
If I go down here and do the same thing,
space MP was that binding.
And I give this a C priority, the lowest priority.
You can see it adds that to this item.
And of course, if I rerun the command and you know,
space MP and give it a B priority,
it changes the C to a B this time.
Now let me write that and then space MAA.
And now when I go to the org agenda,
I get the to-do items,
but I also get the priorities listed as well.
That way I know what is a A or B or C priority.
Now let me quit out of that.
Let me go back to my config.
One of the cool things we had in here,
I had the journal here and you know,
the default setup for a lot of this is just,
hey, file, write this to this file.
Here in journal, I've got file plus OLP plus date tree.
So file plus OLP, OLP is a outline path.
So it's going to create an outline for us,
a org outline.
So your headers, right?
And then subheadings, right?
First level headers, second level headers,
date tree is going to be based on the dates
because this is a journal.
So you're going to insert a date in it.
So if I do space M and then a C for capture
and then J for journal, and we go to our journal,
we get a heading and we get a timestamp here, right?
We get an inactive timestamp
because I don't want these in the org agenda.
And what do I want this to be?
Well, this is a journal item.
This is my initial journal item.
And then let me write and quit out of that.
And if I actually go and take a look
at that journal.org, so I've got space O
and then J for my journal.org,
this is actually what got written to the file.
You were probably wondering why it was using
such a low level heading in the capture template
is because it had to add three other headers.
It added the year and then finally the month.
And then the third level heading is for this week, right?
So we were getting this file tree, right?
This date tree.
And that is what we saw if I go back to my config.
So let's go back to the config.org.
That is file plus OLP plus date tree.
That is really cool if you're jotting things down,
for example, in a journal or a diary
and you want things to be nicely organized
automatically for you by date.
So there you have it.
That's just a little bit of what you can do
with Emacs and Org Agenda and Org Capture.
And these are default programs.
Org Mode is built into Emacs
and Org Agenda and Org Capture,
I believe are also built into Emacs.
They're just part of Emacs, right?
You don't have to go and get anything, right?
They're already there for you if you're an Emacs user.
So you want to use them for your note taking.
They're fantastic.
They require a little bit of setup
because you do have to specify
where these files are being written to,
what format they're being written to,
but that's great.
You can really customize them.
You can customize them to your heart's content.
And if you want that kind of power and flexibility,
you owe it to yourself to check out Emacs Org Mode
if you're a note taker.
Now, before I go, I need to thank a few special people.
I need to thank the producers of this episode,
Matt, Steve, George, Darlof, Lee, Mark, Methos,
Erjan, Peace Archimedora, Roland, Wargento,
and Ubuntu, and Willie.
These guys, they're my highest tiered patrons
over on Patreon.
Without these guys, this quick episode
about Org Agenda and Org Capture
would not have been possible.
The show's also brought to you
by each and every one of these fine ladies and gentlemen,
all these names you're seeing on the screen right now.
These are all my supporters over on Patreon
because I don't have any corporate sponsors.
I'm sponsored by you guys, the community.
If you like my work and want to see more videos
about Linux, free and open source software, including Emacs,
subscribe to DistroTube over on Patreon.
All right, guys, peace.