emacs org-mode
Welcome to the Emacs org-mode category.
I am working on restoring some of my related posts from my old blog, so keep checking here for new content.
- It is mine (saved locally):
- It’s easy to write down thoughts quickly:
- It’s Private:
- Pictures and drawings:
- Internal links:
- Easy to read:
- Download the gz file from the GNU at savannah.gnu.org/projects/emacs.
- Untar using your file manager or
tar -xvf path/to/file
- In the Mint menu, look for Software Sources, under Optional Sources turn on Source code repositories.
- Install essential build tools in the terminal:
sudo apt-get install build-essential
- Get the dependencies using alt: sudo apt-get build-dep emacs
- cd to Emacs download dir, run
./configure
- run
make
- now run
sudo make install
- launch Emacs from terminal
-
Download and install Libre Office. It comes built-in with many personal desktop-geared Ubuntu distros, but in my version (Mint), I chose to opt out at the start. OK, no biggie, the full Libre Office suite is only 100MB, and I can do that. I see myself editing the occasional Word file or producing a PDF.
-
Add the following to .emacs to turn on .odt option in the export dispatcher:
`(eval-after-load "org" '(require 'ox-odt nil t))`
Emacs org-mode category
I’ve been following 404 media for a while, and after they recently offered a discount, I decided to become a paying subscriber for a year. This is a unique publication with a small, dedicated team of journalists behind it.
With the subscription, they also offered a private RSS feed for full articles. Since I can’t share that private feed with the world, I decided it’s time to migrate my feeds out of my main emacs settings and into its own dedicated org-mode file, using elfeed-org.
As this is yet another Emacs org-mode update, and several people comments on those, I created Emacs org-mode category on my blog with its own dedicated RSS feed: taonaw.com/categorie… This post should be on it as a test.
Updating my Emacs settings file. As this is now in an org file, it’s so easy to write comments there. It helps since comments on the blog get lost over time. If you’re an Emacs nutcase, let me know what you think ๐ฌ
Sharing my CSS Tweaks and Emacs Configurations
And now it’s my to complete a milestone:
Uploading my Emacs config! That’s right. And with it, side by side, the CSS customizations I’ve made to my blog (I’ve made a couple of changes since I last talked about it).
Find them in my public folder on GitLab or just read the new welcome note there.
He did it! Prot created a function that converts denote links back to “regular” org-mode links, using some regex magic.
This means I can now upload org-mode files directly into GitLab, which displays org files natively. Take a look
I’m happy with how my org-mode notes look like in GitLab:
I need to resolve a few things, like creating another folder for these notes and tying it into my repository, but after I’m done, the hope is for much more streamlined informational notes.
Another Emacs org-mode re-discovered feature as I’m improving my workflow:
Org-agenda is org-mode’s search engine. I include user names as metadata in work-related tasks.
to search tags & properties: C-c a m
. For properties though: <name of property>: "<value>"
My
Another thing I enjoy doing with Emacs org-mode is my habit of watching movies. Emacs reminds me it’s time to watch a good movie in a range of every three days to 10 days. When I watch a movie, I write the title and the year down and reset the clock - which will remind me to watch a movie again in 3 days.
On Emacs, it looks like this:
This is a habit graph. Each rectangle represents a day. The asterisk is when I watched a movie last; the exclamation point represents today. The green bar represents the time range (3 to 10 days), with the last day being in yellow, reminding me it’s the last day to complete the habit before I’m “in the red.”
So, in this case, I have today, tomorrow, and the day after tomorrow to watch a movie before I’m “in the red” for this habit. Don’t worry! It won’t happen.
When you open this habit up, you can see a list of the movies I watched and when:
Nifty.
I talked about making some changes to my project workflow in Emacs, and here are some changes I’ve implemented:
("p" "Personal Related")
("pt" "Personal Task" entry
(file "~/Sync/Personal/Projects.org") "* ACTIVE %^{What?} \n*** TODO Probes:\n %^t--%^t \n\n %U:\n %?" :kill-buffer t)
I talked about making some changes to my project workflow in Emacs, and here are some changes I’ve implemented:
The %t^
org-mode expansion tells Emacs to prompt for a date without a time. It calls a calendar in Emacs with the current day marked, which can be adjusted. In my case, you see two of those: the project’s start and the end (double dashes are how org-mode phrases a time range).
So, let’s say I have a new photography project I want to do throughout February. I call this capture template and enter the first day of February, followed by its last day. This will display the project (say, “photography project”) on my agenda every day throughout the month of February.
In the past, each project (which is an active task with sub-tasks marked by “TODO” items) had several of its subtasks scheduled at specific times. This has been my process for years, though it’s not very useful: I almost never get to work on my TODOs exactly at the time of my choosing.
The idea is that instead of having a list of 20 items that I need to do clutter my agenda with times in the day that don’t make sense, I will only have a couple of highlighted projects I know I’m working on. I can then go into each project from the agenda and see what the next action item I need to do there. This would be a TODO keyword without a scheduled timestamp.
Denote and org-mode instead of my TiddlyWiki?
While I just explained why I’m dropping some of the usages for org-mode, it’s still very powerful for what I do need it: projects and notes.
One of the thoughts that crossed my mind on a walk today was to convert my wiki into a collection of org files. This makes sense because I write my notes in org-mode anyway before I convert them into Markdown and then paste them into TiddlyWiki. At the same time, GitLab can read org files just fine, complete with images.
TiddlyWiki has a lot of functions built into it, but I might do fine without them, especially with Denote introducing dynamic blocks. Dynamic blocks are essentially meta notes, a key feature that allows one to build a wiki from their notes, as it introduces a hierarchy of links.
If I can make this work, the friction in my current workflow (write in org-mode, convert to markdown, edit, paste into TiddlyWiki, push changes to gitlab) will be minimized (write in org-mode, push changes into gitlab, edit after the fact) and will allow me to write more notes, more often. This sounds good.
Less org-mode, more Outlook? Why!?
It was one of our regular Wednesday date nights. Nat and I decided to meet in one of our favorite local spots instead of ordering in. Knowing Nat finishes work at 6:30, I calculated it would take me about 20 minutes to walk over, meeting at around 7 PM. When it was time to go, I showered, put on clothes and… realized Nat was already there. I was half an hour late instead of 10 minutes early as planned.
Nat leaves work at 6:00, not 6:30. He gets home at 6:30. My brain did one of its famous “brain farts” where it convinced me, beyond any shadow of a doubt, that Nat had /always finished work at 6:30 for the last five years or so. I was so convinced that I even argued with Nat, saying he must have left work early.
Being the awesome person he is, Nat didn’t take it too hard. After all, living with me means dealing with these issues more often than not. It’s just something that happens now and then. Me, on the other hand? I had enough.
I was never good with dates and times; call it ADHD, call it scatter-brain, call it age, call it whatever. Many people who read this would probably think I should use a calendar. You’re right, most people! I should! The only problem with this is org-mode. Let me explain.
My life is organized in Emacs org-mode. Everything I do, big and small, is written down inside Emacs. It’s my personal database, with search capabilities, dates and hours, TODO lists, and an agenda. I love org-mode, and I’ve said many times it’s the one thing that made me able to organize my life, or I would be a complete mess made of incidents like the one I described above.
Emacs is awesome and all, but there is one thing it doesn’t do. It doesn’t sync with my work calendar.
Now, Before all of you Emacs champs (the rest of you can skip ahead) jump with suggestions about the various packages available to do just that: I tried those a couple of times. They don’t work for multiple reasons, and my workplace locks down some of Microsoft 365 abilities for a good reason. So sit back down, please (I know someone is going to leave a comment anyway. Go ahead you, get it out of your system.)
On with the story.
While contemplating my choices, I realized there’s another big area where I stopped using org-mode: my journal. I started writing analog about two months ago, leaving my digital journal in Emacs behind. I’m enjoying it, and I already have my next blank notebook waiting for me when I’m done with my current one.
Another thing that has changed since I started using org-mode is my work style. COVID introduced the option of working remotely, and the change in my role enhanced that. My daily work computer is a Mac, not a Windows PC, which is less distracting and works with many Linux applications, Emacs included. I no longer have many time-sensitive, urgent, small tasks, as I often manage larger projects with a long-term commitment. However, my work routine in Emacs hasn’t changed in years.
Here’s an example of my current workflow. Whenever there’s a meeting scheduled, I’d go into Emacs and call up a capture function, which will ask me for the title of the meeting and the time it’s scheduled for. It will create a sub-header for my notes, complete with bullet points. Handy, but as I mentioned, I can’t sync between Outlook and Emacs. Every week, I need to look at my work calendar in Outlook, manually add meetings for the upcoming week, and keep them in sync. If a meeting is canceled, I need to remove it in Emacs; if a new one pops up or the time changes, I will have to adjust it. And these days, I have more meetings than ever before.
Then there’s the problem I told you about at the beginning. org-mode’s built-in agenda doesn’t help with my visually-needy brain. The agenda is a wall of text with timestamps and numbers. Since I need to manually enter times and dates, I type the information into org-mode as I remember it. The problem is right there: “as I remember it.” I must have corrected dates and times in Emacs a hundred times. So, I decided to no longer update org-mode with events and meetings.
I’m not fond of Outlook or Google Calendar, but I’ve been forced to use them for years. My partners, friends, and family all have a Google account, which means they see what’s coming up in real-time and can call me out on erroneous times my brain comes up with. The calendars are color-coded and reflect the same visual interface that - very importantly - I also see on my phone in real-time.
While I’m telling you about Outlook and calendars, let me throw something else in: Reminders. I’ve used org-mode for those, and when I’m away from the computer, I use Orgzly on my Android to sync quick notes to my agenda. Since I switched to my iPhone, syncing with Emacs stopped (There’s another technical reason why I can’t sync Emacs notes with my iPhone, which I won’t get into here). When I want to capture a quick idea, the best way is to take out the phone and dictate my thoughts or perhaps record a short voice memo. If it’s a quick thing, like remembering to take the laundry out, all I have to do is ask Siri to remind me. If it’s something more complicated, like brainstorming this post, I would rewrite it as a project, completed with sub-tasks, into org-mode using the short memo as an introduction/outline.
On my Mac, I now have a widget for my Outlook agenda, which integrates my work and personal calendars. Below is a widget for my reminders from my “Oh Snap!” list, which reflects things I want to see in front of me. This list is meant only for quick reminders, while I have a “planning” list of reminders for events further in the future.
I’m still working with org-mode for anything project-related. It keeps me focused and organized at what it does best for me: breaking down big projects into doable tasks and keeping notes organized, private, and stored for the long term. This is an adjustment, and I will probably go back and forth a couple of times, but I’m pretty sure the days of my weekly files are numbered, as I don’t have use for those anymore.
Emacs and OSM (Open Street Maps) are a natural match, so it just makes sense they work very well together out of the box.
Built-in search function, zooming in and out, and creating org-mode links with a single keystroke to locations. Amazing. If you’re an Emacs user, grab it now!
GNU ELPA - osm elpa.gnu.org
Reader: elpa.gnu.org
Important factors for journaling
I’ve been keeping a journal on and off since I was 16 or so, but it’s only in 2018 that I started being more structured about it, thanks to Emacs and org-mode. This morning, I thought about some of the reasons this journal is the most effective one for me. Here’s a list, more or less in order of importance:
If you have a written journal (a physical notebook), you got this covered. However, if you rely on the cloud, be it iCloud or Dropbox or what have you to be able to write. If you don’t have a file or a physical piece of paper on your hard drive or your shelf, it’s not truly yours - you’re renting out a service. In the case of a personal journal, this is a hard pass for me. In my case, all my files are local and can be read without Emacs since org-mode files are essentially just text.
I always have a computer around, and if I don’t, I can use my phone to open the journal file and add to it. On my iPhone, this is a bit more tricky, so I save a quick note and then copy-paste to my journal file if I really have to. Otherwise, it’s a simple matter of 5 keystrokes, and I’m there.
A journal is private. This is another reason why I won’t have it stored on any cloud, be it iCloud, Google Drive, OneDrive, Dropbox, or whatever have you. I don’t trust anyone else to stay out of my journal because they won’t - be it the temptation to dig for profiling and ads or “think of the kids” policies. I do have a backup for my journal, a local one, and a remote one on the cloud, which gets encrypted on my computer before it’s stored away in Backblaze.
This is something org-mode is actually not great at, but it works. Pictures are powerful. Memories in a flash, they also store metadata for precise location and time. Perfect for those times when you visit a location and want a quick reference to where it was and what you did. This is one area I do use the phone for and often: I can later extract map coordinates if I want to or write an address. The filename itself tells me the exact time. Pictures that go to my journal are not kept in the cloud anymore - again, I don’t trust Google or Apple with those for long storage. For my journal, it’s good enough to resize them to about 30% of their original size and compress them as a JPG, which really saves room. This is different than preserving good photos in raw forms and processing them later for printing.
That’s probably the latest “essential” requirement I have for my journal, which works well in org-mode thanks to super-links at the moment. On paper, I used to write down page numbers and write in parenthesis something like “see p 128” as a comment. The entry that I point at also gets a link to the one I’m linking from - so they are linked to each other. In org-mode, I use these links to refer to my tasks and projects, which live outside of the journal. That way I can reflect on something I did in my journal and jump directly to the event to see the task itself.
Probably the second reason (the first reason is that typing is faster than writing) why I keep a journal in a text file on my computer: my handwriting gets worse as I keep writing until I can no longer read it in the future. I’m also prone to spelling mistakes, which makes things harder to decipher and makes me think I have some form of undiagnosed dyslexia. A good spell-checker is a must. Org-mode also breaks down my entries automatically to years, months, weeks, days, and then events in those days, which makes things easier.
My movie watching habit in org-mode
Not too long ago, I organized my routines on Emacs with new habits. I’m particularly satisfied with my “watch a good movie” habit:
This chart might look confusing, but it’s simple once you get used to it.
Each colored rectangle represents a day. The exclamation mark represents the current day, and an Asterisk represents the last time the habit was completed. The green is the “good range” of the habit in days, which means I have that many days to complete the habit. For example, the head buzz habit above the movie one has today and tomorrow (one more green rectangle) to complete. A day after that is yellow, indicating the last "good day" to do so. After that, the red rectangles indicate days behind on completing the habit.
Once I mark a habit complete, the colored rectangles disappear from my agenda until I'm in range (green) again. The blue rectangle represents the days before this happens. For both the head buzz and movie habit, I have two days (two blue rectangles) after I complete the habit before I should do it again.
So, for the movie-watching habit, today is the first day to watch a movie, after I watched one two days ago. If I don’t have time, I still have about a week ahead of me (in the green).
In addition, I also started to log what movies I watched and when:
As you can see, Emacs keeps a log of when I complete each habit. I then
add a note with the movie name (C-c C-z
) in the logbook
drawer.
This is another fine example of why I love using Emacs org-mode to organize my life.
Installing Emacs from source
Thursday evening I felt smart and decided to clear some space in my boot partition on my Linux Mint computer with apt autopurge
. What this does is to clear the old kernels and clear space along with any libraries apt figures we don’t need.
The issue with this is that apt didn’t know I needed certain libraries that came with Emacs. That’s because I didn’t install Emacs with apt, but built it directly from source - to get a later version. The next day, Emacs didn’t launch and complain some essential library was missing.
The solution was to follow my instructions and install Emacs from source, but here I encountered a catch-22: the instructions were in org-mode inside Emacs, which wouldn’t launch.
Instead of taking out my laptop or switching to the Mac, I decided to deal with it sleep deprived, which is something that happens to me often. This, in turn, led to more frustration as I forgot the steps. Eventually, I gave up and went to sleep (which was the smartest thing I had done up to that point).
The next day I looked for help in Emacs IRC. The folks there helped me enough to fix the issue. Now that I have my notes again, I’m putting those here in my blog (as well as on my wiki), so I always have it handy for myself and for you, if you happen to be that sort of geek.
Here are my original instructions based on xahlee’s blog with some additional notes to help.
One last thing regarding Emacs chat on IRC: When going there using the web interface, use the UI to connect to the Emacs channel. Typing “Emacs” directly will open a new Emacs channel with you as the only person in there.
The Process:
You can now build emacs:
Evolvement Of Video Journal & Org
Over time, my journal videos (I call these j-vids, or jvids for short) got smaller. This is because I got used to use org-mode to record my thoughts. I discussed these a couple of times before.
My tasks rarely contain sub-tasks anymore. This is odd because sub-tasking was one of the reasons that initially got me into org-mode. Over time, I found that I rather leave notes where I left off and what needs to be done instead of using Keywords (TODO) for tasks in org-mode1.
The notes I take are usually brief (one paragraph with 3 to 5 lines) and are time-stamped with the most recent note at the top. This lets me know where I stopped a task and why with a quick glance. I also use such notes to indicate general mundane errands, like buying groceries. In such cases, I can also include a checklist.
The org-mode journal is a different story. This is where I let myself “spill the beans”. I’ve been on a long break from using a journal because typing it felt slow and I wanted a quicker way to record my thoughts - so I started recording myself in jvids.
But recording myself was inconvenient. I had to take a break from my workflow, record a video, name it, compress it, and save it. It required that I’ll find a quiet corner - nearly impossible to do during my day - to record for a few minutes. So out of necessity, I started to include more notes. Eventually, I felt they become too long and too personal. I needed a separation. Going back to my journal felt natural.
Now I find that typing is just slow enough to make me process what I’m thinking. I can edit what I’m trying to say, which means I can rethink of a better way to describe it. To stop myself from going on and on, I journal on specific events, not an entire day. My capture template copies the link of the event from the agenda and makes it the title, then takes me to the under it to start typing about it.
Yesterday, I noticed something interesting: with time, my rambling on videos was reduced from going on an on for an hour plus or so (and multiple videos) to shorter segments. Here’s a visual:
I reached the conclusion that my written journal is just better at keeping track of my experiences. Since I re-created the way I save my achieve files now, it also means the links from the journal to the events is never broken: I just have to make sure to refile an event from my “oh snap” thought-dump folder into the current week’s org file, and I’m good2.
I still record a short “weekly summary” on weekends, and now I find that I’m actually looking forward to it. These are now 10-20 minutes long videos in which I briefly go through my agenda and logged events and explain what happened while my memories of this week are still fresh. I then give the week a โtheme,โ like “agenda and conclusion” if I can.
This work sas a way for me to remember what happened far in the future if I want to reflect on my experiences but not look for something specific, or if I’m not sure what it is. It’s also a good way to reflect on the major events of the week after I had a weekend to slow down and process.
1 Note from 2024-09-26: today I live by subtasks and such Keywords in org-mode; they are a critical part of my organization
2 Note from 2024-09-26: today, I’m back to using a hand-written journal for summaries of personal reflections and emotions, while the more technical notes about the task are included there. Instructions for the future are kept in a separate notes folder, where I use Prot’s Denote to write them in a step-by-step format with visual aids as needed in org-mode.
Libre and clothes
When I write, I live in Emacs (with the awesome Solorized theme) inside org-mode.
With time, I found that org-mode has already made me a more efficient writer and note-taker. I write notes in every meeting now, whether it’s my"turn" or not. I write notes as I work on every solution and every problem I’m facing. I write first thing in the morning, usually about my org-related thoughts as I wake up, over a cup of Sumatra coffee (a little almond milk, one pack of sugar). Quite honestly, Org makes me feel good because it’s transparent. It’s an extension of my thoughts, continuing on one long line, uninterrupted before I stop to think a second and reflect on what I was thinking (X-q
).
There’s no pretending in Org. No fancy text, fonts, or even images. Style is only applied to function. It’s a delicate balance which, with the Solirized theme, works extremely well (by the way, the story of the man who created Solorized is quite interesting and worth reading).
Alright, but every now and then, you need to present stuff, and this means you need to “dress up” so other people can talk to you and relate. The “Normals,” so to speak, do not understand my org-mode dedication and often give me concerned looks when I type away a single long line into a blank screen. The purity is empty, and the lack of buttons and distracting elements feels threatening without GUI guidance. Fine then, I can do fancy schmancy.
Most org-mode folk I’ve read and listened to talk about LaTex. In my case, that meant a full installation, which is hugeโover 2GB. It’s not worth it for occasional usage, especially since I work in a Microsoft environment, and most people I’ll share with will need .docx or .ppt format anyway. So, for me, .odt seems like a better answer.
Two things are needed on my Emacs (version 25.2.1) for that:
Now I can create the .dot file, which I can open in Libre Writer. Ooof. Hello word GUI, with weird paper-screen restrictions look. And the white, the white! It burns us! Overall, things look excellent, but if I want to change fonts, move around images, eye-candy, etc, now I can do it without leaving Linux. Then again, if I really need to produce a document, I might as well save my .odt in Writer to a .docx and remote into my work computer, where Microsoft reigns supreme. Options. We like having them, yes?
Another option I was considering is to use Typora, a pretty markdown writer. It comes with Pandoc and can handle Word and PDF files. Typora does not feel “Linux-free” to me and seems heavily inspired by different “minimalist” Mac world processing apps if that’s your thing. It probably won’t show up in your distros and requires installation from a PPA. I used Typora for a while for markdown, but we’ve parted ways.
I’m curious how this will stand out when I present my notes (since I’ve become the unofficial note-taker at work for the reasons mentioned above).