From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Lennart Borgman (gmail)" Newsgroups: gmane.emacs.devel Subject: Re: New keybinding suggestion: C-x _ for `shrink-window' Date: Mon, 12 Nov 2007 23:09:17 +0100 Message-ID: <4738CF0D.9040204@gmail.com> References: 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 1194905389 7502 80.91.229.12 (12 Nov 2007 22:09:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 12 Nov 2007 22:09:49 +0000 (UTC) Cc: Bastien , "Richard M. Stallman" , emacs-devel@gnu.org To: Drew Adams Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Nov 12 23:09:52 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 1IrhTb-0001xH-Vb for ged-emacs-devel@m.gmane.org; Mon, 12 Nov 2007 23:09:52 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IrhTO-0006Vz-W4 for ged-emacs-devel@m.gmane.org; Mon, 12 Nov 2007 17:09:39 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IrhTJ-0006Qp-V0 for emacs-devel@gnu.org; Mon, 12 Nov 2007 17:09:34 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IrhTJ-0006Pl-Es for emacs-devel@gnu.org; Mon, 12 Nov 2007 17:09:33 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IrhTJ-0006PM-2u for emacs-devel@gnu.org; Mon, 12 Nov 2007 17:09:33 -0500 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 1IrhTE-0007an-3C; Mon, 12 Nov 2007 17:09:28 -0500 Original-Received: from c83-254-148-228.bredband.comhem.se ([83.254.148.228]:61259 helo=[127.0.0.1]) by ch-smtp01.sth.basefarm.net with esmtp (Exim 4.68) (envelope-from ) id 1IrhTB-0000Wa-5p; Mon, 12 Nov 2007 23:09:26 +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: X-Antivirus: avast! (VPS 071111-1, 2007-11-11), Outbound message X-Antivirus-Status: Clean X-Originating-IP: 83.254.148.228 X-Scan-Result: No virus found in message 1IrhTB-0000Wa-5p. X-Scan-Signature: ch-smtp01.sth.basefarm.net 1IrhTB-0000Wa-5p 5df38a53546b90abb905673eb2485fe2 X-detected-kernel: by monty-python.gnu.org: Linux 2.6? (barebone, rare!) 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:83092 Archived-At: Drew Adams wrote: >> I have worked a bit with bw-interactive.el along the ideas that have >> surfaced here (and some I had before). I have renamed it to winsize.el. >> >> It is mainly restructured for more flexibility. And some bugs have >> probably been fixed + the features are more worked through. >> >> The resizing is done with the arrow keys. Switching borders and windows >> are done with META-arrow keys. For more info see the help (just type ? >> for that). > > Some feedback from very quick testing - I used the config given by M-x > resize-windows 3 2 3 2. Thanks for testing. > 1. In addition to the test frame, I had also another frame showing the same > file (your file). The latter frame was scrolled down to show command > resize-windows. I put the cursor in one of the windows on the other frame > and used M-x resize-windows. The second frame was scrolled to the top. > That's a bug, IMO: Other frames should not be affected, and no window should > be scrolled, just because I'm resizing windows. I had to copy the code to > another buffer, just to be able to continue seeing it while executing > resize-windows. That is very strange. I can see nothing like that happening. > 2. M-left/right does not let you get to all windows (but you can click > mouse-1 to get there). Actually, the problem seems to be the same as for > window-edit: the cursor must be on a line that is adjacent to the window to > select. I think both Bastien and I use windmove for moving between the windows. (Using windmove makes it more consistent for the users, I hope.) > 3. So allow C-n, C-f, etc. to move the cursor without exiting. That way, you > can use M- to get to any window you want, using just the keyboard. I can not find any window configuration where I see the problem. If however it does happen then I think it is a bug in windmove. > 4. No need to highlight the mode lines of all windows. It would be helpful > to highlight only the border to be moved - perhaps by showing the > corresponding fringe specially temporarily (left/right) or highlighting the > appropriate mode line (only). Thanks, I did not think about fringes. But I wonder if it is possible. First it looks like there are not window specific fringes - or are there? Then I am not sure there are any usable fringes defined currently - or? > 5. Highlighting the window background is not a great way to indicate the > border that will be moved. But it does help show which window has the focus. > IMO, it would be better to not reuse face `secondary-selection', but define > a new one just for this. I am a bit hesitating that this is worth the trouble of defining a new face. What is the drawbacks of using secondary-selection? (or maybe highlight?) > 6. You should not exit window resizing just because you click somewhere > outside the frame that has the windows to be resized, or even outside Emacs > (the latter happens only sometimes). The implementation uses overriding-terminal-local-map during resizing. That means that there are two alternatives when switching frame: Either resize on that frame too or stop resizing when switching frame. I have chosen the latter. > 7. I hit `?' for help. I got no help, and all of the windows were blown away > except one. I tried it other times, and the frame itself was blown away. The > latter effect is from my code, but it indicates that `delete-window' was > called for the last remaining window. Thanks I will try to fix it. Probably something with popup frames. > 8. Some way to save and restore window configs would be nice. I think Bastien had the idea of using a kill ring for that. Is that useful? Maybe some convenient way to choose from that then? > 9. Sometimes, I need to press M-left (or right etc) to get it to take > effect - the first press does nothing. M-left etc first switches border and then window. Is that what happens? > 10. There is no feedback when resizing is not possible - the keys just seem > not to work. Ok, I will think about catching the error messages and showing them. > 11. `=' in lower left window (configuration 3 2 3 2), causes the two windows > above it to have the same width. What does "Make current window siblings the > same height or width." mean? Does it mean make the siblings the same > height/width as each other or the same as the selected window? Sometimes it > seems to be one, sometimes the other. It works the same way as balance-windows, but only for siblings. The concept is actually a tree where the siblings in each node get equal amounts of space. I can find no good and short way to express that though. > 12. `-' seems to do nothing. It only shrinks vertically and if the buffer height is smaller than the window height. There should be some feedback when that is not the case, I will add it. > HTH. It does.