-
-
Notifications
You must be signed in to change notification settings - Fork 207
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
0.16.0 causes jumping to another application when Emacs child frame closes #776
Comments
I have never user Emacs, which makes it hard for me to reproduce the issue. Can you please produce elaborate steps to reproduce that would be clear for people who has never used Emacs in default Emacs configuration? Thanks |
This is a complex secnario, I've done my best to create steps to reproduce the issue. I appreciate your effort to invest this issue. I can't bear it if I can't use Emacs. Everything will be contained in the test directory, after testing you can just delete the test directory. The screen record shows that while typing the completion menu shows up, press TAB to trigger the completion, and then the focused window jump to another application. Rollback to previous version of aerospace with the same setup, it won't hapen. I have tested following scripts Steps to reproduce the issue# create the testing directory
mkdir emacs-q
cd emacs-q
# install emacs using homebrew
brew tap d12frosted/emacs-plus
brew install emacs-plus@29 --with-no-frame-refocus
# create a python virtual environment with dependences for lsp-bridge
cat > lsp-bridge.txt << EOF
epc==0.0.5
orjson==3.9.10
sexpdata==1.0.0
setuptools==69.0.2
rapidfuzz==3.6.1
paramiko==3.4.0
six==1.16.0
watchdog==5.0.3
EOF
python3 -m venv venv && venv/bin/pip install -r lsp-bridge.txt
# setup emacs
cat > init.el <<EOF
;; Disable startup screen
(setq inhibit-startup-screen t)
;; Set initial buffer to *scratch*
(setq initial-buffer-choice t)
;; Bootstrap straight.el
(defvar bootstrap-version)
(let ((bootstrap-file
(expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
(bootstrap-version 6))
(unless (file-exists-p bootstrap-file)
(with-current-buffer
(url-retrieve-synchronously
"https://raw.githubusercontent.com/radian-software/straight.el/develop/install.el"
'silent 'inhibit-cookies)
(goto-char (point-max))
(eval-print-last-sexp)))
(load bootstrap-file nil 'nomessage))
;; Configure straight to use use-package
(straight-use-package 'use-package)
(setq straight-use-package-by-default t)
;; Set *scratch* buffer to emacs-lisp-mode
(setq initial-major-mode 'emacs-lisp-mode)
;; Install required dependencies
(use-package markdown-mode
:straight t)
(use-package yasnippet
:straight t
:config
(yas-global-mode 1))
;; Install and configure lsp-bridge
(use-package lsp-bridge
:straight '(lsp-bridge :type git
:host github
:repo "manateelazycat/lsp-bridge"
:files ("*.el" "*.py" "acm" "core" "langserver" "multiserver" "resources"))
:init
(setq lsp-bridge-python-command (expand-file-name "venv/bin/python" default-directory)))
;; Ensure *scratch* is the initial buffer
(setq inhibit-startup-buffer-menu t)
;; Add startup message to scratch buffer
(add-hook 'emacs-startup-hook
(lambda ()
(with-current-buffer "*scratch*"
(lsp-bridge-mode)
(goto-char (point-max))
(insert "\n;; Debug: init.el loaded successfully at " (current-time-string) "\n")
(insert ";; LSP-Bridge status: " (if (bound-and-true-p lsp-bridge-mode) "enabled" "disabled") "\n\n")
(insert ";; With Aerospace enabled, try to type a long symbol for example \n")
(insert "emacs-lisp-compilation-mode-syntax-table\n\n")
(insert ";; while typing the completion menu will showup and press TAB to trigger the completion \n")
(insert ";;observe that the focused window will jump to the next application window after pressing TAB.\n")
(insert ";;This will also happen when you are typing fast.\n")
(insert "\n")
(goto-char (point-max)))))
EOF start emacs to testWith aerospace 0.16.0 enabled, start the emacs. Emacs will download all the dependecies to the testing directory, if you see warning on Emacs, just ignore it. emacs --init-directory=. -Q -l init.el Steps to cleanup after testingbrew uninstall emacs-plus@29
brew untap d12frosted/emacs-plus remove the testing directory |
Hi! |
I cloud not figure out the issue, right now I just use aerospace 0.15.2, and it works fine 🙃 |
I get this issue all the time and it's incredibly annoying! Any work around would be appreciated! |
I have this problem as well, using emacs-plus@30 with different packages from @nohzafk example... so it seems the problem happens with whatever package that creates those child frames... for my example, it happens when using |
I have this issue as well. It's so bad I had to stop using aerospace and use Raycast instead. I prefer aerospace but this one is a deal breaker. I'll be in the middle of writing code and autocomplete popsup (as it should) and aerospace switches windows often to another workspace so I can't even see the completion candidates. |
From what I can see that frame is recognized as a dialog, unfortunately I'm not familiar with internals of AeroSpace or Emacs to draw any conclusions out of this
|
@ldangelo I'd be curios how you switched to Raycast. it doesn't have any space support does it? just window sizing? |
No space support. It's not as good as aerospace, but it doesn't switch windows unexpectedly. I am testing out a new emacs build that has --with-no-frame-refocus turned on. I'll report back if it has any effect on this issue. |
@yspreen It (Raycast) does have support for moving windows between spaces. |
It seems as if building emacs with --with-no-frame-refocus has resolved the issue for me. Still testing but it hasn't happened with the new build. Have not looked into what that flag actually does yet. |
I am still too lazy to reproduce this bug due to my restricted Emacs knowledge. Everyone is welcome to |
I encounter this problem when I upgrade to the latest aerospace 0.16.0, I confirmed that previous 0.15.2 version doesn't cause this issue.
This issue is very like #325 , the problem specifically involves Emacs child frames, which are temporary windows created for UI elements like completion menus
Behavior:
These child frame is often undecorated
My attempts to force focus or modify frame parameters didn't work, suggesting this is more of an Aerospace level issue
The text was updated successfully, but these errors were encountered: