Emacs org-mode
Rethinking and organizing my life with org-mode (part 3?)
I spent some time reading through the manual for part 3 of organizing my life in org-mode. org-mode has an archiving function I haven’t bothered with in the past because dumping old files into a folder was easier to do.
There was this interesting example under org-archive-subtree help text:
“~/org/datetree.org::datetree/* Finished Tasks” The “datetree/” string is special, signifying to archive items to the datetree. Items are placed in either the CLOSED date of the item, or the current date if there is no CLOSED date. The heading will be a subentry to the current date. There doesnโt need to be a heading, but there always needs to be a slash after datetree. For example, to store archived items directly in the datetree, use “~/org/datetree.org::datetree/”.
Ah ha! So you refile a task and put it away in a different file (this is what archiving does by default in Emacs) and store it in its appropriate month. Not only that, the function will look for when you finished working on a project and automatically store it on that date in a header of your choosing. Good stuff.
For example, let’s say I started to write a technical document at work about pink rabbits (I’m in a good mood, OK? Bare with me, I’ll get grumpy soon enough) and this project includes a couple of subheaders: a meeting we had about the project, a task to backup the existing version of the document, and a couple of more TODOs regarding images and sending it for approval by subject matter experts. So far so good, this starts in Now.org where I keep working on the project and add to my notes.
Let’s continue with the example. Two months later, I’m done with the pink rabbits projects. I go to the parent header in my Now.org file, “update Pink Rabbits document,” and change its keyword from ACTIVE (my keyword for projects) to DONE. Since I have the keyword “ACTIVE” defined with ! in the file’s options (this is defined by the line #+TODO: TODO(t) ACTIVE(a!) MEETING(m!) | DONE(d!) CANCELED(c) at the top of the file - you can see ACTIVE is triggered by a! while its neighbor, TODO, is only t which means a timestamp will not be added), org-mode adds a timestamp for when I marked it DONE.
There are three basic scopes of defining where to put the archived headers. I can define one file in my init file for org-archive-subtree, which will create a global definition and thus a file for everything (not very useful), or I can define the destination for the archive at the top of the org file (so Now.org will have a line: #+ARCHIVE: my/path/is/here), or, I can go into the individual headers and define it there as a property with Archive: my/path/here. This last one is best for me, as I can quickly define headers for, say, article updates, announcements, and misc, each one of these parent headers pointing to a different file, if I want to do that. Nice indeed.
With the datetree option above, these archived tasks will be filed in these files and under the date and time I finished the project. The archive function will include properties in each telling me exactly where these projects came from.
I was about to start using this, but there’s only one problem… I haven’t found out how to restore something back from the archive.
Back to the example. Say I thought we were done with our pink rabbits document so I archived it away. Then, next month, someone says “Hey, JTR, we need to mention the catapults we’re implementing with the pink rabbits. Can you add it?” I say “Sure, no problem!” After all, I have the power of Emacs and it takes me less than a minute to find this project in my archive (consult-grep is amazing for this sort of thing).
So go to the archive file, I find it, and… I want to pull it out of the archive and put it back into my Now.org as one of my active projects… but… how do I do that?
I can be barbaric and go around killing and yanking, but there must be a better way, right? I think? Grrrr… (see, back to my grumpy self).
Rethinking and organizing my life with org-mode (part 2)
The other day, I mentioned how my projects file in org-mode is basically a huge mess that makes it difficult to be on top of things, and then an idea occurred to me during a shower, as all good ideas do: organizing is important when I save and store things, not when I’m working on them.
When I work on something, I deal with a dynamic environment with tasks, reminders, attachments, comments, and a bunch of other things. This is the information-gathering phase. The main point is to collect everything quickly so I have it available later. It’s when I’m done with a project that I need to clean it up and store it in its place so I can find it later.
I was considering (still in the shower) the “now page” phenomenon. What if I change my project.org file to now.org? Technically it will look the same but conceptually it will be different. A place for things I’m actively working on in the present moment.
The real change should take place in the org files I save my projects into. Work projects will go into dedicated files, depending on the kind of task. Personal things will fit into their own files. As a matter of fact, the work-personal separation is not as important as it used to be, as each activity (work or personal) gets a separate file anyway.
For example, if I’m working on a vacation in now.org, I have a project with the location, the hotel, a map of the area, a couple of places to see, and a packing list. When the vacation is over, it will go into an events.org file under a “vacations” header. When I place it there, I will also include a link to the photos I took, tag it with “journal” if I wrote about it in my journal, and add a couple of annotations to the map, depending on where I’ve been.
In the future, when I want to reflect on the vacation, I will know exactly where to look. Keeping these files small is important so they don’t become overwhelming. An indicator for that could be casual reading: Can I just open the file, read through it, and enjoy it? Maybe even make it into a PDF and print it? The answer to these questions should be yes.
The trick is to know when a certain “thing” happens often enough to have its own file. For example, would I need a vacations.org file, or is events.org (which also includes going out to restaurants and movies) good enough?
For this, I think the size of the file itself could be a good indicator. In org-mode, the files contain only text. So if a file contains more than, say, 50KB, it means it has 50,000 characters. This roughly translates to 7,000 - 10,000 words. Since the characters in org-mode are also symbols for syntax for meta information, I think this is a roughly good number for now; I can always adjust it later.
This concept also works when I’m happy with the category the file captures, but as it grows, I can split it by months or years. For example, if events.org is good enough to capture vacations, restaurants, movies, and other social gatherings, and I want to keep it this way, I should have event_2024.org, and then make events_2025.org, etc. It’s possible some things, like certain work activities, will need to be broken down every couple of months while other personal tasks only every year or even only a couple of years.
I started storing some of my completed tasks yesterday, and I slowly chipping away at my big projects.org mess. As I go through it, I will get a better idea of how it’s working and if I feel like I am back in control again. Since I need to wipe my Mac and start fresh (this is a story for a different time), I will have a nice clean start this weekend. That’s the goal, anyway.
Rethinking and reorganizing my life - with org-mode
I used to be more organized. At least, that’s what I think.
When I was working as a desktop technician, I added all my tasks into a file called “Oh Snap,” which I cleared every week. Every Monday morning, I would go over my Oh Snap file and archive done tasks, remind myself of and write notes of existing tasks, and make sure a weekly backup was created.
In my current role, my tasks mostly grow into projects. Besides some quick things, like creating an announcement or an alert for our website, these projects usually take weeks; some even take months. Going over my Oh Snap file every week stopped making sense.
But when I stopped my weekly routine, I also stopped organizing tasks. Now I have one big file mixed with personal and work tasks, some active and some complete. It’s an intimidating blob of “stuff,” and just looking at it makes me want to run away to a video game instead.
I also write less about what I do in my personal life unless it’s complicated enough with several todos and a packing list or if I have the itch to write, which is when I pull out my journal. This means that a lot of useful information never gets saved. Things like map snippets with locations (easy in Emacs), links to pictures I took with descriptions, and the people I got to know - all of that is not written and gets lost.
This made me realize that the weekly routine around my Oh Snap file was one thing; organizing different tasks and events into categories is also important. I don’t mean just “work” and “personal,” which are too vague and big to work with. Categories should be a rough outline of familiarity, a way to frame and save things for better retrieval later. For example, “vacations” might be a better category than “events” (too general), and both are better than just “personal” (way too general).
A good category is like an apartment building where I know certain past events happen. If I want to see pictures of my niece from last Thanksgiving, a “family” or “holidays” category would make sense; at work, if I want to recall when I created certain announcements for the website, then “website” or “announcements” is a good category for that.
So now I’m trying to figure out a couple of things. First, when should I visit my projects file, which is a dump of everything I do, and move things out into their categories. Second, what are these categories? We shall see what I come up with.
I’ve updated my Microsoft Edge notes, after working with it for a couple of weeks. If you use Office 365 for work like I do, here’s a tip: Maximize (but don’t go full screen!) when working with Edge. Read more in the full article linked above.
For Emacs org-mode users, two tips in two new notes: linking to other org-mode headers and plain lists to checklists in org-mode.
As always, you can access my welcome note and read all my notes there.
I'm retiring my Android from my org-mode workflow
I feel a bit weird disconnecting my Android from my work tasks and projects in Syncthing and thus cutting it off from my Emacs workflow, but it’s about time.
I haven’t used my Android for work notes in months - probably a year. I keep having syncing conflicts with Syncthing between the Android and my Raspberry Pie, which still serves as my file server after four years (I love this thing!), and there’s no reason for those anymore. I use my Mac for Emacs 80% of the time nowadays, and I want to include my iPhone in my workflow now so I can use it to record org-mode notes, and the iPhone doesn’t play with Syncthing.
Since my iPhone is my work phone, it makes sense to me that work-related notes are synced to my iCloud, as these are not personal or private, and I want to be able to create org-mode notes on the go again. Apple’s Notes is nice and all, but it’s no org-mode, and it’s not private.
The issue I had yesterday with Elfeed-org is fixed. As it turns out, the parent headers for the feed have to be tagged with “elfeed” for the feeds to load correctly. It looks like this:
* Blogs :elfeed:
** Blog 1 feed here
** Blog 2 feed here
** Blog 3 feed here
* News :elfeed:
** News site 1 feed here
** News site 2 feed here
** News site 3 feed here
That’s all that was needed! Thanks again, takeonrules!
And here is what my RSS list looks like in action. It’s nice to sit back with a cup of tea (coffee is a morning thing!) during lunch break and see what’s up:
Scratching my head at an Emacs issue: Elfeed-org doesn’t seem to load my feeds. I’m not sure why, everything looks OK. I have my feeds.org and I have the path defined in rmh-elfeed-org-files and it does show the value it’s supposed to have.
Does anyone have a working config I can look at?
Another little gem I’ve been using for a while: org-toggle-narrow-to-subtree. I added an explanation to my emacs config:
Macro I created to focus on projects (headers in org-mode) that gets everything else out of the way. The idea is simple: when standing on a sub-header (in my case, this is usually level three. For example, I’m standing on “pay electric bill” in: * Personal > ** ACTIVE pay bills > ***TODO pay electric bill), jump to its parent (in this example, “pay bills”) and narrow. When running again, expand it back. This is working by using org-toggle-narrow-to-subtree. Very useful when working in a buffer with several projects.
(fset 'jr-project-focus
(kmacro-lambda-form [?\C-c ?\C-u ?\C-c ?n] 0 "%d"))
I wanted to fix company-mode for Emacs, and on the way I remembered that was something Emacs already comes with. Yep, and it has a name you’d not guess in 100 years: hippie-expand. Added to my config. See Mickey’s post about it if you don’t believe me.
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