[Top][All Lists]

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

bug#4748: 23.1; least recently used window - is it?

From: martin rudalics
Subject: bug#4748: 23.1; least recently used window - is it?
Date: Sun, 18 Oct 2009 12:24:56 +0200
User-agent: Thunderbird (Windows/20090302)

> Why shouldn't `get-lru-window' respect strictly what its name implies,
> instead of having this exception that has *nothing* to do with recency
> of usage?
>   "If any full-width windows are present, it only considers these."
> Actually, it's not clear whether that description from the Elisp
> manual refers only to the behavior of function `get-lru-window' or to
> the definition of "least recently used window" itself. I'm guessing
> it's both. (What is "it" in the sentence quoted?)

"it" usually refers to the function or variable described.  In the
particular case "it" means `get-lru-window' and not the identity of the
least recently used window per se.

> So my question is really why the "least recently used window" isn't in
> fact always the least recently used window?

I suppose it's for historical reasons.  `get-lru-window' should provide
a window useful for displaying a buffer.  On older displays full-width
windows were probably more useful.

> It seems clear that code cannot depend on this lru concept behaving
> according to the chronology of window access. To control which window
> is the lru means you must consider not only window-access chronology
> but whether there are full-width windows etc.


> What I would really like to be able to is to _set_ the least recently
> used window - however Emacs wants to define that.

You can do that by temporarily selecting all other windows ...

> I would do that so
> that code that then uses the least recently used window would use the
> window I specified (by having set it as the least recently used).

... and you can't do that unless that window is full-width ...

> That
> might even be the selected window in some cases.

... in particular if there is only one window ;-)

> Currently, it doesn't seem easy to predict or control which window is
> used by things such as `pop-to-buffer' that try to use another window.
> Being able to set the so-called lruw that such functions use would
> make things a lot more straightforward.

We can easily remove the FULL-WIDTH feature.  But _who_ would be
responsible for "touching" windows in order to make them LRU?


reply via email to

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