From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: Window configurations Date: Fri, 07 May 2010 21:14:43 +0300 Organization: JURTA Message-ID: <87sk6360ks.fsf@mail.jurta.org> References: <4BB4CF6B.2000007@alice.it> <45EB8DD4-B0F8-4FB3-941F-13FADA4DAD66@swipnet.se> <4BC1854B.2060409@alice.it> <4BC1A9D2.8050607@swipnet.se> <4BC206C0.2010202@alice.it> <87fx2pdvfq.fsf@mail.jurta.org> <87y6gg95ad.fsf@mail.jurta.org> <750140A47B7D4FBD93371813D65478F8@us.oracle.com> <87eii63v4j.fsf@mail.jurta.org> <0840B3F4D9E84706874EDD2CA2CC4236@us.oracle.com> <87vdbhgqgd.fsf@mail.jurta.org> <828BB36311A84C43B96D1F2A559DACAE@us.oracle.com> <87d3xo662u.fsf@mail.jurta.org> <69D40D69CC6F4982A8E91D8D8F0F494F@us.oracle.com> <87r5m4hz39.fsf@mail.jurta.org> <4BD40821.70808@gmx.at> <87zl0rtmqy.fsf@mail.jurta.org> <4BD5BC62.5070306@gmx.at> <53146.130.55.118.19.1272398101.squirrel@webmail.lanl.gov> <87mxwom16s.fsf@mail.jurta.org> <49595.130.55.132.217.1272464118.squirrel@webmail.lanl.gov> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1273265812 24618 80.91.229.12 (7 May 2010 20:56:52 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 7 May 2010 20:56:52 +0000 (UTC) Cc: martin rudalics , Emacs To: herring@lanl.gov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri May 07 22:56:51 2010 connect(): No such file or directory Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OAUbL-0001cA-6q for ged-emacs-devel@m.gmane.org; Fri, 07 May 2010 22:56:51 +0200 Original-Received: from localhost ([127.0.0.1]:43475 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OAUbK-0000vA-Lb for ged-emacs-devel@m.gmane.org; Fri, 07 May 2010 16:56:50 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1OASI3-0006Tj-1G for emacs-devel@gnu.org; Fri, 07 May 2010 14:28:47 -0400 Original-Received: from [140.186.70.92] (port=56833 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OASI1-0006Sb-3O for emacs-devel@gnu.org; Fri, 07 May 2010 14:28:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OASHz-0007s7-Dr for emacs-devel@gnu.org; Fri, 07 May 2010 14:28:44 -0400 Original-Received: from smtp-out1.starman.ee ([85.253.0.3]:49604 helo=mx1.starman.ee) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OASHz-0007rl-4I for emacs-devel@gnu.org; Fri, 07 May 2010 14:28:43 -0400 X-Virus-Scanned: by Amavisd-New at mx1.starman.ee Original-Received: from mail.starman.ee (62.65.209.247.cable.starman.ee [62.65.209.247]) by mx1.starman.ee (Postfix) with ESMTP id C06063F40CD; Fri, 7 May 2010 21:28:38 +0300 (EEST) In-Reply-To: <49595.130.55.132.217.1272464118.squirrel@webmail.lanl.gov> (Davis Herring's message of "Wed, 28 Apr 2010 07:15:18 -0700 (PDT)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (x86_64-pc-linux-gnu) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:124624 Archived-At: > Perhaps then I am an android. I look at that code and it takes me quite a > while to decide that the window-tree it produces (as I defined it) is (I > think) > > (nil # 0.15 # 0.3 (t # 0.5 #)) The problem is that the internal structure with the window configuration is a list. So when exposed to Lisp, it should be a Lisp list. It you want a tree, it's possible to write a Lisp function that converts a window list to a window tree, e.g. (window-configuration-to-tree (window-configuration-to-list (current-window-configuration))) where `window-configuration-to-list' is a C function that exposes # to Lisp as a list like (window-configuration (frame-cols . 194) (frame-lines . 77) (root-window . #) (windows (window (window . #) (left-col . 0) (top-line . 5) (total-cols . 200) (total-lines . 71)) (window (window . #) (parent . 0) (left-col . 0) (top-line . 5) (total-cols . 100) (total-lines . 71)) (window (window . #) (parent . 0) (prev . 1) (left-col . 100) (top-line . 5) (total-cols . 100) (total-lines . 71)) (window (window . #) (parent . 2) (left-col . 100) (top-line . 5) (total-cols . 100) (total-lines . 35)) (window (window . #) (parent . 2) (prev . 3) (left-col . 100) (top-line . 40) (total-cols . 100) (total-lines . 36)) (window (window . #) (prev . 0) (left-col . 0) (top-line . 76) (total-cols . 200) (total-lines . 1)))) and `window-configuration-to-tree' is a Lisp function that converts it to a window-tree. -- Juri Linkov http://www.jurta.org/emacs/