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

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

Re: Trying to write an emacs lisp function


From: Ehud Karni
Subject: Re: Trying to write an emacs lisp function
Date: Mon, 28 Aug 2006 12:58:27 +0300

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 <http://www.keyserver.net/>    Better Safe Than Sorry




reply via email to

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