[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Resizing windows after display-buffer

From: Juanma Barranquero
Subject: Re: Resizing windows after display-buffer
Date: Mon, 25 Apr 2011 15:00:33 +0200

On Mon, Apr 25, 2011 at 10:35, martin rudalics <address@hidden> wrote:

> I suppose the `fit-window-to-buffer' feature should probably depend on
> the buffer name much like the options `same-window-buffer-names' or
> `special-display-buffer-names' so a user can choose the set of buffers
> where the windows should fit.


> This means the `fit-window-to-buffer' scheme should probably only apply
> to new windows.  In the case you describe we have also to observe things
> like `even-window-heights' whose interaction with `fit-window-to-buffer'
> seems yet unresolved at the moment.

In my case `even-window-heights' is set to nil quite soon in .emacs :-)

> Likely `fit-window-to-buffer'
> should prevail, but should we, for example, even sizes when both buffers
> are to large to fit the window?

I cannot answer that, because I haven't ever thought about
`even-window-heights' == t.

> We already have a defcustom like `dired-shrink-to-fit'.  Also note that
> `temp-buffer-resize-mode' only applies to the `display-buffer' call
> itself.  Thereafter, it does not have any effect - changing the size of
> characters or the text of the buffer doesn't trigger resizing of the
> window.  Hence calling this a mode seems a bit exaggerated.

In most cases, I'm not worried about not resizing the window after
creation; many modes do not require it (help,occur, ielm, inferior
interpreters), and for those that I want, I use an advice or a hook to
call fit-window-to-buffer. But it would be nice to have a true
minor-mode, of course.

> So the question is why you think that activating a minor mode from a
> mode hook is more convenient than setting an option from that hook.

If by "setting an option from that hook" you mean setting a local
variable in the buffer before it is displayed, then I'm OK.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]