Add ghostel-query-before-killing defcustom (closes #288)#289
Merged
Conversation
Replaces the hardcoded `(set-process-query-on-exit-flag proc nil)` with a defcustom that defaults to `auto`: quiet at the shell prompt, queries while a command is running (toggled via the existing OSC 133 C/D hooks). `t` always queries (vterm-style), `nil` restores the previous never-query behavior. Closes #288
149d7a3 to
9e7c8d4
Compare
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.
Summary
ghostel-query-before-killingdefcustom (t/nil/'auto, default'auto) controls whether Emacs confirms before killing a live ghostel buffer or exiting Emacs while one is alive. Replaces the hardcoded(set-process-query-on-exit-flag proc nil)reported in confirm before quitting emacs? #288.'autotoggles the process query-on-exit flag through ghostel's existing OSC 133 C/D hooks: quiet at a prompt, queries while a command is running. The handlers are wired intoghostel-command-start-functions/ghostel-command-finish-functionsdefaults rather than via top-leveladd-hook.eat-query-before-killing-running-terminaldefcustom with the sameautosemantics (toggled from pre-cmd/pre-prompt rather than OSC 133).Caveat
Programs without OSC 133 (python3, irb, sqlite3, …) never emit a C marker, so
'autowill leave the flag nil for the whole session — same caveat eat has. Users who want a query for those should set the value tot. Documented in the defcustom docstring.Test plan
make -j4 all— 397/399 expected, 0 unexpected, 2 pre-existing skips'autoflip,'nilno-op,'tno-op, dead-process safety; added toghostel-test--elisp-testsso they run in the elisp batch'auto,C-x kat a prompt → no query;sleep 30thenC-x k→ query fires(setq ghostel-query-before-killing t)→ query always;nil→ never