From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Xah Newsgroups: gmane.emacs.help Subject: Re: delete window help Date: Tue, 4 Nov 2008 22:39:16 -0800 (PST) Organization: http://groups.google.com Message-ID: <6d9b665f-2128-4123-a1b4-0397f2bc52e4@o4g2000pra.googlegroups.com> References: <43daba71-dcd5-4471-836b-00a0976c0e3d@j40g2000prh.googlegroups.com> <26df59a1-196b-4c01-8b58-c82a5bebae37@d10g2000pra.googlegroups.com> <3339f6a0-09b2-4e43-9d31-a2c68bd732a4@b31g2000prb.googlegroups.com> <23d20fa2-6078-4d68-a7ab-03d0f2a1c739@p10g2000prf.googlegroups.com> <3a7d1076-8b68-4b24-9e4e-b8c2f40f3b8c@b31g2000prf.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1225867319 5012 80.91.229.12 (5 Nov 2008 06:41:59 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 5 Nov 2008 06:41:59 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Nov 05 07:43:02 2008 connect(): Connection refused Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Kxc6Q-00073c-FQ for geh-help-gnu-emacs@m.gmane.org; Wed, 05 Nov 2008 07:42:54 +0100 Original-Received: from localhost ([127.0.0.1]:47434 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kxc5J-0004In-8K for geh-help-gnu-emacs@m.gmane.org; Wed, 05 Nov 2008 01:41:45 -0500 Original-Path: news.stanford.edu!newsfeed.stanford.edu!postnews.google.com!o4g2000pra.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 40 Original-NNTP-Posting-Host: 24.6.185.159 Original-X-Trace: posting.google.com 1225867156 18936 127.0.0.1 (5 Nov 2008 06:39:16 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Wed, 5 Nov 2008 06:39:16 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: o4g2000pra.googlegroups.com; posting-host=24.6.185.159; posting-account=bRPKjQoAAACxZsR8_VPXCX27T2YcsyMA User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_4_11; en) AppleWebKit/525.18 (KHTML, like Gecko) Version/3.1.2 Safari/525.22, gzip(gfe), gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.help:164123 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:59457 Archived-At: On Nov 4, 6:20 pm, bbrady wrote: > Xah, Thanks for your in-depth response. > > I am familiar with macros and am not opposed to using a macro for this > problem. In fact, I have keyboard macros defined for splitting/ > switching windows similar to yours (I stumbled across your website > some time ago). However, my original question was slightly more > complicated than the one I posted -- I came up with simplified version > in order to explain it more easily. > > So, here's the more complicated part: > > The window configuration isn't always the same as the one I gave in > the first post. A lot of times I'll split a window temporarily and > work in one of them, while refering to the other. Then, that other > window will no longer be useful for me, and I want to kill it without > switching from the current window. The problem I have is, how do I > figure out what that 'other' window is? Depending on the order in > which I created the windows, and which window I'm in, using Ctrl-x o > (or Alt+s) might not put me in the correct window. So, I'm looking for > a way to not have to cycle through all the windows. > > Going back to my original example, lets say I'm in window 'c' and I > want to delete-window 'a' (whereas before I was in window 'a' and > wanted to delete window 'c'). I can't just switch-window, because > that'll take me to window 'b'. I have to cycle through (in this case, > its only one window, but in general, it can be a lot of windows). So, > is there a way to find a "parent window" so that I know what to pass > to the delete-window function? i don't think emacs records which pane a pane is splitted from. Though i haven't done any elisp related to display so i might be wrong. you might be able to write your function so that when a win is split, it records the newly created pane with the pane it splitted from... Xah =E2=88=91 http://xahlee.org/ =E2=98=84