homebrew-emacsmacport icon indicating copy to clipboard operation
homebrew-emacsmacport copied to clipboard

`emacsclient -e '(make-frame)` does not raise Emacs.app when hidden

Open apc opened this issue 4 years ago • 5 comments

Start vanilla Emacs:

/usr/local/opt/emacs-mac/Emacs.app/Contents/MacOS/Emacs -q

Start server (M-x server-start RET), hide Emacs.app, and run

emacsclient -e '(make-frame)'

from the terminal. Nothing will happen until you Cmd-TAB your way back to Emacs.app, at which point you will witness the new frame being created.

From brew info emacs-mac I get:

railwaycat/emacsmacport/emacs-mac: stable emacs-26.3-z-mac-7.9, HEAD
...

I'm running macOS 10.14.6.

I've ran the same commands using the emacs-plus build and the behavior is different: Emacs.app 'unhides' and you see the new frame being created 'in the background', as it were.

This isn't a big issue, I suppose, but it prevents me from using yequake. See this issue. If anyone knows of a way around this, I'd be thankful for some suggestions.

apc avatar Aug 10 '20 14:08 apc

I can verify that this bug still exists. The workaround is to run this:

emacsclient -e '(select-frame-set-input-focus (make-frame))'

ETA: this "bug" also exists using builds from http://emacsformacosx.com so this might be expected behavior.

zenspider avatar Nov 16 '23 07:11 zenspider

I can verify that this bug still exists. The workaround is to run this:

emacsclient -e '(select-frame-set-input-focus (make-frame))'

ETA: this "bug" also exists using builds from http://emacsformacosx.com so this might be expected behavior.

This doesn't work for me if I am triggering a new frame from within emacs when it is not in focus.

swapnilsm avatar Feb 27 '24 17:02 swapnilsm

Any updates on that?

abdalazizrashid avatar May 07 '24 21:05 abdalazizrashid