From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: trygve.flathen@gmail.com Newsgroups: gmane.emacs.help Subject: Re: closing emacsclient always focuses another emacs window Date: Sun, 9 Mar 2014 12:50:46 -0700 (PDT) Message-ID: <10020dec-82f2-41de-93d3-06d8984dcfba@googlegroups.com> References: <83pplwq0s2.fsf@gnu.org> <83ob1gpw98.fsf@gnu.org> <9cc39d8d-e5ae-488b-9ba6-78dd71a2257f@googlegroups.com> <913ee34a-f81c-408f-afe4-6944a9c56430@googlegroups.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1394394908 12246 80.91.229.3 (9 Mar 2014 19:55:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 9 Mar 2014 19:55:08 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Mar 09 20:55:18 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WMjoc-0003Tb-Aa for geh-help-gnu-emacs@m.gmane.org; Sun, 09 Mar 2014 20:55:18 +0100 Original-Received: from localhost ([::1]:45346 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WMjob-0006Nt-Rz for geh-help-gnu-emacs@m.gmane.org; Sun, 09 Mar 2014 15:55:17 -0400 X-Received: by 10.182.116.39 with SMTP id jt7mr11238412obb.33.1394394646363; Sun, 09 Mar 2014 12:50:46 -0700 (PDT) X-Received: by 10.140.47.130 with SMTP id m2mr1346qga.37.1394394646324; Sun, 09 Mar 2014 12:50:46 -0700 (PDT) Original-Path: usenet.stanford.edu!ur14no4672157igb.0!news-out.google.com!bw18ni3075qab.1!nntp.google.com!hw13no2842525qab.1!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=79.161.243.147; posting-account=9QvVegoAAAA5wVSi6zQxrpcN48XTGolV Original-NNTP-Posting-Host: 79.161.243.147 User-Agent: G2/1.0 Injection-Date: Sun, 09 Mar 2014 19:50:46 +0000 Original-Xref: usenet.stanford.edu gnu.emacs.help:204088 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:96358 Archived-At: kl. 19:54:00 UTC+1 s=F8ndag 9. mars 2014 skrev Michael Heerdegen f=F8lgende= : > Interesting. And you used the -c flag for emacsclient in both cases, > yes? yup. > Ok, let's try with the old advice mechanism: > (defadvice server-switch-buffer (around test activate) > (when (ad-get-arg 0) ad-do-it)) Yay! That did it. And when I put it in init.el after server-start, all is p= ure joy. > 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. Yep, it popped up. If you still want the backtrace: http://flathen.net/tmp/trygve-flathen.backtrace I'd be glad to provide further test info if needed. Thanks all of you for the help. Don't think I would've come up with that pi= ece of elisp anytime soon without it :-) -Trygve