From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Bastien Newsgroups: gmane.emacs.devel Subject: Re: New keybinding suggestion: C-x _ for `shrink-window' Date: Sun, 11 Nov 2007 17:10:21 +0000 Message-ID: <873avcaete.fsf@bzg.ath.cx> References: <87bqa4bvnn.fsf@bzg.ath.cx> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1194797441 15078 80.91.229.12 (11 Nov 2007 16:10:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 11 Nov 2007 16:10:41 +0000 (UTC) Cc: Richard Stallman To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Nov 11 17:10:44 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 1IrFOV-0004r0-LU for ged-emacs-devel@m.gmane.org; Sun, 11 Nov 2007 17:10:44 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IrFOJ-0007Df-HR for ged-emacs-devel@m.gmane.org; Sun, 11 Nov 2007 11:10:31 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IrFOE-0007Cx-Qu for emacs-devel@gnu.org; Sun, 11 Nov 2007 11:10:26 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IrFOD-0007CC-0O for emacs-devel@gnu.org; Sun, 11 Nov 2007 11:10:26 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IrFOC-0007C9-TF for emacs-devel@gnu.org; Sun, 11 Nov 2007 11:10:24 -0500 Original-Received: from ug-out-1314.google.com ([66.249.92.175]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IrFOB-0002JE-SU for emacs-devel@gnu.org; Sun, 11 Nov 2007 11:10:24 -0500 Original-Received: by ug-out-1314.google.com with SMTP id a2so682758ugf for ; Sun, 11 Nov 2007 08:10:22 -0800 (PST) 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=P4sz+aKGiGMrKtmldCdVwoq06OicvG3vMtq1FCCkiU0=; b=WltKQLuXjdCJ0xl3vezVibsV+gG7DH+StLNuhp+89WVgme/cB6+/J1rt2HId2DXhRLOuPY1H1li0YI0VgZhF5UoBnEo3cS6usTibVA81lCOWOjjeVfGPxhX5jk3hUk5fIBtjCLeW9wqbZhHekYsmtwYO0Nb4z5FbtyHl5NYra88= 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=fH6OloXav8RnfBaNKtomvriIDNLrImD3jGVuIFAhmyKD2QFf37CDZ3+MHUeWLABIpJJ9pLHjN6tSco/0tuxUWPHzFkIuqoGxi2XRa6BpvdVm/NPvTKFdGcJlPGqb/Ijrakx4gxE/fVdt5swyxhH3X4yFmp/vkItefIU+X2InW0s= Original-Received: by 10.66.243.13 with SMTP id q13mr475943ugh.1194797422577; Sun, 11 Nov 2007 08:10:22 -0800 (PST) Original-Received: from bzg.ath.cx ( [81.99.213.34]) by mx.google.com with ESMTPS id e33sm7286126ugd.2007.11.11.08.10.20 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 11 Nov 2007 08:10:21 -0800 (PST) Original-Received: by bzg.ath.cx (Postfix, from userid 1000) id C47AB1575BA; Sun, 11 Nov 2007 17:10:21 +0000 (GMT) In-Reply-To: (Richard Stallman's message of "Sun, 11 Nov 2007 00:22:18 -0500") 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:82948 Archived-At: I uploaded a new version: http://www.cognition.ens.fr/~guerry/u/window-edit.el Richard Stallman 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, will move the left border of window B to the left, and 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