From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Bastien Newsgroups: gmane.emacs.devel,gmane.emacs.help Subject: Re: New keybinding suggestion: C-x _ for `shrink-window' Date: Sun, 28 Oct 2007 14:40:08 +0000 Message-ID: <87sl3v2th3.fsf@bzg.ath.cx> References: <87r6jfed61.fsf@bzg.ath.cx> <4724674B.1090404@gmail.com> <87d4uza1f0.fsf@bzg.ath.cx> <472470CD.8060806@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1193578876 4742 80.91.229.12 (28 Oct 2007 13:41:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 28 Oct 2007 13:41:16 +0000 (UTC) Cc: "help-gnu-emacs@gnu.org" , emacs-devel To: "Lennart Borgman \(gmail\)" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Oct 28 14:41:18 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Im8OD-0002Wa-I2 for ged-emacs-devel@m.gmane.org; Sun, 28 Oct 2007 14:41:17 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Im8O4-00084A-Hd for ged-emacs-devel@m.gmane.org; Sun, 28 Oct 2007 09:41:08 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Im8Nu-0007yt-Sc for emacs-devel@gnu.org; Sun, 28 Oct 2007 09:40:58 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Im8NF-0007AP-PV for emacs-devel@gnu.org; Sun, 28 Oct 2007 09:40:58 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Im8NF-0007A1-Jy for emacs-devel@gnu.org; Sun, 28 Oct 2007 09:40:17 -0400 Original-Received: from ug-out-1314.google.com ([66.249.92.170]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Im8NE-00057V-S9 for emacs-devel@gnu.org; Sun, 28 Oct 2007 09:40:17 -0400 Original-Received: by ug-out-1314.google.com with SMTP id a2so977657ugf for ; Sun, 28 Oct 2007 06:40:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=beta; h=domainkey-signature:received:received:received:from:to:cc:subject:in-reply-to:references:user-agent:date:message-id:mime-version:content-type:sender; bh=/2BFEpDS5nZK47iso1dFt4F8MXUewcqL5evFDgH4AAs=; b=HLgJm2tL6ioIemf586QEZAJ+FNf7qvBhLL8d96GNk7DDDsMZnqi9br+SAwnGZlkWD1TGS1x5AXnzRvieE9Z4sin4UZTtYGt2Ru0w/IJJXI5CDTqJx6Xf41hKICIld+P7w8SXpwp3NIEYrRZnnXSe5GKWAerWoh0e6mNPYKP820g= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=beta; h=received:from:to:cc:subject:in-reply-to:references:user-agent:date:message-id:mime-version:content-type:sender; b=kdusndCD4iSxKUrLlmGXhTQqpC69NYPbkFdGGGQ3yyArJT8Qkw+nyN6Q4/IsW8zM/uQoIuxSUwZ/eGdiLSFgvI7GgP2GObaMxgoX04ZXzOItx1+shZbaCer4aheuBK54cbT5a3TxJIhBBYQmJsygA5oc8hYjjD44ybpqp4ftSuc= Original-Received: by 10.67.15.17 with SMTP id s17mr39917ugi.1193578815650; Sun, 28 Oct 2007 06:40:15 -0700 (PDT) Original-Received: from bzg.ath.cx ( [129.199.12.108]) by mx.google.com with ESMTPS id y2sm11603304mug.2007.10.28.06.40.13 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 28 Oct 2007 06:40:14 -0700 (PDT) Original-Received: by bzg.ath.cx (Postfix, from userid 1000) id F35EC1575BA; Sun, 28 Oct 2007 14:40:08 +0000 (GMT) In-Reply-To: <472470CD.8060806@gmail.com> (Lennart Borgman's message of "Sun, 28 Oct 2007 12:21:49 +0100") User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.0 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:81936 gmane.emacs.help:48873 Archived-At: "Lennart Borgman (gmail)" 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 + 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 + won't shrink the window if it's larger than the >> buffer; but C-x 2 C-x + 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