From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: jkarres@gmail.com Newsgroups: gmane.emacs.help Subject: Re: Trying to write an emacs lisp function Date: 28 Aug 2006 09:00:14 -0700 Organization: http://groups.google.com Message-ID: <1156780814.206321.51750@75g2000cwc.googlegroups.com> References: <1156735064.663675.84930@m73g2000cwd.googlegroups.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: sea.gmane.org 1156783264 32532 80.91.229.2 (28 Aug 2006 16:41:04 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 28 Aug 2006 16:41:04 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Aug 28 18:41:02 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 1GHkA9-0004wP-FK for geh-help-gnu-emacs@m.gmane.org; Mon, 28 Aug 2006 18:40:37 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GHkA8-0004AT-TW for geh-help-gnu-emacs@m.gmane.org; Mon, 28 Aug 2006 12:40:36 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!75g2000cwc.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 42 Original-NNTP-Posting-Host: 24.110.185.186 Original-X-Trace: posting.google.com 1156780819 10036 127.0.0.1 (28 Aug 2006 16:00:19 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Mon, 28 Aug 2006 16:00:19 +0000 (UTC) In-Reply-To: User-Agent: G2/0.2 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/418.8 (KHTML, like Gecko) Safari/419.3,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: 75g2000cwc.googlegroups.com; posting-host=24.110.185.186; posting-account=gYNG7g0AAAC63X20vJKaLebAzUAurq3q Original-Xref: shelby.stanford.edu gnu.emacs.help:141376 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:36996 Archived-At: Ehud Karni wrote: > 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 Yes, that solved it! Thanks!