emacs-devel
[Top][All Lists]
Advanced

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

Re: New keybinding suggestion: C-x _ for `shrink-window'


From: Bastien
Subject: Re: New keybinding suggestion: C-x _ for `shrink-window'
Date: Sun, 11 Nov 2007 17:10:21 +0000
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.0 (gnu/linux)

I uploaded a new version:

  http://www.cognition.ens.fr/~guerry/u/window-edit.el

Richard Stallman <address@hidden> writes:

>     If this command is invoked in a single-window frame, only propose
>     to split the window.  Otherwise propose to move the borders with
>     the arrow keys.
>
> I don't understand what that means.  Could you please spell it out?

I updated the docstring like this:

  By default, resizing is done by increasing/decreasing window
  width and height.  In this mode, use the up and down arrow keys
  to enlarge or shrink the window and use the right and left arrow
  keys to enlarge or shrink the window horizontally.
  
  Resizing can also be done by moving the window borders.  In this
  mode, use the arrow keys to move the corresponding border in the
  arrow direction -- e.g. the left arrow key will try to move the
  left border to the left.

  You can toggle between resize-window and move-borders with SPC.
  
  The initial window configuration is stored in a ring.  You can
  switch back to this configuration by pressing `r'.  You can add
  more window configurations to this ring by pressing `s'.
  
>       Hitting SPC will switch from this move-borders mode to the
>     resize-windows mode, where arrows keys don't point to direction
>     but rather increase or decrease the window size.
>
> I have a guess as to what that means, but I am not confident the guess
> is right.  Can you please spell it out?

We had a discussion earlier on this list about whether the arrow keys
should just increase/decrease the window width/height, or better move
the borders (with the left arrow key moving the left border to the left,
for example.)

By default, window-edit expect the arrow keys to increase/decrease the
width/height of the window.  Pressing SPC switches to the move-borders
mode.  Maybe "resize-window" and "move-borders" are not the right names
for the modes, I don't have better ones for now.

>     S-arrows:    jump to other window direction-wise
>
> What does that mean?

Hitting the right arrow key will find the right window, if any.  It
basically calls (windmove-right).

>        +/-:    increase/decrease line units
>
> Does that mean + and - always change the height of the window?

I changed this to:

  +/-:    increase/decrease INCREMENT

where INCREMENT is the number of line(s) for any resizing. 

I hope it's clearer.

>          ~:    negate argument
>
> Where would you want to use a negative argument?

  |---+---+---|
  | A | B | C |
  |---+---+---|

When the point is in window B and you're in move-borders mode, <left>
will move the left border of window B to the left, and <right> will move
its right border to the right.  But you might want to quickly move the
left border to the right.  So instead of finding window A and moving its
right border to the right, you'll negate the argument and move the left
border (which will move to the right instead of moving to the left.)

Don't know if this is *that* useful, I'll see later.

>       (run-at-time 15 10 '(lambda () (setq msg "")))
>
> cthat is a very strange thing.  There needs to be a comment that
> thoroughly explains the use of MSG.

Removed.

>                ((setq arg0 (memq e '(?\^1 ?\^2 ?\^3 ?\^4 ?\^5 ?\^6 ?\^7 ?\^8 
> ?\^9)))
>                 (setq arg (- 10 (length arg0))))
>
> What does that do?  There is no comment.

Added.  It "computes" the value of `N' from a keystroke like C-N.

Thanks for the feedback,

-- 
Bastien




reply via email to

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