From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Lennart Borgman (gmail)" Newsgroups: gmane.emacs.help,gmane.emacs.devel Subject: Re: New keybinding suggestion: C-x _ for `shrink-window' Date: Sun, 28 Oct 2007 21:20:26 +0100 Message-ID: <4724EF0A.8050909@gmail.com> References: <87r6jfed61.fsf@bzg.ath.cx> <4724674B.1090404@gmail.com> <87d4uza1f0.fsf@bzg.ath.cx> <472470CD.8060806@gmail.com> <87sl3v2th3.fsf@bzg.ath.cx> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1193602905 3006 80.91.229.12 (28 Oct 2007 20:21:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 28 Oct 2007 20:21:45 +0000 (UTC) Cc: "help-gnu-emacs@gnu.org" , emacs-devel To: Bastien Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Oct 28 21:21:47 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1ImEdc-00059l-Sw for geh-help-gnu-emacs@m.gmane.org; Sun, 28 Oct 2007 21:21:46 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ImEdL-0007yv-6W for geh-help-gnu-emacs@m.gmane.org; Sun, 28 Oct 2007 16:21:19 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1ImEd3-0007w9-VK for help-gnu-emacs@gnu.org; Sun, 28 Oct 2007 16:21:01 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1ImEcv-0007aP-Cl for help-gnu-emacs@gnu.org; Sun, 28 Oct 2007 16:21:01 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ImEcv-0007Zv-0c; Sun, 28 Oct 2007 16:20:53 -0400 Original-Received: from ch-smtp01.sth.basefarm.net ([80.76.149.212]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1ImEcs-0004jl-SG; Sun, 28 Oct 2007 16:20:52 -0400 Original-Received: from c83-254-148-228.bredband.comhem.se ([83.254.148.228]:62307 helo=[127.0.0.1]) by ch-smtp01.sth.basefarm.net with esmtp (Exim 4.68) (envelope-from ) id 1ImEcl-00058A-59; Sun, 28 Oct 2007 21:20:44 +0100 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070728 Thunderbird/2.0.0.6 Mnenhy/0.7.5.666 In-Reply-To: <87sl3v2th3.fsf@bzg.ath.cx> X-Antivirus: avast! (VPS 071028-0, 2007-10-28), Outbound message X-Antivirus-Status: Clean X-Originating-IP: 83.254.148.228 X-Scan-Result: No virus found in message 1ImEcl-00058A-59. X-Scan-Signature: ch-smtp01.sth.basefarm.net 1ImEcl-00058A-59 ebc97fcdf9a3502e89e4ba0ab2dd4c41 X-detected-kernel: by monty-python.gnu.org: Linux 2.6? (barebone, rare!) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:48882 gmane.emacs.devel:81986 Archived-At: Bastien wrote: > "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' This is not well defined. There may be 4 different borders to move. > C-x - `shrink-window-if-larger-than-buffer' Same as above. > [C-x _ `shrink-window'] <= according to what I suggest Same as above. > *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. And mine is that resizing windows should not occupy more human memory and key binding space if possible. "C-x + +" is nearly as easy as "C-x +" to type. > 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. See above. You have to decide which border to act on first. >> 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. Eh, I am using w32. Do you mean that ratpoison interfere with Emacs key bindings? >> 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. I tried to explain above. Is it clear now? (Or have I perhaps missed something?) >> Maybe adding a message of some kind when exiting the minor mode for >> resizing would make thins more clear? > > Yes, sure. Thanks, I will add a message when exiting the minor mode then.