Repository navigation
Confirm before exiting Emacs when ghostel-query-before-killing applies - #681
Merged
Merged
Conversation
The option's docstring promised confirmation both on buffer kill and on Emacs exit, but only the buffer-kill half existed: both spawn paths use :noquery so save-buffers-kill-emacs never asked, and nothing was on kill-emacs-query-functions. Split the decision into ghostel--query-before-killing-p and add ghostel--kill-emacs-query, which asks once listing every ghostel buffer the predicate flags. Closes #672
dakra
force-pushed
the
fix/query-before-exit
branch
from
September 13, 2026 11:06
428220b to
86e8c44
Compare
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #672
ghostel-query-before-killingdocumented confirmation both on buffer kill and on Emacs exit, but only the buffer-kill half existed. Both spawn paths use:noquery, sosave-buffers-kill-emacsnever asked, and nothing was registered onkill-emacs-query-functions. The exit half was lost when the native PTY commit replaced theprocess-query-on-exit-flagtoggling with a customkill-buffer-query-functionshook.ghostel--query-before-killing-p, shared by buffer kill and Emacs exit.ghostel--kill-emacs-queryonkill-emacs-query-functions: one prompt listing every ghostel buffer with a running command (auto) or live process (t).Verified live in a sandboxed terminal Emacs with zsh integration:
lessrunning plusC-x C-cprompts andnkeeps Emacs alive; after quittingless,C-x C-cexits silently underauto; with the hook removed the original silent exit reproduces.