Streamlining Navigation in Org-Mode using an adapted org-goto

January 18, 2025

Navigating through lengthy org files can sometimes feel cumbersome. To address this I have tweaked org-goto to be a little more usable through the minibuffer completion system to jump to any org heading.

I have been aware of the org-goto command for a while now, which technically, allows for the efficient navigation through an org file. Every now and then I give it a go, but it just feels clunky and some of the keybindings don't quite feel intuitively Emacs for some reason.

Now my org files are getting more elaborate, I would like a better way to navigate and especially through the hierarchy of headings.

What about org-imenu-depth I hear you say! Well as far as I can tell, this allows stepping through to a defined subheading level but while going through multiple menu/hierarchical selection steps. For efficiency, I would like a way to flatten the subheadings for a one-shot completion selection method. This is where org-goto can actually be adapted to satisfy this need, and I think leverages the org refile menu system.

Ediff Comparing Regions

January 8, 2025

ediff is one of my favourite tools in Emacs and I have recently found myself not only using ediff-buffers and vc-ediff often but also now having the need to compare two regions.

Emacs Quick Window Pt 4 - Further Tweaks

January 3, 2025

Previously, my/quick-window-jump was geared mostly toward managing two or more windows. The behaviour was straightforward:

  • If two windows were open, the function would directly jump to the other window.
  • For more than two windows, a key selection interface would allow you to pick a window to switch to.

However, the function didn’t handle a single-window scenario intelligently. A horizontal split from a single window is something I do very frequently, by frequently, I mean at least every minute! This split is currently bound to its own keybinding, but couldn't my ace-window defun clone do this? For example, I find that the transition from a single window to a split never happens vertically for me, so why not make my/quick-window-jump perform a horizontal split from a single window and then move the point to that window?

In addition, it is very rare for me to vertically split into more than two columns. I could probably drop my current horizontal split keybinding now. If I do require another horizontal split, the default C-x 3 is already bound to muscle memory.

Lets take this function to the next level of convenience, with a very simple change, simply an extra (length window-list) and the relevant logic.

Exploring Static Website Publishing with Org Publish

December 27, 2024

As someone who enjoys using Emacs for almost everything, I recently began exploring an alternative Emacs-native method for publishing static websites.

Currently, I use [ox-hugo](https://github.com/kaushalmodi/ox-hugo) to build a static site from a single Org file, and it works beautifully for exporting content to Hugo-compatible Markdown. However, I wanted to create a backup web generation system entirely within Emacs that doesn't rely on external tools like Hugo and might fit into my overarching Emacs Enhancements project concept.

My Emacs Enhancements project focuses on replacing significant external packages that I commonly use with a collection of simple Elisp functions and built-in functionality. This approach is ideal for situations where I run Emacs on an air-gapped system or even on Windows, where I have found package management to be somewhat unreliable. You can check out my progress on [GitHub](https://github.com/captainflasmr/Emacs-enhanced).

Calculate Number Of Days Between Two Dates

December 19, 2024

Just a very quick one today.

I recently needed to find the number of days between two dates. I thought this would be easy in Emacs, and indeed it was, but as with most things in Emacs, you need to know exactly what you're doing. Here is the method I used:

Emacs Quick Window Pt 3 - jumping between two windows

December 13, 2024

The original implementation of my/quick-window-jump worked perfectly for multi-window setups. It enabled you to assign character labels to each window, display them as overlays within the windows themselves, and jump to your desired window by typing its corresponding key. However, for setups with just two windows (a very common scenario in Emacs), this process felt unnecessarily complicated. Why go through the entire label-assignment process when a single key press could suffice?

Shrinking and Widening Org Tables

November 28, 2024

This post is more of a note to myself, something I can store in my single emacs blog org file, so if I forget again, I can quickly search.

I keep forgetting the keybinding to shrink and expand an org table.

I often define tables to have a narrower width than content using the <num> concept in the top line of the table, but when I want to expand, I just can't remember the keybinding.

A search in *help* for org-table-shrink and org-table-expand reveals nothing!