Mindfulness in Emacs
How I keep my peace comfortably
Written October 11ᵗʰ, 2026
Apps don't like to just sit there and do nothing. Social media wants to make you angry or fearful. It's getting more and more difficult to keep up with things without being disturbed. Besides tech, some day-to-day happenings also disrupt my peace. Gum stuck on the bottom of my shoe. Rotten roadkill. A slight altercation with a stranger. Bad sleep.
Lately I've taken to paying a lot of attention to my mental state. I don't want to let arbitrary things derail my day and undermine my plans. Most of my day-to-day is mindless such-and-such, but when I need to be sharp, I want to be ready. When I need some resolve, I want it to be there.
After trying all sorts of mindfulness practices, some stuck and most didn't. Some are hit and miss. Like journaling. When it happens for me, it's incredible. Everything about life and the universe becomes a clear and simple matter. And then it doesn't work anymore.
Of those that stuck, habit tracking is the most important to me. With habits, my goal is to just show up and do the minimum. It's easy, and doesn't make you feel awful for not perfecting things. I'm using the latin word for perfect (perfectus) in the sense of "completed through and through". I like half-assing things if it means I've shown up.
Habit tracking has been disastrous for me whenver it involved checkboxes. Checkboxes are satisfying to tick off, and merely setting them up by breaking down tasks makes you feel all organized and productive. Nothing is more depressing, however, than looking back at your home-screen where you had pinned your todo list and realizing you hadn't paid attention to it in days. There's also the little anxiety spike of waking up to an unticked list of todos.
Since this is all about keeping peace, I've resorted to a log based habit system. Instead of ticking things off from a big intimidating list, I record things into a file tucked away. I don't need to see what I have yet to do. I know it in the back of my head. If I don't, it's a sign that the habit doesn't mean anything to me anyway.
As of right now, I have the following code in my Emacs to help me:
(defvar my/habitfile "<habitfile>")
(defvar my/habits
`(("Math" . t) ("Pushups" . nil) ("Meditation" . nil)))
(defun my/habit--log (habit note)
(append-to-file
(format "%s %s%s\n" (my/datetime) habit (if note (format ": %s" note) ""))
nil
my/habitfile))
(defun my/habit-log ()
(interactive)
(let* ((choice
(completing-read "Log a habit: " my/habits nil t))
(note (alist-get choice my/habits nil nil #'string-equal)))
(my/habit--log choice (when note (read-string (format "Note (%s): " choice))))))
For some habits, I just log that I showed up. For other's I leave a note of what I did. For exercising, I'm satisfied if I just show up consistently, so I make an active point of only checking in.
For studying, I make note of exactly what I studied so I can look back on it on the weekends. How To Read has taught me that one should be able to recite the narrative and not just the elements, and looking back at what I've studied helps me keep the story fresh and in tact in my head. I don't write a detailed note though, as that is more suited to a dedicated journal entry.
Speaking of, you'll notice I don't make journaling a habit. Some things don't need to be habits, and are better enjoyed as they come naturally. As preachers of journaling always say to make it a regular habit, it was tricky to recognize what works best for me; what journaling means to me.
Habit forming begins with making the habit mean something. If you're just in it for the end result, good luck showing up on a bad day. I've enjoyed a great deal of success by identifying with the action of the habit, rather than dreaming about the future result. Instead of "I do this because I want to have tight abs." I think "I am somebody that exercises." I sleep better at night.
Oh, and journaling isn't that complicated either:
(defun my/journal ()
(interactive)
(let ((bufname (format "%s.txt" (my/datetime))))
(generate-new-buffer bufname)
(switch-to-buffer bufname)
(cd "<journal-dir>")
(text-mode)
(insert "")))
Reducing friction is a big part of this. I've had all complicated intricate systems for note taking and project management and so on, but it adds so much … stickiness … I can't put it any better than that. If you're like me and you've tried it all, you'll know the feeling. Point is, the simpler the better.
All this has come to me after reading the abstracts of a few cognitive science papers and immediately making life decisions. If you're more knowledgeable or have something to add regardless, feel free to contact me or leave a comment wherever I've decided to post this.