help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: delete window help


From: Drew Adams
Subject: RE: delete window help
Date: Thu, 6 Nov 2008 08:30:14 -0800

> > The problem I have is, how do I figure out what that 'other'
> > window is? ... 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 was working on something similar for myself. It is for doing stuff
> visually with emacs windows. There are other things that I wanted to
> do, but it can choose a window using arrow keys (or programmatically)
> and then delete it or do something else. It works, but it hasn't had
> much testing. I could post it if it would be of interest. It would
> help me iron out any bugs as well. 

FWIW, in Icicles, by default:

1. `C-x 0' is bound to a command that does this:

a. With no prefix arg, same as vanilla Emacs:
   delete selected window.
b. With a prefix arg, prompt for a (displayed) buffer name;
   delete its window(s).

2. `C-x o' is bound to a command that does this:

a. With no prefix arg, like vanilla Emacs: `other-window',
   but if the frame has only one window, then `other-frame'.
b. With a prefix arg, prompt for a window or frame name
   (+ [N]) to select.

For 2b (`C-u C-x o'):

* If the current frame has only one window, then you choose a
  frame to select, not a window (`C-x 5 o' also does this).
* Otherwise, you choose among the frame's windows.
  With a zero prefix arg, choose windows in all frames.

A window name is its buffer name plus, if needed, a unique index: `foo',
`foo[2]', `foo[3]'. Similarly, a frame name is its `name' parameter plus, if
needed, an index.

With a prefix arg, these (`C-x 0' and `C-x o') are multi-commands, which means
you can act on (delete or select) any number of windows or frames. Completion,
cycling, and direct choice are available. Completion and cycling work together,
so you need not cycle through all windows to get to the one you want: your input
filters the choices to cycle.

http://www.emacswiki.org/cgi-bin/wiki/Icicles





reply via email to

[Prev in Thread] Current Thread [Next in Thread]