1

When Emacs executes call-process after the focus has moved to another window (this is after a compilation step which takes some time to finish) it grabs the focus and causes the pointer to move to the upper-right of the Emacs frame. This is on Linux using gnome-shell.

Is there any way to disable this behavior? Either globally or on a per-call basis?

Edit: Found it. The frame was being explicitly set by select-frame-set-input-focus in a function that I was adding to compilation-finish-function. I should understand the code I copy-and-paste a little better.

  • Your question implies that you are executing call-process from somewhere other than Emacs. How is it that you are executing call-process from another application that has focus instead of Emacs? – lawlist Sep 29 '16 at 15:52
  • It's from within Emacs. It's being called at the end of a compilation process (via compilation-finish-functions) which takes enough time for me to move focus to another application. I'll fix the question. – Mike B Sep 29 '16 at 15:54
  • What function, please, is attached to the variable compilation-finish-function? This will vary depending upon what you are doing. In the end, we will be looking for functions such as select-frame-set-input-focus and perhaps x-focus-frame. Alternatives include, but are not limited to things like (select-frame) and/or (raise-frame). – lawlist Sep 29 '16 at 16:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.