unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / 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: 160+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-28 10:39 New keybinding suggestion: C-x _ for `shrink-window' Bastien
2007-10-28 10:41 ` Lennart Borgman (gmail)
2007-10-28 12:06   ` 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
2007-10-28 22:05             ` Lennart Borgman (gmail)
2007-10-29  0:03             ` Lennart Borgman (gmail)
2007-10-29  8:43               ` Bastien
2007-10-29  0:11 ` Richard Stallman
2007-10-31 11:58   ` Bastien
2007-10-31 15:54     ` Stefan Monnier
2007-10-31 16:18       ` Juanma Barranquero
2007-10-31 17:31         ` Bastien
2007-10-31 23:58         ` Richard Stallman
2007-11-01  0:26           ` Lennart Borgman (gmail)
2007-11-01  1:14             ` Juanma Barranquero
2007-11-01  1:28               ` Lennart Borgman (gmail)
2007-11-01  1:46                 ` Juanma Barranquero
2007-11-01  2:17                   ` Lennart Borgman (gmail)
2007-11-01  3:41               ` Bastien
2007-11-01  1:13           ` Juanma Barranquero
2007-11-01 19:04             ` Richard Stallman
2007-11-03 21:56           ` Stephen J. Turnbull
2007-11-04  1:41             ` Andreas Schwab
2007-11-04  2:49               ` Stephen J. Turnbull
2007-11-04 19:56             ` Richard Stallman
2007-10-31 16:20       ` Lennart Borgman (gmail)
2007-10-31 23:58       ` Richard Stallman
2007-11-01 16:54         ` Drew Adams
2007-11-01 22:01           ` Drew Adams
2007-11-01 22:27             ` David Kastrup
2007-11-01 23:05               ` Drew Adams
2007-11-02 14:28           ` Bastien
2007-11-02 14:28             ` Drew Adams
2007-11-03  0:20               ` Bastien
2007-11-03  3:58             ` Richard Stallman
2007-11-03  4:14               ` Miles Bader
2007-11-03  5:46                 ` Bastien
2007-11-03  5:35                   ` Miles Bader
2007-11-03 14:11                     ` Bastien
2007-11-03 15:15                   ` Drew Adams
2007-11-03 16:43                     ` Bastien
2007-11-03 16:43                       ` Lennart Borgman (gmail)
2007-11-04  0:11                 ` Richard Stallman
2007-11-05  3:30                   ` Bastien
2007-11-05  7:37                     ` Drew Adams
2007-11-05 11:06                       ` Bastien
2007-11-08 15:32                       ` Bastien
2007-11-10  1:09                         ` Drew Adams
2007-11-10  1:11                           ` Drew Adams
2007-11-11  5:00                           ` Bastien
2007-11-11  8:42                             ` Drew Adams
2007-11-11 17:17                               ` Bastien
2007-11-11 17:26                                 ` Drew Adams
2007-11-11 23:54                                   ` Richard Stallman
2007-11-12  0:07                                     ` Drew Adams
2007-11-12  3:20                                       ` Bastien
2007-11-12  2:55                                         ` Drew Adams
2007-11-12  4:18                                           ` Bastien
2007-11-12 11:47                                           ` Robert J. Chassell
2007-11-12 13:47                                             ` Bastien
2007-11-12 19:03                                               ` Lennart Borgman (gmail)
2007-11-12 21:20                                                 ` Robert J. Chassell
2007-11-12 21:31                                                 ` Drew Adams
2007-11-12 22:09                                                   ` Lennart Borgman (gmail)
2007-11-12 22:51                                                     ` Drew Adams
2007-11-14  0:26                                                       ` Lennart Borgman (gmail)
2007-11-16 23:49                                                       ` Drew Adams
2007-11-17  1:36                                                         ` Lennart Borgman (gmail)
2007-11-17  9:09                                                           ` Drew Adams
2007-11-17 15:44                                                             ` Lennart Borgman (gmail)
2007-11-17 17:28                                                               ` Drew Adams
2007-11-12 21:41                                                 ` Robert J. Chassell
2007-11-12 22:15                                                   ` Lennart Borgman (gmail)
2007-11-13 13:40                                                 ` Bastien
2007-11-13 17:51                                                   ` Juanma Barranquero
2007-11-14  0:58                                                     ` Bastien
2007-11-14  2:48                                                     ` Richard Stallman
2007-11-14  8:45                                                       ` Juanma Barranquero
2007-11-13 23:52                                                   ` Juri Linkov
2007-11-14  1:05                                                     ` Bastien
2007-11-12 17:18                                       ` Richard Stallman
2007-11-12 17:28                                         ` Drew Adams
2007-11-11 14:02                             ` Stefan Monnier
2007-11-11 17:11                               ` Bastien
2007-11-11 19:33                             ` Richard Stallman
2007-11-12  3:19                               ` Bastien
2007-11-12 17:18                                 ` Richard Stallman
2007-11-13 13:25                                   ` Bastien
2007-11-13 18:49                                     ` Robert J. Chassell
2007-11-14  0:27                                       ` Lennart Borgman (gmail)
2007-11-14 14:41                                         ` Lennart Borgman (gmail)
2007-11-14  1:14                                       ` Bastien
2007-11-14  1:56                                         ` Robert J. Chassell
2007-11-15 20:52                                           ` Bastien
2007-11-15 20:57                                             ` Bastien
     [not found]                                             ` <473CBBA7.8090507@gmail.com>
2007-11-16 12:39                                               ` Bastien
2007-11-14 17:53                                         ` Richard Stallman
2007-11-14 18:12                                           ` Bastien
     [not found]                                             ` <473B7CDD.4040401@gmail.com>
2007-11-15 21:05                                               ` Bastien
2007-11-15 21:38                                                 ` Lennart Borgman (gmail)
2007-11-15 22:27                                                   ` Lennart Borgman (gmail)
2007-11-16 12:41                                                     ` Bastien
2007-11-16 21:52                                                       ` Juri Linkov
2007-11-17  0:10                                                         ` Lennart Borgman (gmail)
2007-11-17  1:45                                                           ` Juri Linkov
2007-11-17  9:28                                                             ` martin rudalics
2007-11-17 11:58                                                               ` Bastien
2007-11-17  2:17                                                         ` Bastien
2007-11-17  9:09                                                           ` Drew Adams
2007-11-17 12:08                                                             ` Bastien
2007-11-17 17:28                                                               ` Drew Adams
2007-11-18  0:10                                                                 ` Bastien
2007-11-19  1:20                                                                   ` Drew Adams
2007-11-19  2:45                                                                     ` Bastien
2007-11-19  6:48                                                                       ` Drew Adams
2007-11-17 15:59                                                             ` Juri Linkov
2007-11-17 16:34                                                               ` Lennart Borgman (gmail)
2007-11-17 16:38                                                                 ` Juri Linkov
2007-11-17 17:25                                                                   ` Lennart Borgman (gmail)
2007-11-17 23:52                                                                   ` Bastien
2007-11-17 23:51                                                               ` Bastien
2007-11-18  0:16                                                                 ` Juri Linkov
2007-11-18  2:16                                                                   ` Bastien
2007-11-18  2:31                                                                     ` Lennart Borgman (gmail)
2007-11-18 12:04                                                                       ` Juri Linkov
2007-11-19  2:23                                                                         ` Bastien
2007-11-14 23:09                                           ` Lennart Borgman (gmail)
2007-11-14 23:46                                           ` Juri Linkov
2007-11-15  0:21                                             ` Lennart Borgman (gmail)
2007-11-15  1:08                                               ` Stefan Monnier
2007-11-15  8:29                                                 ` Lennart Borgman (gmail)
2007-11-16  1:16                                                 ` Juri Linkov
2007-11-16 12:58                                                   ` Bastien
2007-11-16 15:47                                                     ` Stefan Monnier
2007-11-16 17:13                                                       ` Bastien
2007-11-16 18:17                                                         ` Stefan Monnier
2007-11-16 19:19                                                           ` Bastien
2007-11-16 21:48                                                             ` Stefan Monnier
2007-11-17  2:26                                                               ` Bastien
2007-11-17  4:22                                                                 ` Stefan Monnier
2007-11-17 11:54                                                                   ` Bastien
2007-11-18  3:09                                                                     ` Stefan Monnier
2007-11-19  2:30                                                                       ` Bastien
2007-11-15 13:07                                               ` Richard Stallman
2007-11-15 13:07                                             ` Richard Stallman
     [not found]                         ` <E1Ir5H0-0002Ty-Jz@fencepost.gnu.org>
2007-11-11 17:10                           ` Bastien
2007-11-11 23:54                             ` Richard Stallman
2007-11-12  3:33                               ` Bastien
2007-11-12 17:18                                 ` Richard Stallman
2007-11-13 13:27                                   ` Bastien
2007-11-11 23:54                             ` Richard Stallman
2007-11-12  3:36                               ` Bastien
2007-11-18 22:46                                 ` Richard Stallman
2007-11-19  2:34                                   ` Bastien
2007-11-02 16:51       ` Sascha Wilde
2007-10-31 23:58     ` Richard Stallman
2007-11-01  6:30       ` David Kastrup

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.
Code repositories for project(s) associated with this public inbox

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

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).