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 05:00:25 +0000 Message-ID: <87ejexwf4m.fsf@bzg.ath.cx> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1194753665 17145 80.91.229.12 (11 Nov 2007 04:01:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 11 Nov 2007 04:01:05 +0000 (UTC) Cc: Drew Adams To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Nov 11 05:01:08 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 1Ir40O-0006Qx-U1 for ged-emacs-devel@m.gmane.org; Sun, 11 Nov 2007 05:01:05 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ir40D-0000qe-7K for ged-emacs-devel@m.gmane.org; Sat, 10 Nov 2007 23:00:53 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ir3zr-0000bw-HC for emacs-devel@gnu.org; Sat, 10 Nov 2007 23:00:31 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ir3zq-0000bG-U0 for emacs-devel@gnu.org; Sat, 10 Nov 2007 23:00:31 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ir3zq-0000b9-J4 for emacs-devel@gnu.org; Sat, 10 Nov 2007 23:00:30 -0500 Original-Received: from fk-out-0910.google.com ([209.85.128.184]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Ir3zp-00088q-QA for emacs-devel@gnu.org; Sat, 10 Nov 2007 23:00:30 -0500 Original-Received: by fk-out-0910.google.com with SMTP id 19so1054084fkr for ; Sat, 10 Nov 2007 20:00:28 -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=OM6DIyjzDFtG/X8I2wUn+kEebw7fD3Ut/LWmbqHvXOA=; b=tzZYjnDwFSBceMmNzeLUvHJIjZKIJskIfoHSDM77vqEG1amOGzHkVAx9H1wx3m/z+EY1a52UjISSku0ONwahiF/8MVHZ86ViAnj6n7GNmjLYSWdUdduSEkDOHKYPVif7P7ehhdGvAi1JVTS24MfBz7CK6vFy5h1X0eDNILgCGG4= 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=VyNZWdK1fhl6QlRtBPYS4+m/w4/Mgl+dRfO+b2j9rr3hr82z0w0Dv5FMbFC9qIZuxCRvf9qzSJZRfo7kQ00S787rogE6rdxd0cwNAYBjawnKRVjVqNx0hBHg59gESG7s9GfWmTZuG7NgBx/zGLm6Ln8TW701IX9Mh32kTyTBRgE= Original-Received: by 10.82.171.16 with SMTP id t16mr8174578bue.1194753627639; Sat, 10 Nov 2007 20:00:27 -0800 (PST) Original-Received: from bzg.ath.cx ( [81.99.213.34]) by mx.google.com with ESMTPS id h1sm4652899nfh.2007.11.10.20.00.25 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 10 Nov 2007 20:00:25 -0800 (PST) Original-Received: by bzg.ath.cx (Postfix, from userid 1000) id 660C11575BA; Sun, 11 Nov 2007 05:00:25 +0000 (GMT) In-Reply-To: (Drew Adams's message of "Fri, 9 Nov 2007 17:09:58 -0800") 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:82928 Archived-At: "Drew Adams" writes: >> I tried to implement Drew suggestions into one single function. >> See my comments below. Any feedback is very welcome. > > Thanks for working some more on this. I didn't expect that you would > implement most of what I suggested - they were just some ideas that occurred > to me. Anyway, here is some more feedback to think about: Please check the latest window-edit.el here: http://www.cognition.ens.fr/~guerry/u/window-edit.el Window shrinking/enlarging is okay. Borders moving might be somewhat inconsistent, but I could find any easy way to predict the changes made by `shrink-window' and `enlarge-window' in all possible window configurations. Anyway, this should be accurate in 95% of the real-life cases, and I do agree that the resize-mode will be the most useful anyway. > 1. When I use `?', I get a new frame *window-edit help* (I use non-nil > `pop-up-frames'). If I click mouse-1 in that frame, then the frame > disappears. That's no good. I need to be able to go to the help frame, move > around, select text, etc. I'm not sure about this. The help window is now quite big, and people using window-edit with a lot of windows might prefer not to loose their configuration just by displaying the help window. Hitting `?' once will first show a small help message, depending on the mode you're on. Then hitting `?' again will display the window help. > 2. When help is shown, the window configuration should be left as is, if > `pop-up-frames' is non-nil. That is, there is no need to change it to a > single window. Fixed. > 3. Need more help in the help window. For instance, what do the arrows do, > by default? What does the prefix arg do? I tried to improve this. > 4. Window resizing with arrows works fine. I see problems with border > movement, however: Most of the bugs should be fixed now. > f. Whenever an arrow key cannot move a border for some reason, the user > should get feedback explaining why. For instance, in a window that is > full-frame height, you cannot move a border up or down, but there is no > message. Fixed. Let me know what you think. > g. There is still the problem that moving a border can make windows > disappear because they get too small. To me, that's not the right behavior. > They should respect `window-min-width' and `window-min-height' - you should > get a "can't move..." message if the requested movement tries to undercut > these limits. Fixed. > 7. The binding of `echo-keystrokes' is not working. If I move the focus to > another window-manager window (e.g. this mail message, outside Emacs), then > I see a long string of keystrokes filling the echo area. Maybe move the > binding higher up? I already set (echo-keystrokes 0) - what can I do? > 8. +/- should go directly from 1 to -1, skipping 0, since 0 is a no-op for > resizing and border movement. Fixed. > 9. The prompt is still not general enough, IMO. Please comment the new prompt. > 10. Change "negate argument" to "negate increment". Change ARG everywhere to > "INCREMENT", for clarity. And put ~ next to +/- in the help and the doc > string, so it's clearer that they all apply to the increment. Done. > 11. Let the arrows resize instead of move borders, by default. Done. > 12. Cursor in right window, `S-down' - no message. Instead, cursor moves to > bottom-left window. Another `S-down' - still no message - and no more cursor > movement. Fixed. > However, you might want to let `C-b', `C-f', `C-p', and `C-n' move > point to enable control over `S-'. Added. > It's simple: > > (case e > (left (if...) > (right (if...) > (up (if...) > (down (if...)) Done. > `mouse-1' should set point, in whatever window. Not yet done. I will do this if the new window-edit.el if I have more feedback on window-edit.el, I need to be sure this is going somewhere. Thanks, -- Bastien