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: Thu, 01 Nov 2007 03:41:06 +0000 Message-ID: <874pg6ws31.fsf@bzg.ath.cx> References: <87r6jfed61.fsf@bzg.ath.cx> <877il3qyvs.fsf@bzg.ath.cx> <47291D42.8020802@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1193884890 32427 80.91.229.12 (1 Nov 2007 02:41:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 1 Nov 2007 02:41:30 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Nov 01 03:41:33 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 1InPzu-0001Kh-9H for ged-emacs-devel@m.gmane.org; Thu, 01 Nov 2007 03:41:30 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1InPzk-00043q-Bi for ged-emacs-devel@m.gmane.org; Wed, 31 Oct 2007 22:41:20 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1InPzg-00040C-Jv for emacs-devel@gnu.org; Wed, 31 Oct 2007 22:41:16 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1InPzf-0003wN-0P for emacs-devel@gnu.org; Wed, 31 Oct 2007 22:41:16 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1InPze-0003wD-TX for emacs-devel@gnu.org; Wed, 31 Oct 2007 22:41:14 -0400 Original-Received: from mu-out-0910.google.com ([209.85.134.186]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1InPze-0004Zt-Lb for emacs-devel@gnu.org; Wed, 31 Oct 2007 22:41:14 -0400 Original-Received: by mu-out-0910.google.com with SMTP id i2so398031mue for ; Wed, 31 Oct 2007 19:41:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=beta; h=domainkey-signature:received:received:received:from:to:subject:in-reply-to:references:user-agent:date:message-id:mime-version:content-type:sender; bh=ehuVHMDhsgRVJzDurlIwA5rZ4SH401CXwlFB8BETdO8=; b=dJjB7PSjwc/8wU5clheaGrtPNaN3c5ZszKU/6M/BF6M6NCj21CjPnIgVFpiXzpfVmsTVyhiQ1EMEGV0BuNZSqH20mPV7WDPkmz0JraOvf48S9I8eGYn+mfHwCNxs2z0tgt1WeyzvCRXQAMDduPOFIBMuVnj8UH6YRS++Wb0MBgw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=beta; h=received:from:to:subject:in-reply-to:references:user-agent:date:message-id:mime-version:content-type:sender; b=f+8q/fqZ4RNTANiST6CmCDG1V3lbge/bcZQiez+83pPRXOCxIwpQBXmGU2KJrH1mRhUc4hgyoAc9OpBVxIy1GVTVIn4GWEJRYZldRDN9DAD/HqMLIfEjhIYt3nLVWtVQv2spY8I0IHWmSXdNMEQSqUXb6lci7SOmZtfdAzo8HgI= Original-Received: by 10.86.70.8 with SMTP id s8mr85074fga.1193884872964; Wed, 31 Oct 2007 19:41:12 -0700 (PDT) Original-Received: from bzg.ath.cx ( [78.113.180.159]) by mx.google.com with ESMTPS id i5sm2808127mue.2007.10.31.19.41.10 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 31 Oct 2007 19:41:11 -0700 (PDT) Original-Received: by bzg.ath.cx (Postfix, from userid 1000) id 6AA871575BA; Thu, 1 Nov 2007 03:41:06 +0000 (GMT) In-Reply-To: (Juanma Barranquero's message of "Thu, 1 Nov 2007 02:14:42 +0100") 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:82279 Archived-At: --=-=-= "Juanma Barranquero" writes: > On 11/1/07, Lennart Borgman (gmail) wrote: > >> Why not go the whole way and let the user choose which window border to >> move? > > You can always choose which window border to move by selecting the > right window, which is dead easy with windmove.el. First ugly attempt of using windmove.el with resize-window. [ldur] keys should be replaced by arrow keys. Not heavily tested yet. --=-=-= Content-Type: application/emacs-lisp Content-Disposition: inline; filename=resize-window.el Content-Transfer-Encoding: 8bit (defun resize-window (&optional arg) "Resize window interactively." (interactive "p") (when (one-window-p) (error "Cannot resize sole window")) (unless arg (setq arg 1)) (catch 'done (while t (message " [ldur]/[LDUR] enlarge/shrink by %d from the left/down/up/right border [n]ext window [p]revious window [1-9]=unit [q]uit" arg) (ignore-errors (let ((c (read-char)) (window-size-fixed nil)) (cond ((= c ?l) (when (windmove-left) (shrink-window-horizontally arg) (windmove-right))) ((= c ?L) (when (windmove-left) (enlarge-window-horizontally arg) (windmove-right))) ((= c ?r) (when (windmove-right) (shrink-window-horizontally arg) (windmove-left))) ((= c ?R) (when (windmove-right) (enlarge-window-horizontally arg) (windmove-left))) ((= c ?u) (when (windmove-up) (shrink-window arg) (windmove-down))) ((= c ?U) (when (windmove-up) (enlarge-window arg) (windmove-down))) ((= c ?d) (when (windmove-down) (shrink-window arg) (windmove-up))) ((= c ?D) (when (windmove-down) (enlarge-window arg) (windmove-up))) ((= c ?n) (other-window 1)) ((= c ?p) (other-window -1)) ((= c ?\^G) (keyboard-quit)) ((= c ?q) (throw 'done t)) ((and (> c ?0) (<= c ?9)) (setq arg (- c ?0)))))))) (message "Done.")) --=-=-= -- Bastien --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel --=-=-=--