unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Bastien <bzg@altern.org>
To: "Lennart Borgman \(gmail\)" <lennart.borgman@gmail.com>
Cc: "help-gnu-emacs@gnu.org" <help-gnu-emacs@gnu.org>,
	emacs-devel <emacs-devel@gnu.org>
Subject: Re: New keybinding suggestion: C-x _ for `shrink-window'
Date: Sun, 28 Oct 2007 14:40:08 +0000	[thread overview]
Message-ID: <87sl3v2th3.fsf@bzg.ath.cx> (raw)
In-Reply-To: <472470CD.8060806@gmail.com> (Lennart Borgman's message of "Sun,  28 Oct 2007 12:21:49 +0100")

"Lennart Borgman (gmail)" <lennart.borgman@gmail.com> writes:

>> My suggestion would be to have both: C-x _ as a new keybinding for
>> `shrink-window' (since we already have a key for `enlarge-window')
>> *and* bw-interactive.el, which sounds nice.  
>
> It would be a bit strange, see below.

Why?  Letting people have the usual keybindings like:

  C-x +  `balance-windows'
  C-x ^  `enlarge-window'
  C-x -  `shrink-window-if-larger-than-buffer'
 [C-x _  `shrink-window'] <= according to what I suggest

*and* letting them load bw-interactive.el if they want to resize windows
interactively looks fine to me.  It's simpler 1) not to rebind C-x + and
2) to have C-x + balancing the windows (instead of C-x + + which add one
keystroke.)

> bw-interactive lets you do this quite easily, with just "C-x + +" (today
> it is on "C-x +").

My point is precisely that C-x + is fine as it is.

>> A few comments on bw-interactive.el though.  Assume I start with a
>> full window and have C-x + bound to `bw-start-resize-mode':
>>
>> - It seems that the first arrow keystroke says: "Hello, please start
>>   resizing with arrow keys!" but wait for another keystroke. I think
>>   the user might expect that the first arrow keystroke has a visible
>>   effect on window resizing already.
>
> I do not believe so, but starting the resizing and telling the user what
> is going on is a bit complicated. 

I don't suggest that bw-interactive.el should tell the user what is
going on.  I suggest that `bw-start-resize-mode' start listening to the
next keystroke (as it does) and that the next keystroke take immediately
action.  Again, it's more intuitive to me that C-x + <up> increase the
vertical size of the window immediately.

> I tried to mimic the way this is done some OS window handlers.

Which one?  I'm using ratpoison.  C-t C-r does the job of your C-x +,
then C-f will enlarge the ratpoison-window immediately, no need to press
C-f twice.

> When you start resizing you get into a state where the window handler
> first needs to know which border to move. The mouse pointer is then
> moved to that border.

Isn't that simpler to move the border when you know which border to
move?  Maybe I'm too much thinking the ratpoison way here.  An example
of a WM implementing the behavior you suggest would be useful, because 
I honestly don't see why this has to be a two-step process.

>> - C-x 2 C-x + <up> won't shrink the window if it's larger than the
>>   buffer;  but C-x 2 C-x + <down> <up> <up> will shrink the window
>>   even if it's *initially* larger than buffer.  I believe that the
>> first set of keystrokes should already shrink the window, or at
>> least send an error to the user.
>
> This is a slight misunderstanding, see above.

Okay, understood.

> Maybe adding a message of some kind when exiting the minor mode for
> resizing would make thins more clear?

Yes, sure.

-- 
Bastien

  reply	other threads:[~2007-10-28 14:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <87r6jfed61.fsf@bzg.ath.cx>
     [not found] ` <4724674B.1090404@gmail.com>
2007-10-28 12:06   ` New keybinding suggestion: C-x _ for `shrink-window' Bastien
2007-10-28 11:21     ` Lennart Borgman (gmail)
2007-10-28 14:40       ` Bastien [this message]
2007-10-28 20:20         ` Lennart Borgman (gmail)
2007-10-28 21:47           ` Bastien
     [not found] ` <E1ImIDy-00077j-Pt@fencepost.gnu.org>
2007-10-29 13:14   ` Bastien
2007-10-31 11:57   ` Bastien

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=87sl3v2th3.fsf@bzg.ath.cx \
    --to=bzg@altern.org \
    --cc=emacs-devel@gnu.org \
    --cc=help-gnu-emacs@gnu.org \
    --cc=lennart.borgman@gmail.com \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).