all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Xah <xahlee@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: delete window help
Date: Tue, 4 Nov 2008 17:47:45 -0800 (PST)	[thread overview]
Message-ID: <23d20fa2-6078-4d68-a7ab-03d0f2a1c739@p10g2000prf.googlegroups.com> (raw)
In-Reply-To: 3339f6a0-09b2-4e43-9d31-a2c68bd732a4@b31g2000prb.googlegroups.com

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 “Ctrl+x (” then start typing your
keystrokes. When done, type “Ctrl+x )”. This records your keystrokes.
To run the keystrokes you've recorded, type “Ctrl+x e”.

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 “Alt+x name-last-kbd-macro”, then
type “Alt+x insert-kbd-macro”, which will insert the lisp code for the
keyboard macro at the cursor point. Put the code in your emacs init
file (usually at “~/.emacs”). Then, you can execute your keyboard
macro like this: “Alt+x yourMacroName” 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 “How to Define Keyboard Shortcuts in Emacs” 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
\xAD\xF4 http://xahlee.org/



  parent reply	other threads:[~2008-11-05  1:47 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-04 17:57 delete window help bbrady
2008-11-04 20:42 ` Xah
2008-11-04 21:41   ` bbrady
2008-11-04 22:47     ` aartist
2008-11-05  1:47     ` Xah [this message]
2008-11-05  2:20       ` bbrady
2008-11-05  6:39         ` Xah
2008-11-05 16:56           ` aartist
2008-11-05 21:15             ` bbrady
2008-11-05 22:41         ` Chetan
2008-11-06  0:48           ` bbrady
     [not found]             ` <u3ai5389e.fsf@myhost.sbcglobal.net>
2008-11-06 17:29               ` bbrady
2008-11-06 16:30           ` Drew Adams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=23d20fa2-6078-4d68-a7ab-03d0f2a1c739@p10g2000prf.googlegroups.com \
    --to=xahlee@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.