emacs-devel
[Top][All Lists]
Advanced

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

Re: [Emacs-diffs] /srv/bzr/emacs/trunk r103444: * lisp/facemenu.el (list


From: martin rudalics
Subject: Re: [Emacs-diffs] /srv/bzr/emacs/trunk r103444: * lisp/facemenu.el (list-colors-display): Use with-help-window (Bug#8048).
Date: Mon, 28 Feb 2011 18:10:02 +0100
User-agent: Thunderbird 2.0.0.21 (Windows/20090302)

> The above should be changed so the whole code is surrounded by
> with-help-window.

That's easier said than done :-(

>> Unfortunately, we can't fill the buffer _before_ calling
>> `with-help-window' because, as the comment above indicates,
>> `list-colors-print' wants to know the width of the window _before_
>> filling the buffer.
>
> That's a common need, so with-help-window should display the buffer
> before running the code.

Hmmm...  This means that either `with-help-window' can no longer rely on
`with-output-to-temp-buffer' or the latter has to be changed.  Neither
of these appear overly difficult but the interaction with
internal_with_output_to_temp_buffer would have to be examined.

And we should keep in mind the following: If the decision whether a
window for displaying the buffer can be split off from an existing
window should be based on the number of lines of the buffer, only the
current solution works.

So if you could provide some pointers wrt to the "common need" we might
be able to judge which approach is preferable.

> Of course, another way to look at it is that the buffer's content should
> be independent from the window, and if it needs to be displayed
> differently according to the window size, then this should be done
> within the redisplay so that if that same buffer is displayed in several
> windows, they all look "right".  But the current redisplay features
> probably aren't sufficient for that.

It's merely that code like `list-colors-print' would get confused.  We'd
have to run it for every window where the buffer is shown so an overlay
with a window property inserting the necessary amount of spaces would be
needed.

martin



reply via email to

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