* DONE Doom Emacs Housekeeping Adventures :blog:tech:text: :PROPERTIES: :ID: doom-emacs-housekeeping :CREATED: [2025-09-17 Wed 09:33] :END: :LOGBOOK: - State "DONE" from [2025-09-17 Wed 09:33] :END: I am quite glad that nowadays, my Arch Linux machine "just works". The last time rolling updates broke my machine is years past. Looks like it is growing up with me, which is good - cause I could not sustainably spent that time fixing my system that I did when I started studying a few years ago. Same thing goes for my Doom Emacs - made the switch years ago (though I still use neovim on the side) and mostly just use it. But this morning, I felt inspired to do some housekeeping, sparked by a simple debugging session: ** Filenames and Modes I was debugging an issue with generating my jrnl config using yadm, so that I could also use it on my partners macbook. Then I wondered whether I could enable yaml syntax highlighting for my ~jrnl.yaml##template~ and for that matter any yadm alternate files that I work on. A quick Perplexity-search later which needed only one adjustment prompt, I added this snippet to my config and it worked :) #+begin_src elisp (defun major-mode-based-on-trimmed-filename () "Set major mode based on the portion of the filename before a #." (when buffer-file-name (let* ((original buffer-file-name) (trimmed (if (string-match "\\([^#]+\\)" original) (match-string 1 original) original))) (setq buffer-file-name trimmed) (set-auto-mode) (setq buffer-file-name original)))) (add-hook 'find-file-hook #'major-mode-based-on-trimmed-filename) #+end_src Will see whether I may trim more suffixes in the future. For those who are interested, I also [[https://forge.ftt.gmbh/janek/dotfiles/src/commit/72f2c2253bd2216f30c4b11c0d575f32f68fa47f/.config/nvim/ftdetect/hashtag.lua][implemented the same in neovim]]. ** File Management yazi picpicket dirvish ** Org-mode Flags Configured [[http://gnuplot.info/][gnuplot]], which allows me to execute this: #+BEGIN_EXAMPLE #+begin_src gnuplot plot x**2 #+end_src #+END_EXAMPLE And get the plotted function in a graph - no more switching to Wolfram Alpha for quick previews ;) I found this to be a good introduction into the syntax: https://www.cs.hmc.edu/~vrable/gnuplot/using-gnuplot.html