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 17:47:45 -0800 (PST) Organization: http://groups.google.com Message-ID: <23d20fa2-6078-4d68-a7ab-03d0f2a1c739@p10g2000prf.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-2022-JP Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1225852861 9115 80.91.229.12 (5 Nov 2008 02:41:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 5 Nov 2008 02:41:01 +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 03:42:03 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 1KxYLI-0005u5-27 for geh-help-gnu-emacs@m.gmane.org; Wed, 05 Nov 2008 03:42:01 +0100 Original-Received: from localhost ([127.0.0.1]:58500 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KxYK9-0007t7-Hc for geh-help-gnu-emacs@m.gmane.org; Tue, 04 Nov 2008 21:40:49 -0500 Original-Path: news.stanford.edu!newsfeed.stanford.edu!postnews.google.com!p10g2000prf.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 67 Original-NNTP-Posting-Host: 24.6.185.159 Original-X-Trace: posting.google.com 1225849665 3149 127.0.0.1 (5 Nov 2008 01:47:45 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Wed, 5 Nov 2008 01:47:45 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: p10g2000prf.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:164116 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:59451 Archived-At: Xah 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. bbrady wrote: > 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) you are right it didn't work. I didn't pay close attention when testing it. easiest way to do what u want is probably with a macro though. Q: How to record a sequence of keystrokes? To record keystrokes, type $B!H(BCtrl+x ($B!I(B then start typing your keystrokes. When done, type $B!H(BCtrl+x )$B!I(B. This records your keystrokes. To run the keystrokes you've recorded, type $B!H(BCtrl+x e$B!I(B. Here are the command names and their shortcuts: start-kbd-macro Ctrl+x ( end-kbd-macro Ctrl+x ) call-last-kbd-macro Ctrl+x e If you want to use your keyboard macro for future use, you can save it. To save the macro, first type $B!H(BAlt+x name-last-kbd-macro$B!I(B, then type $B!H(BAlt+x insert-kbd-macro$B!I(B, which will insert the lisp code for the keyboard macro at the cursor point. Put the code in your emacs init file (usually at $B!H(B~/.emacs$B!I(B). Then, you can execute your keyboard macro like this: $B!H(BAlt+x yourMacroName$B!I(B the next time you start emacs. the above is from this tutorial page: http://xahlee.org/emacs/emacs_adv_tips.html here's the macro i got using the above, and tested it works. (fset 'remove-next-pane (lambda (&optional arg) "Keyboard macro." (interactive "p") (kmacro- exec-ring-item (quote ([134217825 111 116 104 101 114 45 119 105 110 tab return 134217825 100 101 108 101 116 tab 119 105 110 tab return] 0 "%d")) arg))) once you have this, you can call it with Alt+x or assign a keyboard shortcut to it. (see $B!H(BHow to Define Keyboard Shortcuts in Emacs$B!I(B at http://xahlee.org/emacs/keyboard_shortcuts.html ) You might be interested to simply define a easy kbd shortcuts for spliting window and moving cursor to other pane. That way, you might not need what you asked. For example, for qwerty keyboard, i have: Alt+s = move cursor to next pane Alt+2 = split window Alt+Shift+2 = split window side by side http://xahlee.org/emacs/ergonomic_emacs_keybinding.html Xah $B-t(B http://xahlee.org/