[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: display-buffer change
From: |
David Kågedal |
Subject: |
Re: display-buffer change |
Date: |
Mon, 27 Aug 2007 20:07:25 +0200 |
User-agent: |
Gnus/5.1008 (Gnus v5.10.8) Emacs/22.1 (gnu/linux) |
martin rudalics <rudalics@gmx.at> writes:
>> I have seen a change in Emacs 22.1 from Emacs 21 that broke my use of
>> dedicated windows.
>>
>> The problem is that (display-buffer buf) will change the contents of
>> the current window, if the other window in the frame has a dedicated
>> buffer. In Emacs 21, a new window would be opened instead.
>
> [...]
>
>> I use a dedicated small window at the bottom of my frame that always
>> contains the *compilation* buffer, and the new behaviour in Emacs 22
>> seriously lower the usability of a lots of command, such as viewing
>> diffs or showing source from gdb etc.
>>
>> I didn't find anything in NEWS that indicated that this was somehow
>> intentional.
>>
>
> Please ignore if this has been already resolved. You should be able to
> handle this by customizing `split-height-threshold' to a reasonable
> value (say 10). Confer the doc-string of `display-buffer':
>
> If a full-width window on a splittable frame is available to display
> the buffer, it may be split, subject to the value of the variable
> `split-height-threshold'.
I'm sorry for the late response, this came just as I was going on a
longish vacation, and I seem to have forgotten about it. I just tried
setting split-heigh-threshold to 10, and the behaviour changed, but
not to the Emacs 21 behaviour. I'll copy my original description, and
append the new behaviour:
To see the difference, do the following:
Split an emacs frame in two windows showing buffers A and B:
+-------------+
| |
| A |
| |
+-------------+
| |
| B |
| |
+-------------+
While in the lower window, run
(set-window-dedicated-p (selected-window) t)
Now, in the upper window, run
(display-buffer "C")
In Emacs 21, this will be the result:
+-------------+
| A |
+-------------+
| C |
+-------------+
| |
| B |
| |
+-------------+
In Emacs 22, this will be the result:
+-------------+
| |
| C |
| |
+-------------+
| |
| B |
| |
+-------------+
In Emacs 22 with split-heigh-threshold=10, this will be the result:
+-------------+
| |
| A |
| |
+-------------+
| B |
+-------------+
| C |
+-------------+
I'm not sure how well this will work for me in practice, but I think
at least it's an improvement.
--
David Kågedal