Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I use emacs24 and I usually start emacs as a daemon at start then use emacsclient frames.

But I've encountered a problem: After I created the first frame, then whenever I created a new frame (after the first frame is closed) there would be a system message "emacs24@myusername" is ready popped out so that the new frame loses focus (the focus is on the message), which is rather annoying. It seems that it is because even if I close all frames some buffers are still open (like Scratch and Messages). I am just wondering if there is a way to prevent the system message from popping out?

Thanks!

EDIT: forgot to mention that I am using Gnome 3.

share|improve this question

1 Answer 1

Here is what I do :

(server-start)
(defun px-raise-frame-and-give-focus ()
  (when window-system
    (raise-frame)
    (x-focus-frame (selected-frame))
    (set-mouse-pixel-position (selected-frame) 4 4)
    ))
(add-hook 'server-switch-hook 'px-raise-frame-and-give-focus)
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.