Emacs org-mode

Welcome to the Emacs org-mode category.

You can subscribe to this category only via RSS!

I am working on restoring some of my related posts from my old blog, so keep checking here for new content.

Auto-generated description: A mythical creature resembling a satyr with glasses is sitting cross-legged in a forest setting, holding a glowing orb in front of a laptop.

    Journelly and org-mode

    Irreal likes Ramรญrezโ€™s Journelly. To each their own, sure, but after I read the review he mentioned, I’ve been scratching my head a bit. I don’t get it.

    Irreal is a dedicated Emacs user, and I estimate he uses more Emacs in his day-to-day functions than I do - so why does he feel the need to use something that is not Emacs for quick notes?

    One of my theories is iPhone usage. That’s probably a big one. Using org-mode on an iPhone is not easy. There’s Beorg, but it’s geared more toward task lists and calendars than taking notes (even though you can do that, especially if you have templates). Even better, you could include a timestamp every time you record a new note, which is one of Irreal’s needs of his requirements. I’m not sure if he wants to include voice recordings or dictate notes on his iPhone, but both of these things are pretty easy to do - exporting an audio note and attaching it to a header in org-mode is pretty straightforward and can probably be automated.

    My issue with any such apps, especially if they’re meant to capture “everything” (like pictures, short videos, oral notes, etc.), is that pretty soon they start competing with org-mode. What follows is confusion about what I put where which is usually followed by a short burnout of using either one. Then I have a period when I don’t save anything, and I regret it later.

    org-mode is not perfect, but as long as I use it, I have one place where I know I can find whatever I need. At work, I usually keep detailed notes of what I did under each header with timestamps, even if they are just a few lines long. It’s more than just recording information: the act of writing clears up my head and helps me figure out what goes next, and the “emotional memory” (for lack of a better term) reflected in the mood of my notes helps me remember things later that I didn’t think of actually writing down. I can find old records this way, even if they happened years ago.

    As I already said, to each their own. We all get to choose what tools we want to use. This is not about preaching; it’s just that his use case makes me put my Emacs thinking hat on and think about what I would do. These scenarios are interesting to solve.

    I’d love to write him an email or comment, but I can’t find an email address, and the blog’s commenting system uses Disqus, which doesn’t let me log in with any accounts I want to use. Oh well. Maybe he will find this post.

    Emacs 30.1 so far

    Upgrading Emacs is always a project, especially on macOS.

    I’ve been using Emacs Plus on my Mac since I installed version 28, but when I went to update to version 30.1 through homebrew, I got a cryptic git error. From the little research I did, it has to do with commits being in the wrong place. The explanation was something that went over my head, so I shrugged it off and tried Emacs for macOS again. I forget what was the reason this Emacs flavor wasn’t for me in the past, but it seems to work fine now. Well, after I deleted and reinstalled marginalia, exactly as Irreal mentioned. Seems to be working fine now.

    I was excited about completion-preview-mode (if Mickey is raving about something, you got to check it out), but so far, in my experience, it’s just “meh,” at least out of the box. After I got it to work in org-mode (the manual is a bit of a mess and seems to be thrown into the package itself, but I found out what to do in this YouTube video) it’s not much better than what company-mode gives me at the moment, so I’m going to wait until someone probably comes around with “actually, it’s much better because X, and you can find out how to do it over at Y,” or Mickey writes something more complete. The video I mentioned goes into some helpful examples, but I get lost in terms of how to set it up in my case.

    Then, again per Mickey, There’s “The Org URI protocol should now register automatically, meaning you can send data from a browser bookmarklet straight into org capture in your running Emacs instance.” I remember I once got it (or something similar) to work with org protocol, but a native option turned on like this seems very good, and I’d love to be able to send text and links from my browser directly to Emacs. I’m not sure how to get this to work either. I recall I need to run Emacs as a server in the background and then launch Emacs as a client, but this is beyond my current macOS kung fu. The issue with finding how is usually knowing what to look for. I need to be more specific about my research, but i’m not sure what it is I’m looking for.

    Upgrading Emacs is always rewarding because I also get to upgrade my brain with it. I learn how to do new things, and do them more effectively. I’m sure I’ll be back at tweaking pretty soon.

    back in the groove

    As I’m getting back into the “groove” of things, I started this pattern:

    1. Wake up. Switch to home clothes from PJs.
    2. Go to the kitchen, get some water, listen to the birds and think for a bit (about 10 mins)
    3. Exercise: stretches (mostly focusing on back and posture), with some push-ups and crunches.
    4. Meditation (5 mins) follows exercise
    5. Back to the kitchen to make coffee and breakfast
    6. Eat, take vitamins, talk to Nat as his morning starts as well
    7. Start working:
      1. View the agenda for the day (meetings, major projects, TODOs)
      2. Looking for Pinned emails from previous days and Reminders, combine them into TODOs for the day
      3. Start tackling tasks in my agenda (emacs org-mode), recording what I’m doing in notes
    8. Around 13:00 to 15:00 (depending on meetings and things), time to exercise, or if I’m in the office, go back home for this. No targeted goal specifically yet; it’s mostly about the routine, but I’m trying to include a jog here if I can, or weight lifting
    9. Back to work: this is a good “quiet time” to work on projects without interruption, depending on meetings.
    10. Around 18:00 or 19:00 finishing work. Nat’s back at that time, or I spend time with another partner, depending on the day.
    11. Around 20:00, I enjoy a show (these days it’s Silo) or video games (Helldirvers2 mostly at this point, but there’s also the excellent Mind over Magic I need to review soon)
    12. I usually sleep around 22:00 or 23:00. Hopefully I can keep up the 7 hours of sleep I get a night or so, which means I wake up around 6:00 the next day to start again.

    There are many points that change in this workflow (for example, if I blog, it’s usually in the morning at some point after food, if work allows), but in general, this is the outline I try to get back to.

    Once again I see the benefits of channeling all my tasks that come from emails, reminders, my calendar, phone calls, meeting etc - into my org-mode agenda, where I have one simple list without distractions of what I need to do. If it’s not there, I’m not doing it that day. And there’s always more than I can finish each day anyway, that’s just the nature of things.

    The big benefit (I’ve said so many times in the past) here is that because I log what I do, I know exactly what was done and I have a good idea of what needs to be done next. This is also very useful when there’s a new project, and you can just use the template from last time. Good stuff.

    More Emacs would be nice, but...

    Earlier this morning, when I was up between my sleep phases, I was looking for some Emacs content through irreal, one of the most prolific Emacs blogs out there. Irreal publishes a post every day, and these posts usually summarize and link other Emacs-related posts to other blogs. It’s easy to find blogs with good Emacs stuff and check their archives for even more Emacs. That’s the life of an Emacs user - learn it, tweak it, find another cool thing you haven’t thought about, learn it, tweak it…

    I would like to have more Emacs in my life, but unfortunately, it’s not easy.

    My blog archives are full of complaints about Microsoft products and web tools that I have to use because of work. I can’t use email in Emacs because logging into Office 365 for work is restricted, and no other apps but Outlook can access it (not even Apple Mail). ServiceNow, the platform we use for IT tickets, has an API, but it’s also heavily restricted, forcing us to use the browser. Communications and phone calls happen on Teams, another closed Office 365 application. It’s not even just Microsoft specifically, even though I like to blame them: it’s the cloud.

    I work with different IT departments, engineers, and managers. Usually, when app X doesn’t answer certain needs, the solution is to find a new app, which in turn is also integrated in the cloud with its own restrictions. This happens so many times that we don’t get the chance to explore the depth of one app before there’s another one. Each person brings his own new favorite app to add to the party.

    I’m guilty of this too, on a personal level. I love writing in Emacs, but my favorite writing companion, Grammarly, doesn’t work with Emacs (yes, I know there were some packages for it in the past; they were abandoned, and as far as I know, Grammarly doesn’t have a working API anymore). Micro.blog uses its own macOS app for writing content, which brings convenient integration to my other content (like my photos and saved bookmarks) that I don’t currently have in Emacs, so I just copy-paste my posts into it these days. Even good tools like being on my iPhone are not as fluid as Apple Reminders or Notes, and it’s just easier to start something there and have the discipline (this is the weak link) to bring it all back into Emacs later.

    Still, despite all of that, I love working in Emacs. It brings me peace that no other app does at this point because it’s entirely mine. I know where everything is, I know how to tweak it (or I can learn how to), and I can access its org files everywhere, even if I don’t have Emacs installed. No other application organizes my life and projects so well and for so long, and I don’t see anything replacing it in the near future.

    After yesterday’s issues, today I split my now.org into four different files: personal projects, work projects, work meetings, and blog projects.

    Thinking about how to organize the projects in those, I rediscovered org-sort. I think I’m on to something.

    More problems with my projects and meetings in org-mode

    In my capture templates, I now use prepend, which works well and puts my captured header at the top of now.org, which is what I want. The problem is that I barely use the meeting capture template I’ve made. I refile from my calendar file 95% of the time, and Refile places headers at the bottom of now.org bottom. The results: new projects are at the top, and new meetings are at the bottom. Chaos.

    I know I can reverse how Refile works, but I’m not sure I want this to work globally. I can start hacking things and write functions to refile meetings the way I want, but I’m starting to think my problem is bigger than that.

    See, the above is just the latest issue in the last week. When I was sorting through tasks on now.org I saw a bunch of TODOs that were tied to a project at one point on the project level; that is, TODOs are filed among the ACTIVE project level, floating out of their parent projects, and as some of those get old I have no idea what projects they were used to be a part of. Why did that happen and why, I don’t know.

    On top of that, I just had the issue yesterday where some of the headers lost their “**” at the start of the header, non-headers.

    I can’t trust my now.org like this. I’m frustrated, and I just want to throw every single project into its own file at this point, just because of this mess.

    I need to calm down get back to the basics and define my main workflows (meetings vs projects vs quick tasks etc.)

    How I handled projects in Emacs org-mode in 2024

    I mentioned my projects file, now.org, is getting a little bit out of control. I’ve been playing around with a few ways to organize it since.

    This is firstly a conceptional problem, one that has to do with how I organize things mentally before I can go into the technical level of how to tell Emacs to do it: a “what do I want to see?” question before a “how do I do it?” one.

    Let me start by showing you what my project file looks like now:

    A text-based task organizer (Emacs org-mode) displays various projects labeled as active, done, canceled, and deferred, complete with completion percentages.

    As you can see, a lot is going on.

    One of the issues that are already fixed in this image is having the “DONE” or “CANCELLED” projects at the end of the file. This looks more organized than having them mixed with the “ACTIVE” projects all over, and it also allows me to focus on the things I’m currently working on as soon as I open the file.

    By default, org-mode adds newly created headers at the bottom of the file. This means that every time I add another project or a meeting (an “ACTIVE” or “MEETING” in the image), it goes to the bottom of the list, right under the last header. I have to fix this manually by standing on the header I just created and moving it up with (M+โ†‘) all the way to the top. However, I recently looked for a solution and found it: adding prepend: t to my capture templates. This reverses the order, so this problem will automatically sort itself out.

    In my image, you can also see that some headers start as “Project:” and then the project’s name. This is redundant, and I hope to get rid of this soon because anything that is marked as “ACTIVE” is a project - which is defined by having sub-tasks (marked as “TODO”) under it; the idea is that a project is a large undertaking that has to be broken first to manageable parts:

    Auto-generated description: An Emacs org-mode screen capture shows a project management interface with tasks, status updates, and some completed and pending items.

    I write notes under each one of those sub-task headers (as you can see under the first one). I also find it helpful to attach relevant files (in this example, the Reserved IPs header has an Excel sheet containing details). I find that it’s easier to find files through Dired on Emacs than it is looking for them in my work’s OneDrive because they are tied to the project in the right place and arranged by date at the same time by my header’s ID (I changed that from random slugs to date-formatted IDs in the past). I can also jump directly to the directory with those files with C-c C-a F, and then use the open command on macOS (M-x !open) to open it with the default application.

    Most of the projects in both images have a percent to completion next to them. Since I usually don’t know what a certain project requires to complete when I start it (what subtasks are required or how many), this is more of a general guide, if anything. Still, I like knowing how much of a project is already done. The percent cookie is an feature built into org-mode1.

    Not in the images yet are emojis. I’m playing with the idea of including a small person emoji (๐Ÿ™‹โ€โ™‚๏ธ) in “MEETING” headers to make them stand out a bit more. Meetings, as it turns out, are a special kind of project. It’s a place where a lot is going on at once, and I mark a “MEETING” as “DONE” only after all the actionable notes are distributed to tasks. Meetings can include tasks that start a whole new project or fit into existing ones. It’s also possible to meet about a certain project, so the “MEETING” header needs to be refiled under an existing project later as one of the subtasks. Meetings can take a long time to break down and follow up on, making them a project in themselves: this is why I found that giving them a dedicated keyword is a good way to handle them2.

    Another thing I added to the projects’ capture template is clocking in as soon they’re created with :clock-in t. I often forget to clock out later, but I want to keep trying and build this as a habit. If I create a clock with a project, Emacs creates a :LOGBOOK: line for me with the time I started working, and I can correct the hours later. This is another area where it’s more of a guide than critical information: it’s often inaccurate (because I forget to clock out and then in again), and also, it doesn’t matter to me if I work half an hour more or half an hour less on something. It’s more of an indication of how much time a certain project took and how often I worked on it during the week.

    Projects are also tagged with people I regularly work with. I know some folks (and I get to know many more) personally. When this happens, it’s helpful to see recognizable projects and tasks tagged with names I know. Since tags are hereditary in Emacs, an entire project can be tagged with a person if it’s required, but usually, I need different people for different subtasks of a certain project, depending on what I do. This is helpful to see how much I am working with a certain person, what on, and what that person does. I also have another file for people I work with, along with their names, their ID, their department, and what they do; it’s my useful “I know a guy” file I can tap into when I need someone to do something or when someone else asks me if I know how to handle a certain thing. I then can say, “I don’t, but I can find someone who can for you.” Helpful.

    I can add a couple more things here, but this is probably a good place to stop. If you have any questions or suggestions, feel free to comment! I’d love to hear from you.

    Footnotes

    1: It’s also worth noting that half of the time, I need to “re-ACTIVE” a project marked as “DONE” because of a new development or because it would happen again and might become more of a routine. This means new “TODO” tasks are added below, and the percentage goes back down from 100%, so, yes, this is more a visual guide than anything concrete.

    2: I use at least two (but sometimes more) datestamps in a “MEETING” project. The first time stamp is usually before the meeting takes place: this is where I write down a list of bullet points I want to bring up and discuss. The second timestamp takes place during the meeting (I type while people talk, and I ask them to slow down or wait if I need to (by the way, this is something that worked horribly for me with a notebook: my attempts and my attempts at something that looks like handwriting in meetings while rushing were laughable at best. I missed critical points that way). The second timestamp then becomes an indication to look for actionable items later. Since I write these notes in bullet points, it’s also easy to copy them back into Outlook with minor editing to leave a summary or meeting minutes later.

    my Emacs projects file (which I call now.org) is becoming too big. The agenda is still snappy, and I can work with it, but it just looks like a pile of “stuff” that I need to do or did. I want to organize it better somehow…

    #emacs #orgmode

    I just typed away in my journal for an hour:

    Region has 32 lines, 16 sentences, 1574 words, and 8124 characters

    Man, I have to use more periods. Too many run-on sentences.

    Not something I could do in my handwritten journal. It would take me a week, especially if I want to be able to actually read what I wrote, and not have crazy cramps in my right hand.

    I still want this to be physical somehowโ€ฆ maybe I should just print it? I don’t know.

    Filtering org-agenda to *exclude* a category

    Back in July, I explained how I use Beorg to sync my calendars. To recap, Beorg continuously exports the iOS calendar into a read-only org file, which I then sync to my Mac’s desktop through iCloud.

    The calendar.org file shows on my Emacs agenda, where I can see both my Outlook (work-related) meetings and my Gmail (personal) events. This is very nice, but because the calendar.org file is read-only (as it should beโ€”it keeps being overwritten by the Beorg every time the iOS calendar syncs), I can’t use it for anything besides this visual information.

    If I want to create a project from a meeting and add notes and sub-tasks, I have to copy the event from my calendar.org file to Now.org, where I keep my current projects and tasks. There, I can add notes and headers.

    But then there’s another problem: when I copy my headers over to Now.org, my agenda shows duplicates - one event header comes from calendar.org, and the other comes from Now.org after I copied it there. Here’s what it looks like:

    Auto-generated description: A digital calendar displays scheduled events including reviews, onboarding huddles, and meetings, with some marked as DONE or MEETING.

    When I start my day, it’s important that I see calendar.org so I can copy over details to now.org. Once I’m done, however (clearing the Calendar tag, adding a keyword like MEETING, and cleaning the text under the header from details I don’t need), I no longer need to see calendar.org, and I want it to disappear.

    I was looking around for a solution to this problem, and of course, it was right under my nose. Org-agenda comes with the option of narrowing down (filtering) the agenda to a category at the point with <. What I didn’t know is that C-u < does exactly what I want: the opposite of the above. It hides the category selected. Problem solved.

โ† Newer Posts Older Posts โ†’