DEV Community

Jeremy Friesen
Jeremy Friesen

Posted on • Originally published at takeonrules.com on

My Lesser Sung Packages of Emacs

Spending a Bit of Time Sharing Some Perhaps Lesser-Known Packages

There are several packages that I consider vital to my Emacs experience:

Yet those packages are often celebrated and explained. In this blog post I want to dive into some of my lesser sung packages.

The Lesser Sung Heroes of my Emacs Configuration

The following nine packages are just a few from my Emacs configuration:

Deadgrep

I only brought the Deadgrep package into my Emacs configuration. Previously I had used a combination of the Embark and Wgrep.

Deadgrep provides an interface
Via a dedicated buffer
to see and edit the results as well as refine the parameters of interaction; thus creating more of a “work space” for the task of finding, refining my criteria, and possibly updating the found entries.

Denote

The Denote is the back-bone of my Personal Knowledge Management (PKM) system. I once used and still love Org-Roam, but , I started exploring.
I wrote about
Exploring the Denote Emacs Package.
By convention, it uses the filename of a note to encode the note’s metadata.

These concessions improves the collection of notes’s portability. And makes extensions on top of those conventions.

Org-Roam and the recent Emacs Knowledge Graph are interesting alternatives, but thus far, my emerging use-case appears well-served by the Denote.
Each of my blog posts are a Denote Org-Mode formatted note that I export to Hugo via Ox-Hugo. The benefit is that my public and private notes can reference each other, without needing to publish my private notes to the web.

Expand Region

I stumbled upon the expand-region package early in my Emacs adoption. I use it frequently to expand or contract my current selection to the next semantic selection.

In text files the semantic units are:

  • word
  • sentence
  • paragraph
  • document

In programming files those units are:

  • word/symbol
  • function definition
  • class definition
  • file

This helps me quickly select for cut and paste, formatting, extraction, or whatever.

Fontaine

The Fontaine package helps me manage my fonts for different modes of work; I’m often coding and blogging in my editor, so I don’t switch fonts much. But I find it useful when switching to an extended pairing session or presenting a “slide deck” in Emacs.

It’s a narrow focused package that gets things very right.

Git Link

I use the Git Link package all of the time: when I’m pairing, writing a blog post, writing up a commit message, reporting an issue, trying to help a team member orient to the code.

I like that git link creates a link that is for the current SHA of my local repository; which helps create a more durable context.

I use the Git Link package in my Custom Org-Mode Capture Function for Annotating Bad Code.

Grab Mac Link

I use the Grab Mac Link package to help me quickly grab the current “page” of a MacOS application and write it as a link in the current document.

I have further extended the Grab Mac Link package to quickly file the “page” away as a Denote note. Thus allowing me to:

  • Annotate and comment on that page
  • Find back-links to that resource

All in service of helping me grow my digital garden.

Link Hint

I use the Link Hint package to quickly open links found in my text editor. When I invoke the link-hint-open-link, it finds all visible links in my editor’s view port.

Where there’s only one link, it opens that link in the registered application (e.g. an http link will open in my OS ’s default web browser). Where there are multiple links in the view port, each link will be annotated with a letter. When I type one of the annotated letter’s, the link opens in the registered application.

Titlecase

Sometimes I’m surprised how much I use the titlecase package. Often when creating blog post titles and sub-titles, but also simply when working on local reports, estimates, and other documents that have headlines.

This package allows you to specify a title style guide from the following list:

  • AMA Style
  • AP Style
  • APA Style
  • Bluebook Style
  • Chicago Style
  • IMDB Style
  • MLA Style
  • New York Times Style
  • Sentence style
  • Wikipedia Style

I’ve chosen the Wikipedia Style for my default title case behavior. I invoke titlecase-dwimDWIM functions in Emacs are typically a function that attempts to determine the current context and then dispatches to the function most related to the current context. There is titlecase-line, titlecase-region, and titlecase-sentence. The titlecase-dwim function determines which one to call. and presto, I have a conformant title.

TMR

I spend a lot of time in Emacs. And have grown to appreciate the tmr.

I can easily ignore my calendar application adding a notification. Yet when Emacs alerts me to something, I pay attention.

I use the TMR May Ring to set a timer in Emacs, providing an optional description. And when the timer stops, Emacs sends me a notification.

Conclusion

My Emacs configuration reflects my personal understanding and usage of Emacs. It’s a place where I maintain, grow, and groom the functions that help me better tell my computer what to do.

I also use this configuration as a chance to explore and practice a Lisp dialect.

Post Script

While writing this blog post, I made extensive use of my jf/menu–org-capture-safari function:

(defun jf/menu--org-capture-safari ()
  "Create a `denote' entry from Safari page."
  (interactive)
  (require 'grab-mac-link)
  (let* ((link-title-pair (grab-mac-link-safari-1))
         (url (car link-title-pair))
         (title (cadr link-title-pair)))
    (jf/denote-capture-reference :url url :title title)))

Enter fullscreen mode Exit fullscreen mode

This helped me create a Denote note for each of the packages. Now, as I write more about those packages (or not), I’ll be able to build a list of references.

Further, if I were to move back towards a Literate Programming Emacs configuration, I could then use those notes to be the source of my configuration code.

An odd realization that I don’t plan on acting on, but I can begin to intuit how I might prefer that.

The above function, along with its siblings and cousins, helps ease my decision-making in regards to “Where do I put this thing that I want to later file away?”

Top comments (1)

Collapse
 
rajasegar profile image
Rajasegar Chandran

Great list of packages, thanks for sharing