From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Ehud Karni" Newsgroups: gmane.emacs.help Subject: Re: Trying to write an emacs lisp function Date: Mon, 28 Aug 2006 12:58:27 +0300 Organization: Mivtach-Simon Insurance agencies Message-ID: <200608280958.k7S9wRLR015351@beta.mvs.co.il> References: <1156735064.663675.84930@m73g2000cwd.googlegroups.com> Reply-To: ehud@unix.mvs.co.il NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-8-i Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1156759172 8304 80.91.229.2 (28 Aug 2006 09:59:32 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 28 Aug 2006 09:59:32 +0000 (UTC) Cc: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Aug 28 11:59:29 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GHdtv-0003b2-Jc for geh-help-gnu-emacs@m.gmane.org; Mon, 28 Aug 2006 11:59:27 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GHdtv-0005iy-7z for geh-help-gnu-emacs@m.gmane.org; Mon, 28 Aug 2006 05:59:27 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GHdt8-0005F7-At for help-gnu-emacs@gnu.org; Mon, 28 Aug 2006 05:58:38 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GHdt6-0005Cn-GB for help-gnu-emacs@gnu.org; Mon, 28 Aug 2006 05:58:37 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GHdt6-0005CT-6F for help-gnu-emacs@gnu.org; Mon, 28 Aug 2006 05:58:36 -0400 Original-Received: from [193.16.147.12] (helo=unix.mvs.co.il) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1GHe20-0002Bu-Tp for help-gnu-emacs@gnu.org; Mon, 28 Aug 2006 06:07:49 -0400 Original-Received: from beta.mvs.co.il (beta [10.253.0.3]) by unix.mvs.co.il (8.13.6/8.13.6) with ESMTP id k7S9wSgw032202; Mon, 28 Aug 2006 12:58:28 +0300 Original-Received: from beta.mvs.co.il (localhost [127.0.0.1]) by beta.mvs.co.il (8.13.6/8.13.6) with ESMTP id k7S9wSuu015356; Mon, 28 Aug 2006 12:58:28 +0300 Original-Received: (from root@localhost) by beta.mvs.co.il (8.13.6/8.13.6/Submit) id k7S9wRLR015351; Mon, 28 Aug 2006 12:58:27 +0300 Original-To: jkarres@gmail.com In-reply-to: <1156735064.663675.84930@m73g2000cwd.googlegroups.com> (jkarres@gmail.com) X-Mailer: Emacs 21.3.1 rmail (send-msg 1.108) 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:36984 Archived-At: On 27 Aug 2006 20:17:44 -0700, jkarres@gmail.com wrote: > > I'm trying to write a function such that when you use it, all the > windows on the current frame will be deleted, and for each deleted > window, a new frame will be created, displaying the same buffer that > the just-deleted window had been displaying. When it is finished > running, the original frame/window should still be on top (/in > focus/active/however you say it). > > This is what I have so far: > > (defun windows-into-frames () > "If the current frame has more than one window, > make each window display in its own > seperate frame." > (interactive) > (setq original-frame (selected-frame)) > (while (not (one-window-p t)) > (other-window 1) > (make-frame) > (delete-window) > (select-frame original-frame))) > > Apparently "select-frame" doesn't work quite like I thought. Can > anybody help me out? Look at `raise-frame', I think that is the function your looking for. Ehud. -- Ehud Karni Tel: +972-3-7966-561 /"\ Mivtach - Simon Fax: +972-3-7966-667 \ / ASCII Ribbon Campaign Insurance agencies (USA) voice mail and X Against HTML Mail http://www.mvs.co.il FAX: 1-815-5509341 / \ GnuPG: 98EA398D Better Safe Than Sorry