frames-only-mode icon indicating copy to clipboard operation
frames-only-mode copied to clipboard

🐞 Bug: Emacs frame quits on focus loss after eshell completion with cape and frames-only-mode

Open Ochiruko opened this issue 7 months ago • 0 comments

Thank you for reporting a bug.

Checklist:

  • [x] Using the latest stable release of Emacs 30.1
  • [x] Started with emacs -Q or package-isolate
  • [x] All related packages are up-to-date and reinstalled

Describe the bug When using the cape and frames-only-mode extensions together, starting a completion in eshell (e.g., ls -<TAB>) and then clicking on a non-Emacs frame (such as a window from another application) causes the Emacs frame where the completion was started to quit unexpectedly.

To Reproduce Steps to reproduce the behavior:

  1. Install and enable cape and frames-only-mode.
  2. Optionally, install pcmpl-args (may not be directly related, but was present).
  3. Start Emacs with emacs -Q or using package-isolate.
  4. Open eshell.
  5. Type ls -<TAB> to trigger shell completion.
  6. While the completion popup is active, click on a window from another application (non-Emacs frame).
  7. Observe that the Emacs frame that started completion quits or closes.

Expected behavior The Emacs frame should remain open and stable, regardless of window focus changes during completion.

Actual behavior The Emacs frame that started the completion is unexpectedly closed or quits when focus is switched away during an active completion.

Additional context

  • Unsure whether pcmpl-args is necessary for the bug, but it was present.
  • This may be an interaction between completion popups, frames-only-mode, and how focus events are handled.
  • Quit was present in the Messages buffer.
  • This behavior was reliably reproducible on my machine.

Environment

  • Emacs version: 30.1
  • OS: [please specify]
  • cape: [latest]
  • frames-only-mode: [latest]
  • pcmpl-args: [latest, optional]
  • Started with: emacs -Q or package-isolate

Stack traces / error messages Please let me know if further debugging output is needed.

Ochiruko avatar Sep 09 '25 16:09 Ochiruko