My Emacs journey (3) - Agenda for everyone

My Emacs Journey

What if you want an agenda to keep track of TODOs and scheduled tasks, but you only have Emacs at your disposal?
You might find yourself in a situation where you don’t have access to the internet, Outlook, a smartphone or a physical planner.
Or, like me, you might simply prefer to keep your agenda in a straightforward plain text file.
It’s not a common problem, but I found it intriguing enough to write this little Emacs survival guide for anyone interested.

If you know nothing about Emacs, don’t worry. This guide is completely beginner-friendly.
I wrote the initial notes while I was still learning how to use the agenda in Emacs myself, so you’ll be just fine, even if it’s your first time running Emacs.

Before anything else, how to Execute command in Emacs

To run a command in Emacs, press M-x or Alt+x.
This open the prompt in the mini-buffer (at the bottom of Emacs) where you can type and execute commands.

Open the agenda view

To access the agenda menu, run M-x org-agenda RET (Alt+x, org-agenda, <Enter>).
Next, press a to open to the agenda view.
You’ll see an empty agenda first, and that’s no surprise since we haven’t added any tasks yet.

Schedule a task with org-capture

Creating a capture

To create a new task, invoke org-capture with M-x org-capture RET.
A menu will appear for you to select a capture template.
Press t to create new task.
A buffer will open where you can enter your TODO item

Scheduling a date

To add a scheduled date to your task:

  • Run M-x org-schedule RET to bring up the calendar.
  • A calendar view will appear below. You can pick a date using Shift + <Arrow Keys>, or simply input the date and time you want.
    Example: 1 nov 9am, saturday 8pm, +2sun 6pm (meaning 2 Sundays from now at 6pm).
  • Once you’ve chosen the date, press <enter>.

Tip :

  • The shortcut C-c C-s also run org-schedule.

Your TODO item will now have a SCHEDULED: line with the date you chose.

You can repeat this process anytime to reschedule your task.

Saving the task

There are two main ways to save your task:

  • Use save-buffer with C-x C-s or M-x save-buffer RET to save and keep the buffer open for further editing.
  • Use save-buffer-kill-terminal with C-c C-c or M-x save-buffer-kill-terminal RET to save and close the capture buffer.

By default, tasks are saved into a file named .notes in your home directory.
To check this, run M-x describe-variable RET org-default-notes-file RET.

Viewing the scheduled task in the agenda

If you return to the agenda view (M-x org-agenda RET a) now, it will still be empty.
That’s because Org-agenda needs to know which files to scan for tasks.
To fix this:

  • Open your task file with M-x find-file RET or C-x C-f, then entering ~/.notes.
  • Add it to the agenda files by running M-x org-agenda-file-to-front RET or C-c [.

Now, when you reopen the agenda view (C-c a a), your scheduled task should appear!

How to use the agenda

  • To refresh the view, press g.
  • To see more days, add a prefix argument like C-u 14 before running M-x org-agenda RET a. This shows 14 days in the agenda.
  • To jump to the task in its file, navigate to it in the agenda and then press <Enter>.

Re-schedule a date

You can reschedule tasks right from the agenda using Shift + <Arrow Keys> or M-x org-schedule RET to pick a new date.
Refresh the view with g to see your changes.

Change state (TODO, DONE)

When you complete a task, change its state by using M-x org-agenda-todo RET or C-c C-t.
This cycle the task between TODO and DONE.

And that’s it folks!

What else can be said?

I’ve covered just a bit of Org-agenda in here, but the Org-mode ecosystem is truly a beast when it comes to personal organization and note taking.
There is so much you can do with it. It’s a real rabbit hole!
Org-mode can be your agenda, notebook, time tracker, habit tracker, and more. You can even use it as a full-fledged spreadsheet, much like Excel.

With so many features, it’s really easy to get overwhelmed.
Personally, I like to explore how other people use Org-mode and then pick only the ideas that fit my own workflow. I leave the rest for later discoveries.
It’s a sane way to learn step by step without getting lost in the endless possibilities of Org-mode and Emacs.

What I’ve shown above is a very simple workflow. It is very easy to adopt, and it’s more than enough for effective day-to-day usage.
I hope this proves useful to someone out there. And if not, it might come in handy for me later.