help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: closing emacsclient always focuses another emacs window


From: Michael Heerdegen
Subject: Re: closing emacsclient always focuses another emacs window
Date: Sun, 09 Mar 2014 19:54:00 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

address@hidden writes:

> > When I first start emacs (emacs -Q), and do M-x start-server, and
> > follow
> > the recipe, I get the desired behavior. 
> > 
> > OTOH, when I start up with emacs -Q --daemon, and follow the recipe, I 
> > see what trygve.flathen sees. 
>
> Both of these methods give me the same undesired behaviour, with or
> without server-start in init.el.

Interesting.  And you used the -c flag for emacsclient in both cases,
yes?

> > Does evaluating the following change the behavior for you?
>
> Seems like I am missing something:
>
> Debugger entered--Lisp error: (void-function advice-add)
>   (advice-add (quote server-switch-buffer) :around (lambda (f &rest
> args) (when (car args) (apply f args))))
>   eval((advice-add (quote server-switch-buffer) :around (lambda (f
> &rest args) (when (car args) (apply f args)))) nil)
>   eval-last-sexp-1(nil)
>   eval-last-sexp(nil)
>   call-interactively(eval-last-sexp nil nil)

Ok, let's try with the old advice mechanism:

(defadvice server-switch-buffer (around test activate)
  (when (ad-get-arg 0) ad-do-it))

You can (with a newly started server) also M-x debug-on-entry
select-frame-set-input-focus.  If you get a popping up debugger after
hitting C-x #, please send us the backtrace.


Regards,

Michael.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]