aboutsummaryrefslogtreecommitdiff
path: root/modules/undead-buffers.el
Commit message (Collapse)AuthorAgeFilesLines
* fix(startup): keep *Warnings* alive so 31.1's first frame is WaylandCraig Jennings35 hours1-1/+10
| | | | | | | | Emacs 31.1's warnings.el defers daemon-startup warnings into a one-shot after-make-frame-functions closure that holds the *Warnings* buffer object and displays it on the first client frame. The startup sweep in cj/dashboard-only killed that buffer first. On the first emacsclient -c of every session, display-buffer then signaled inside make-frame and server.el answered -window-system-unsupported. emacsclient silently retried on $DISPLAY, and the frame opened on XWayland behind the pgtk "unsupported under X" dialog. Only that first frame was affected, which made it look like a display problem rather than a config one. I added *Warnings* to cj/undead-buffer-list so the sweep buries it instead, the same choice desktop.el makes in desktop-clear-preserve-buffers. Two things follow. C-x k on *Warnings* now buries it. A startup that produced warnings shows them on the first frame, because the deferred closure finally has a live buffer. As a backstop, cj/warning--display-buffer-if-live wraps warning--display-buffer so a dead buffer (or a name that resolves to none) is skipped rather than passed on. That function only exists from Emacs 31, and advising the undefined symbol on 30.2 is harmless. The new tests pin *Warnings* to the undead list and check the sweep leaves it live. The guard tests cover live and dead buffers plus names that do and don't resolve, and run the real 31.x function on a dead buffer.
* fix(undead-buffers): keep C-u on wrapper commands from spamming the undead listCraig Jennings2026-07-201-5/+11
| | | | The delegated cj/kill-buffer-or-bury-alive reads current-prefix-arg, so a prefixed wrapper call took the add-to-undead-list branch for every buffer: nothing killed, list spammed. The four wrappers now bind the prefix to nil around the delegate.
* fix(undead-buffers): guard kill-other-window against a lone windowCraig Jennings2026-07-111-4/+10
| | | | | | | | In a single-window frame cj/kill-other-window killed the buffer being viewed: other-window no-ops, delete-window was guarded, but the kill still ran on the current buffer. Signal a user-error instead, matching the sibling cj/kill-other-window-buffer. Past the guard there's always another window, so delete-window drops its own check. The single-window test asserted the broken behavior, so I rewrote it to expect the user-error and an untouched buffer. Also documented the prefix-argument undead-mark in cj/kill-buffer-or-bury-alive.
* fix(undead-buffers): drop cj/save-some-buffers name collisionCraig Jennings2026-06-301-7/+1
| | | | | | | | Emacs crashed at launch with wrong-number-of-arguments on cj/save-some-buffers, down the startup path (dashboard-only to kill-all-other-buffers to save). Two modules defined a function by that name: custom-buffer-file.el's legible save prompt (arg + pred), installed as an override on save-some-buffers, and undead-buffers.el's older one-arg wrapper that called save-some-buffers internally. custom-buffer-file loads first, undead-buffers second. The one-arg version won the shared symbol, so the override re-entered it with two args. I removed undead-buffers.el's wrapper. cj/kill-all-other-buffers-and-windows now calls the standard save-some-buffers with the undead predicate, which routes through the override when loaded and the built-in otherwise, so undead-buffers no longer depends on custom-buffer-file. The legible override keeps the cj/save-some-buffers name. A regression test loads both modules in launch order and guards the call and the arity so a one-arg shadow can't return.
* fix(ai-term): keep agent buffers alive through the kill-all sweepCraig Jennings2026-06-281-3/+26
| | | | | | F1 (cj/dashboard-only) kills every other buffer, burying only those on the undead list. Agent buffers were never registered, so the sweep killed live agents and detached their sessions. Agent buffers are a dynamic family ("agent [<project>]") that an exact-name list can't pre-enumerate, so undead-buffers gains a regexp list (cj/undead-buffer-regexps) and a centralized cj/--buffer-undead-p predicate. Both kill paths route through it. ai-term registers the "agent [" pattern, so every agent -- current or future, however created -- is buried rather than killed.
* docs(load-graph): classify core libraries and command modulesCraig Jennings2026-05-241-0/+10
| | | | | | Third classification batch: the remaining core and library command modules from init.el's early block — external-open, media-utils, auth-config, keyboard-macros, system-utils, text-config, undead-buffers. I annotated each with the load-graph header contract, added a Batch 3 table to the inventory, and extended the validation allowlist. 23 of 102 modules are now classified. No new hidden dependencies in this batch. auth-config stays eager because other modules need credentials early; the command libraries (external-open, media-utils, keyboard-macros) are eager only by init order and flagged as Phase 4 deferral candidates.
* feat(window): kill the other window's buffer with C-; b KCraig Jennings2026-05-111-0/+16
| | | | `cj/kill-other-window-buffer' (in undead-buffers.el, on `C-; b K') kills or buries the buffer shown in the other window and leaves that window and the split alone. The window just shows whatever bury/kill surfaces next. It reuses `cj/kill-buffer-or-bury-alive', so buffers in `cj/undead-buffer-list' (like `*scratch*') get buried. With more than two windows it acts on `next-window'. Sibling of `cj/kill-other-window' (M-S-o), which deletes the other window. This one keeps it.
* fix(terminal): add console/mosh compatibilityCraig Jennings2026-01-231-2/+2
| | | | | | | | - Create terminal-compat.el for arrow key escape sequences - Fix M-uppercase keybindings (M-O → M-S-o, etc.) that conflicted with terminal escape sequences ESC O A/B/C/D - Add GUI-only guards for emojify and icon rendering - 18 keybindings updated across 13 modules with override comments
* refactor(keybindings): reorganize time-zones and kill-buffer-and-window bindingsCraig Jennings2025-11-241-3/+3
| | | | | | Move time-zones from C-x c to M-C for easier access. Move cj/kill-buffer-and-window from M-C to C-; b k to group with other buffer operations. Updated documentation and which-key labels.
* feat: undead-buffers: Add `cj/make-buffer-undead` function and testsCraig Jennings2025-10-221-9/+19
| | | | | | | | | | | | | | | Introduce a new function `cj/make-buffer-undead` that appends a buffer name to the `cj/undead-buffer-list`, preventing it from being killed. This comes along with a suite of tests to check various scenarios and edge cases for handling undead buffers. Additionally, add tests for related functions: `cj/kill-buffer-or-bury-alive`, `cj/kill-buffer-and-window`, and others to ensure they correctly manage buffers, particularly with undead-status considerations. Refactor `undead-buffer-list` naming for consistency and clarity in the module.
* chore: undead-buffers: Update keybinding functions and docstringsCraig Jennings2025-10-201-109/+8
| | | | | | - Replace `global-set-key` with `keymap-global-set` for defining keybindings. - Update docstrings to use single quotes instead of equal signs for code symbols. - Remove ERT tests for cleanup and clarity (moved to tests/ in another PR)
* fix: only use mpd to play music; fix space in playlist buffernameCraig Jennings2025-10-151-1/+1
|
* changing repositoriesCraig Jennings2025-10-121-0/+181