reddit / emacs

How to make a new emacsclient frame brought to front and focus?

amarofades · 2022-06-29 06:40
I have the following in my `~/.bash_profile:` export ALTERNATE_EDITOR="" alias e="(/opt/homebrew/Cellar/emacs-plus@28/28.1/bin/emacsclient -c -n -e \"\(prog \(raise-frame\) \(x-focus-frame \(selected-frame\)\)\)\" &> /dev/null &)" After I do `c-c c-x` to quit the client, I return to the terminal and evoke `e` again, the new client frame is not brought to the front and does not gets focus. How do I modify the above to make it so?
your_sweetpea · 2022-06-29 07:04
I can't say I'm sure why what you're currently using isn't working, but since you're on OSX, have you considered raising it with AppleScript? It's usually going to be the best supported way to do this kind of thing on OSX