From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mathias Dahl Newsgroups: gmane.emacs.help Subject: Re: raise frame no go Date: Thu, 04 Jan 2007 02:34:48 +0100 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1167874828 14879 80.91.229.12 (4 Jan 2007 01:40:28 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 4 Jan 2007 01:40:28 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jan 04 02:40:26 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1H2Hag-0002fN-9v for geh-help-gnu-emacs@m.gmane.org; Thu, 04 Jan 2007 02:40:22 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H2Haf-00061z-KT for geh-help-gnu-emacs@m.gmane.org; Wed, 03 Jan 2007 20:40:21 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Original-Newsgroups: gnu.emacs.help,gmane.emacs.devel Original-Lines: 64 Original-X-Trace: individual.net 2SmlhMNeSmadyTqpCOTBTACKzSTdrC+YaTQ5rgFtQ2vlIhaCaC User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.92 (gnu/linux) Cancel-Lock: sha1:sMy2GGLub2uOBKOPDUzwRCre2Nc= Original-Xref: shelby.stanford.edu gnu.emacs.help:144529 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:40133 Archived-At: Leo writes: > I want to use emacsclient to bring Emacs frame to the front. I tried > several functions including raise-frame, x-focus-frame etc, but none > of them worked. All they do is causing the Emacs frame to flash in > the taskbar. Any ideas? > > This is tested in Gnome 2.16 in Fedora 6. > Emacs 23: 20061218. I just wanted to mention that I have the same problem. Running CVS Emacs as of 2007-01-1 under Mandriva GNU/Linux, using GNOME with its Metacity window manager. What I do is this: $ emacsclient -e "(my-function)" and my-function is: (defun my-function () (select-frame-set-input-focus (selected-frame))) (well, of course it does more than that but...) Up until today I haven't played with emacsclient under GNU/Linux. I have just used gnuclient & friends under w32. I am currently coding a small command/url/hatever launcher in Emacs, and the current behavior is quite frustrating (when Emacs is not the topmost window). I see this code in xterm.c: XTframe_raise_lower (f, raise_flag) FRAME_PTR f; int raise_flag; { if (raise_flag) { /* The following code is needed for `raise-frame' to work on some versions of metacity; see Window Manager Specification/Extended Window Manager Hints at http://freedesktop.org/wiki/Standards_2fwm_2dspec However, on other versions (metacity 2.17.2-1.fc7), it reportedly causes hangs when resizing frames. */ /* Lisp_Object frame; const char *atom = "_NET_ACTIVE_WINDOW"; */ x_raise_frame (f); /* XSETFRAME (frame, f); Fx_send_client_event (frame, make_number (0), frame, make_unibyte_string (atom, strlen (atom)), make_number (32), Fcons (make_number (1), Fcons (make_number (time (NULL) * 1000), Qnil))); */ } else x_lower_frame (f); } Is is that piece of code that fails? My version of metaciy is 2.16.1. /Mathias