From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.help Subject: Re: list-buffers - winwod-height Date: Wed, 05 Apr 2006 09:15:01 -0600 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1144250210 14270 80.91.229.2 (5 Apr 2006 15:16:50 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 5 Apr 2006 15:16:50 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Apr 05 17:16:44 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FR9kQ-0004Tp-DJ for geh-help-gnu-emacs@m.gmane.org; Wed, 05 Apr 2006 17:16:42 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FR9kP-0002Gf-PI for geh-help-gnu-emacs@m.gmane.org; Wed, 05 Apr 2006 11:16:41 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FR9kE-0002Es-HV for help-gnu-emacs@gnu.org; Wed, 05 Apr 2006 11:16:30 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FR9kA-0002E4-G2 for help-gnu-emacs@gnu.org; Wed, 05 Apr 2006 11:16:29 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FR9kA-0002Du-8H for help-gnu-emacs@gnu.org; Wed, 05 Apr 2006 11:16:26 -0400 Original-Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1FR9nh-0003RC-3O for help-gnu-emacs@gnu.org; Wed, 05 Apr 2006 11:20:05 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1FR9jl-0004Ii-4P for help-gnu-emacs@gnu.org; Wed, 05 Apr 2006 17:16:01 +0200 Original-Received: from 207.167.42.60 ([207.167.42.60]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 05 Apr 2006 17:16:01 +0200 Original-Received: from ihs_4664 by 207.167.42.60 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 05 Apr 2006 17:16:01 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: help-gnu-emacs@gnu.org Original-Lines: 66 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 207.167.42.60 User-Agent: Mozilla Thunderbird 0.9 (X11/20041105) X-Accept-Language: en-us, en In-Reply-To: X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:34174 Archived-At: Rares Vernica wrote: > I guess I can extend this to other secondary buffers, like *Help* or > *Python Output*. > > Is there a way to uniformly specify the default height of a secondary > buffer like these? The best way is to display them in their own frame as Katsumi suggested. For uniformity, put only the buffer names in special-display-buffer-names, and put the frame parameters in special-display-frame-alist. > Kevin Rodgers wrote: > >> Katsumi Yamaoka wrote: >> >>>>>>>> In Rares Vernica wrote: >>> >>> >>> >>>> How can I set the default height of the list-buffers window? >>> >>> >>> >>> There seems to be no way other than using your own command. >>> How about this? >>> >>> --8<---------------cut here---------------start------------->8--- >>> (setq my-list-buffers-window-height 16) >>> >>> (defun my-list-buffers (&optional files-only) >>> (interactive "P") >>> (let ((buffer (list-buffers-noselect files-only))) >>> (display-buffer buffer) >>> (enlarge-window (max (- (window-height (get-buffer-window buffer)) >>> my-list-buffers-window-height) >>> (- window-min-height (window-height)))))) >>> >>> (substitute-key-definition 'list-buffers 'my-list-buffers global-map) >>> --8<---------------cut here---------------end--------------->8--- >>> >>> Otherwise, you can use the `special-display-buffer-names' >>> variable if you'd like to pop up a frame. For example: >>> >>> (add-to-list 'special-display-buffer-names >>> '("*Buffer List*" (height . 16) (width . 80))) >> >> >> Here's another way to implement that: >> >> (defvar list-buffers-window-height 16) >> >> (defadvice list-buffers (after window-height activate) >> "Make the *Buffer List* window `list-buffers-window-height' lines >> high." >> (when (interactive-p) >> (enlarge-window (max (- (window-height (get-buffer-window "*Buffer >> List*")) >> list-buffers-window-height) >> (- window-min-height (window-height)))))) >> >> -- Kevin Rodgers