June 9th 2026 - Interesting Finds

Emacs run a command at a specific scheduled time

Emacs has a built in scheduler.

(run-at-time
 "9:57am" nil
 (lambda () (start-process
             "sound" nil
             "/usr/bin/afplay"
             "-t"
             "0.25"
             "/System/Library/Sounds/Blow.aiff")))

Disable Evil for a specific mode

We can use (evil-set-initial-state) to disable Evil for a specific mode.

Example:

(evil-set-initial-state 'dired-mode 'emacs)

Emacs set env variables

This can also be used in terminals spawned inside of Emacs.

(setenv "TESTVAR" "This is a test")

Emacs Bookmarks

We can set bookmarks in files and visit them later.

  • bookmark-set - Create a new bookmark
  • bookmark-save - Save all created bookmarks
  • bookmark-jump - List bookmarks and navigate
  • list-bookmarks - View bookmarks for editing
  • bookmark-delete - Select and delete a bookmark

Reference

MacOS view extended attributes of file

We can use the following command to see extended attributes of a file:

ls -l@ filename

Org Mode narrow to a heading or subheading

We can use (org-narrow-to-subtree) to show only the current heading or subheading of an Org Mode tree.