From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: aartist Newsgroups: gmane.emacs.help Subject: Re: delete window help Date: Wed, 5 Nov 2008 08:56:14 -0800 (PST) Organization: http://groups.google.com Message-ID: <83e1ffc8-b0d8-463a-9214-29186df93ee6@b31g2000prb.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> <6d9b665f-2128-4123-a1b4-0397f2bc52e4@o4g2000pra.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 1225906934 6640 80.91.229.12 (5 Nov 2008 17:42:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 5 Nov 2008 17:42:14 +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 18:43:15 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 1KxmPO-0005l4-Jv for geh-help-gnu-emacs@m.gmane.org; Wed, 05 Nov 2008 18:43:10 +0100 Original-Received: from localhost ([127.0.0.1]:50680 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KxmOH-0008LO-Ig for geh-help-gnu-emacs@m.gmane.org; Wed, 05 Nov 2008 12:42:01 -0500 Original-Path: news.stanford.edu!newsfeed.stanford.edu!postnews.google.com!b31g2000prb.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 48 Original-NNTP-Posting-Host: 68.197.26.151 Original-X-Trace: posting.google.com 1225904174 5738 127.0.0.1 (5 Nov 2008 16:56:14 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Wed, 5 Nov 2008 16:56:14 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: b31g2000prb.googlegroups.com; posting-host=68.197.26.151; posting-account=WwaeAgoAAADmWT5YXN5d6o6-Vgorvs1L User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3,gzip(gfe),gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.help:164142 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:59476 Archived-At: On Nov 5, 1:39=C2=A0am, Xah wrote: > 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... > > =C2=A0 Xah > =E2=88=91http://xahlee.org/ > > =E2=98=84 Can you add the hook to the split window function. That hook is going to store whatever necessary information, which can be called from the parent/original window.