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: Tue, 4 Nov 2008 14:47:25 -0800 (PST) Organization: http://groups.google.com Message-ID: <76109dfb-82d6-429d-ae03-a9cd4b10bbe0@e38g2000prn.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> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1225842066 15922 80.91.229.12 (4 Nov 2008 23:41:06 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 4 Nov 2008 23:41:06 +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 00:42:09 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 1KxVX9-0002Ym-Us for geh-help-gnu-emacs@m.gmane.org; Wed, 05 Nov 2008 00:42:04 +0100 Original-Received: from localhost ([127.0.0.1]:32940 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KxVW2-00079p-EX for geh-help-gnu-emacs@m.gmane.org; Tue, 04 Nov 2008 18:40:54 -0500 Original-Path: news.stanford.edu!headwall.stanford.edu!newsfeed.stanford.edu!postnews.google.com!e38g2000prn.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 61 Original-NNTP-Posting-Host: 135.205.213.151 Original-X-Trace: posting.google.com 1225838845 27036 127.0.0.1 (4 Nov 2008 22:47:25 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Tue, 4 Nov 2008 22:47:25 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: e38g2000prn.googlegroups.com; posting-host=135.205.213.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:164115 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:59450 Archived-At: On Nov 4, 4:41=A0pm, bbrady wrote: > > give it a argument of 2. Type this: > > > Ctrl+u 2 Ctrl+x 0 > > > in general, if you want to give a argument to a command, just type Ctrl > > +u first then argument, then call the command. > > Thanks for the info, I didn't know how to give arguments to a > command. > > I've tried what you mentioned above and its not working. I also tried > giving delete-window arguments 0 and 1. The behavior is the same. That > is, window 'c' becomes the entire left side. Which is the same thing > that happens when I run Ctrl+x 0 without arguments. (Note, I was in > window 'a' when I did Ctrl+u 2 Ctrl+x 0) > > To make sure we're on the same page, executing the elisp code below > should bring you to the same state I'm in when I want to delete window > 'c'. > > (split-window-horizontally) > (split-window) > (find-file "a") > (other-window 1) > (find-file "c") > (other-window 1) > (find-file "b") > (other-window 1) > > I tried eval-expression on (delete-window 2) and I got the following > error trace: > > Debugger entered--Lisp error: (wrong-type-argument windowp 2) > =A0 delete-window(2) > =A0 eval((delete-window 2)) > =A0 eval-expression((delete-window 2) nil) > =A0 call-interactively(eval-expression) > =A0 execute-extended-command(nil) > =A0 call-interactively(execute-extended-command) > > It looks like delete-window wants a pointer to a window object, > instead of an integer. > > bbrady Yes,. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D C-x 0 runs the command delete-window which is an interactive built-in function in `C source code'. It is bound to C-x 0. (delete-window &optional window) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Of course, you can use macro. Remove window from the display. Default is selected windo