Kiran's Website

Doom Emacs and Transient

2025-05-18 Sun - I've declared Emacs bankruptcy yet again and this time I decided to try out Doom Emacs. I'm pretty happy with how consistent everything is so far. Another new thing I'm trying is transient. I have created hydra in the past to help with some workflows but I'm liking the simplicity of transient much better.

I take a lot of notes using org-mode which should not be a surprise for most Emacs users and my system is fairly simple. I just have an Inbox file where I capture notes and top level headings are dates.

* <2025-05-18 Sun>
** Meeting with XYZ                                       :project-x:planning:
- Do A, then B, then C
- Follow up with UVW

This makes it very easy to capture things without thinking about where notes need to go in the moment. I have found a lot of value in reviewing notes though and tagging, and refiling, them is how I process them. Occasionally I have to create new todo items when reviewing notes as well.

The transient I created to help with my review looks like this

(transient-define-prefix my/org-review ()"A prefix for commonly used commands during an Inbox review"[["Navigation"
│ │ ("n"
│ │ │"Forward Element"
│ │ │(lambda ()
│ │ │ │(interactive)
│ │ │ │(org-forward-element))
│ │ │:transient t)
│ │ │
│ │ ("p"
│ │ │"Backward Element"
│ │ │(lambda ()
│ │ │ │(interactive)
│ │ │ │(org-backward-element))
│ │ │:transient t)
│ │ │
│ │ ("u"
│ │ │"Up Element"
│ │ │(lambda ()
│ │ │ │(interactive)
│ │ │ │(org-up-element))
│ │ │:transient t)
│ │ │
│ │ ("d"
│ │ │"Down Element"
│ │ │(lambda ()
│ │ │ │(interactive)
│ │ │ │(org-down-element))
│ │ │:transient t)
│ │ │
│ │ ("t"
│ │ │"Set tags"
│ │ │(lambda ()
│ │ │ │(interactive)
│ │ │ │(org-set-tags-command)))]
│ │ │ │
│ │["Projects"
│ │ ("x"
│ │ │"X"
│ │ │my/org-x-review)]]
│ │ │
│ [:class transient-row
│ │ │ │ │ ("q"
│ │ │ │ │ │"Quit"
│ │ │ │ │ │(lambda ()
│ │ │ │ │ │ │(interactive)
│ │ │ │ │ │ │(message "Finished review"))
│ │ │ │ │ │:transient nil)])

my/org-x-review doesn't have much at the moment, just an option to refile to a file named x.org. I