From ea46c4a90c9f2de94cdb6ab4e47e744a9506ee37 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Mon, 15 Jun 2026 21:52:30 -0500 Subject: fix(ui-navigation): undo-kill-buffer skips open files via equal The visited-file filter used delq, comparing expand-file-name strings by eq, so an already-open file was never removed from the candidates (the skip logic was dead). Use delete (equal). Adds a test with the open file at the head of the list, where the eq/equal difference actually shows. --- modules/ui-navigation.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'modules/ui-navigation.el') diff --git a/modules/ui-navigation.el b/modules/ui-navigation.el index fba9153c2..e9c9eaf26 100644 --- a/modules/ui-navigation.el +++ b/modules/ui-navigation.el @@ -203,8 +203,11 @@ With numeric prefix ARG, re-open the ARGth most-recently-killed file (buffer-list))))) (mapc (lambda (buf-file) + ;; delete (equal), not delq (eq): buf-file is a fresh string from + ;; expand-file-name and never eq to the recentf-list entries, so the + ;; skip-open-files logic was dead. (setq recently-killed-list - (delq buf-file recently-killed-list))) + (delete buf-file recently-killed-list))) buffer-files-list) (when recently-killed-list (let ((file (nth (1- arg) recently-killed-list))) -- cgit v1.2.3