From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: RE: New keybinding suggestion: C-x _ for `shrink-window' Date: Sun, 4 Nov 2007 23:37:20 -0800 Message-ID: References: <87d4upxtbj.fsf@bzg.ath.cx> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1194248351 25746 80.91.229.12 (5 Nov 2007 07:39:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 5 Nov 2007 07:39:11 +0000 (UTC) To: "Bastien" , Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Nov 05 08:39:15 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 1IowYD-0006lG-AB for ged-emacs-devel@m.gmane.org; Mon, 05 Nov 2007 08:39:13 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IowY3-0007MY-0Y for ged-emacs-devel@m.gmane.org; Mon, 05 Nov 2007 02:39:03 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IowY0-0007MP-50 for emacs-devel@gnu.org; Mon, 05 Nov 2007 02:39:00 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IowXy-0007M4-KL for emacs-devel@gnu.org; Mon, 05 Nov 2007 02:38:59 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IowXy-0007M1-Ga for emacs-devel@gnu.org; Mon, 05 Nov 2007 02:38:58 -0500 Original-Received: from mx20.gnu.org ([199.232.41.8]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1IowXx-0000i9-N9 for emacs-devel@gnu.org; Mon, 05 Nov 2007 02:38:57 -0500 Original-Received: from rgminet01.oracle.com ([148.87.113.118]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IowXw-0004pF-US for emacs-devel@gnu.org; Mon, 05 Nov 2007 02:38:57 -0500 Original-Received: from agmgw1.us.oracle.com (agmgw1.us.oracle.com [152.68.180.212]) by rgminet01.oracle.com (Switch-3.2.4/Switch-3.1.6) with ESMTP id lA57bpSv029568; Mon, 5 Nov 2007 00:37:51 -0700 Original-Received: from acsmt351.oracle.com (acsmt351.oracle.com [141.146.40.151]) by agmgw1.us.oracle.com (Switch-3.2.0/Switch-3.2.0) with ESMTP id lA57OepF011763; Mon, 5 Nov 2007 00:37:50 -0700 Original-Received: from dhcp-amer-csvpn-gw1-141-144-64-151.vpn.oracle.com by acsmt350.oracle.com with ESMTP id 3342360611194248208; Sun, 04 Nov 2007 23:36:48 -0800 X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) Importance: Normal In-Reply-To: <87d4upxtbj.fsf@bzg.ath.cx> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 X-Brightmail-Tracker: AAAAAQAAAAI= X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE X-Whitelist: TRUE X-detected-kernel: by mx20.gnu.org: Linux 2.4-2.6 X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) 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:82551 Archived-At: > > We could give it a try and see what users think of it. > > Here is another try. > > It uses the arrow keys to push borders and -/+ for raw > shrinking/enlarging. I've also added other keys like > `s' to store a window configuration and '_' to call > it back. See the docstring for details. > > Feedback welcome. I like it, in general. Some quick minor feedback: * Use `case' (compile-time require cl) to simplify code. * Why is WCF an arg? (You immediately set it.) * Bind `echo-keystrokes' to 0. * Let `0' delete the selected window. * Not sure `1' is a good idea (especially if no undo). * Maybe `r' instead of `_'? * When window reaches a minimum, trying to reduce it more either moves it instead or deletes it instead. Maybe do something different (e.g. nothing?). * +/- is only for vertical resizing. Why not horizontal also? Maybe let arrows do this also, with another key toggling the mode (move border vs increase/decrease size). * Maybe let Shift always navigate - up/down/left/right, and use something else (`+' and `-'?) to increment/decrement ARG. * Maybe negate (toggle sign of) ARG with a keystroke (e.g. `~'), instead of holding Meta down. (Modal.) * And maybe let C-N (N an integer) set ARG absolutely? * Maybe let mouse-1 select a window also. * Maybe use mouse wheel also (if direction is known)? * The prompt doesn't express much of what is possible. In particular, if `one-window-p', the prompt makes no sense (but `2' and `3' still make sense). * Let `?' provide more help. * Give confirmation message when save & restore. When save, it should mention `_' (or `r') to restore. * Is it normal that the window is scrolled (perhaps to keep point in view)? Maybe not scrolling should be an option? * Maybe let unrecognized events (keys, at least) quit instead of being ignored. And then perhaps be applied? So, e.g., `RET' would quit (and insert a newline?). * Rename? `window-edit'? * Maybe bind it to `C-x w'. Or maybe have that be a prefix for several window commands and bind this one to `C-x w e' (for edit)? HTH.