all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* list-buffers - winwod-height
@ 2006-04-03 18:22 Rares Vernica
  2006-04-04  1:11 ` Katsumi Yamaoka
  0 siblings, 1 reply; 6+ messages in thread
From: Rares Vernica @ 2006-04-03 18:22 UTC (permalink / raw)


Hi,

How can I set the default height of the list-buffers window?

Thanks,
Ray

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: list-buffers - winwod-height
  2006-04-03 18:22 list-buffers - winwod-height Rares Vernica
@ 2006-04-04  1:11 ` Katsumi Yamaoka
  2006-04-04  1:35   ` Rares Vernica
                     ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Katsumi Yamaoka @ 2006-04-04  1:11 UTC (permalink / raw)


>>>>> In <e0rp4e$11a$1@news.service.uci.edu> 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)))

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: list-buffers - winwod-height
  2006-04-04  1:11 ` Katsumi Yamaoka
@ 2006-04-04  1:35   ` Rares Vernica
  2006-04-04 16:38   ` Kevin Rodgers
       [not found]   ` <mailman.36.1144168815.9609.help-gnu-emacs@gnu.org>
  2 siblings, 0 replies; 6+ messages in thread
From: Rares Vernica @ 2006-04-04  1:35 UTC (permalink / raw)


Thanks a lot,
Ray

Katsumi Yamaoka wrote:
>>>>>> In <e0rp4e$11a$1@news.service.uci.edu> 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)))

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: list-buffers - winwod-height
  2006-04-04  1:11 ` Katsumi Yamaoka
  2006-04-04  1:35   ` Rares Vernica
@ 2006-04-04 16:38   ` Kevin Rodgers
       [not found]   ` <mailman.36.1144168815.9609.help-gnu-emacs@gnu.org>
  2 siblings, 0 replies; 6+ messages in thread
From: Kevin Rodgers @ 2006-04-04 16:38 UTC (permalink / raw)


Katsumi Yamaoka wrote:
>>>>>>In <e0rp4e$11a$1@news.service.uci.edu> 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: list-buffers - winwod-height
       [not found]   ` <mailman.36.1144168815.9609.help-gnu-emacs@gnu.org>
@ 2006-04-04 23:21     ` Rares Vernica
  2006-04-05 15:15       ` Kevin Rodgers
  0 siblings, 1 reply; 6+ messages in thread
From: Rares Vernica @ 2006-04-04 23:21 UTC (permalink / raw)


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?

Thanks,
Ray

Kevin Rodgers wrote:
> Katsumi Yamaoka wrote:
>>>>>>> In <e0rp4e$11a$1@news.service.uci.edu> 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))))))
> 
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: list-buffers - winwod-height
  2006-04-04 23:21     ` Rares Vernica
@ 2006-04-05 15:15       ` Kevin Rodgers
  0 siblings, 0 replies; 6+ messages in thread
From: Kevin Rodgers @ 2006-04-05 15:15 UTC (permalink / raw)


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 <e0rp4e$11a$1@news.service.uci.edu> 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-04-05 15:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-03 18:22 list-buffers - winwod-height Rares Vernica
2006-04-04  1:11 ` Katsumi Yamaoka
2006-04-04  1:35   ` Rares Vernica
2006-04-04 16:38   ` Kevin Rodgers
     [not found]   ` <mailman.36.1144168815.9609.help-gnu-emacs@gnu.org>
2006-04-04 23:21     ` Rares Vernica
2006-04-05 15:15       ` Kevin Rodgers

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.