Flaky Goodness

Emacs ibuffer live update

September 14, 2025

Inspired by a a recent post by The Emacs Cat about their ibuffer configuration, I was wondering why the ibuffer didn’t update live as buffers were created and killed. With some help from Prot here is a way to hook into the relevant function in Emacs to update the ibuffer list any time the list of buffers changes. The real-time feedback makes managing a large number of buffers more pleasant.

This code sets a timer to start every time the buffer-list is updated. The timer is debounced, so that it only fires once even if a number of buffers are updated one after another. When the timer fires, any ibuffer that is currently open gets refreshed. Very nice.

(defvar my/ibuffer-refresh-timer nil
  "Debounce timer for ibuffer refreshes triggered by buffer list changes.")

(defun my/ibuffer-refresh-start-timer ()
  (when my/ibuffer-refresh-timer
    (cancel-timer my/ibuffer-refresh-timer))
  (setq my/ibuffer-refresh-timer (run-at-time 0.2 nil #'my/ibuffer-refresh)))

(defun my/ibuffer-refresh ()
  (setq my/ibuffer-refresh-timer nil)
  (when-let ((buffers (seq-filter
                       (lambda (buf)
                         (with-current-buffer buf
                           (derived-mode-p 'ibuffer-mode)))
                       (buffer-list))))

    (dolist (buf buffers)
      (with-current-buffer buf
        (ibuffer-update nil :silent)))))

(add-hook 'buffer-list-update-hook #'my/ibuffer-refresh-start-timer)

All posts

2025-09-14Emacs ibuffer live update
2025-02-02Quickly summing up the whole stack in Emacs Calc
2024-10-29Setting up an iPad as a dedicated sketchbook
2024-09-19Battery Service
2024-08-28Speeding up Emacs Lisp functions by disabling garbage collection
2024-08-19Failing to share the benefits of using Emacs
2024-08-17Upgrading to Emacs 29.4 on Apple Silicon Macs
2024-06-09Always Yes in Emacs Lisp
2024-05-29I Don’t Trust Parental Controls
2023-12-28Read-Only PDFs
2023-12-23Printing PostScript from Emacs in macOS Sonoma
2023-08-14Oven Fresh
2023-08-13Upgrading to Emacs 29.1 on Apple Silicon Macs
2022-04-10Upgrading to Emacs 28.1 on Apple Silicon (M1) Macs
2021-05-09Visual debugging for Swift Package Manager projects on Linux
2021-05-08Controlling TIDAL with AppleScript
2021-04-26Debug Swift Package Manager projects using dap-debug
2020-12-20Automatic switch for the macOS firewall
2020-12-06Multi-TTY support in Emacs 27
2020-05-27The Best Thing About eGPUs
2020-05-23Faster Dark Mode on macOS
2020-02-28Saving to Empty iCloud Drive Folders
2020-01-03Ensure Proper Ventilation
2019-10-06How to Lose Your Apple Health Data
2019-01-29How Many Conferences
2018-10-11Paste as Code
2018-06-09The iPad Productivity Paradox
2017-06-05Don't Give Up
2017-05-30Hey Siri on the Apple Watch
2017-03-31Networking at WWDC
2016-10-13Making Xcode more like Emacs
2016-02-10Three Products I Hope Apple Makes but They Probably Won't
2016-02-0714-day Week View in Calendar
2015-02-03Pile of Poo
2015-01-21My Priorities
2014-03-03My Problem with Objective-C Dot Syntax
2014-02-24Integrating terminal Vim with Finder [UPDATED 2015-02-10]
2013-07-07NIB-less
2013-06-30My RSS Setup
2013-05-01New Feed URL
2013-04-14The Creamiest TextView in the App Store
2013-04-11Using Panic's Status Board to monitor TimeTiger data
2013-04-07The Softphone that Gene Built
2013-03-29For the Most Part
2013-01-27Be Careful What You Start
2013-01-20User Intention
2013-01-13Unstuck
2013-01-06Archiving a TV News Segment
2012-12-30Pizza Segmentation
2012-12-23Spinning in Circles
2012-12-16Circling the Declarative Drain
2012-12-09How to Draw a Circle
2012-12-02Just Give Up Now
2012-11-25Native Mobile or HTML5
2012-11-18A Consumption Device
2012-11-11Best Enough
2012-11-04The Lifification of Games
2012-10-28Report the Bug
2012-10-21A User by Any Other Name
2012-10-14Getting Rid of Stuff
2012-10-07Start by Being Terrible
2012-09-30Taking Advantage of the Sum of Errors
2012-09-23An Alternative to QuickBooks
2012-09-16There and Back Again
2012-09-09Leader of the Pack
2012-09-023-day
2012-08-26Is Git useful at the beginning of a project?
2008-05-13Tables Anonymous