From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Ye Wenbin" Newsgroups: gmane.emacs.help Subject: Re: Trying to write an emacs lisp function Date: Mon, 28 Aug 2006 13:27:04 +0800 Organization: Personal Message-ID: References: <1156735064.663675.84930@m73g2000cwd.googlegroups.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; format=flowed; delsp=yes; charset=utf-8 Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1156742864 26927 80.91.229.2 (28 Aug 2006 05:27:44 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 28 Aug 2006 05:27:44 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Aug 28 07:27:39 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 1GHZeo-00039h-5Z for geh-help-gnu-emacs@m.gmane.org; Mon, 28 Aug 2006 07:27:34 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GHZen-0000cN-Ln for geh-help-gnu-emacs@m.gmane.org; Mon, 28 Aug 2006 01:27:33 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GHZed-0000cB-3A for help-gnu-emacs@gnu.org; Mon, 28 Aug 2006 01:27:23 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GHZeY-0000bY-Lq for help-gnu-emacs@gnu.org; Mon, 28 Aug 2006 01:27:22 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GHZeY-0000bT-Iz for help-gnu-emacs@gnu.org; Mon, 28 Aug 2006 01:27:18 -0400 Original-Received: from [202.108.5.84] (helo=m5-84.163.com) by monty-python.gnu.org with smtp (Exim 4.52) id 1GHZnP-0001wk-Sk for help-gnu-emacs@gnu.org; Mon, 28 Aug 2006 01:36:29 -0400 Original-Received: from ywb-desktop (unknown [218.17.227.208]) by smtp4 (Coremail) with SMTP id wKjRDrBLYAaofvJEIb58Ag==.34471S2; Mon, 28 Aug 2006 13:27:06 +0800 (CST) Original-To: emacs In-Reply-To: <1156735064.663675.84930@m73g2000cwd.googlegroups.com> User-Agent: Opera Mail/9.01 (Linux) 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:36978 Archived-At: Maybe you function encounter some error, because original-frame always have many windows, and should use selected-frame-set-input-focus finally. (defun windows-into-frames () "If the current frame has more than one window, make each window display in its own seperate frame." (interactive) (let ((original-frame (selected-frame)) (original-window (selected-window))) (dolist (win (window-list)) (when (not (eq win original-window)) (select-window win) (make-frame) (select-frame original-frame))) (select-frame-set-input-focus original-frame) (select-window original-window))) On Mon, 28 Aug 2006 11:17:44 +0800, wrote: > > (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))) -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/