emacs-devel
[Top][All Lists]
Advanced

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

Re: window-list


From: Kim F. Storm
Subject: Re: window-list
Date: 18 Aug 2004 12:39:43 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

Karl Chen <address@hidden> writes:

> There's been a change in window-list that removes available
> functionality: getting the list of windows in canonical order,
> starting with the first window.  This is important functionality
> that I depend on; I don't see any way to get it now through only
> ELisp.
> 
> I propose the following change to window-list:
>   WINDOW t means return the list unrotated (in canonical order)
> 
> Due to the call to decode_next_window_args() which should not
> allow WINDOW t, the patch would be more than 2 or 3 lines if
> decode_next_window_args() and the call to it from window_list_1()
> were not changed.
> 
> 
> Relevant ChangeLog entry:
> 
> 2004-07-17  Richard M. Stallman  <address@hidden>
> 
>         * window.c ...
>         (window_list_1): Rotate the list to start with WINDOW.


I don't recall any discussion about the need for that change, but
I guess there was a reason....

But I second your idea of using window=t to get the canonical list.


In any case, you can still get a canonical window list from lisp;
edebug does it like this --- you can probably tweak it to
your needs:

(defun edebug-window-list ()
  "Return a list of windows, in order of `next-window'."
  ;; This doesn't work for epoch.
  (let (window-list)
    (walk-windows (lambda (w) (push w window-list)))
    (nreverse window-list)))


-- 
Kim F. Storm <address@hidden> http://www.cua.dk





reply via email to

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