From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: window-list Date: 18 Aug 2004 12:39:43 +0200 Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1092825553 18932 80.91.224.253 (18 Aug 2004 10:39:13 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 18 Aug 2004 10:39:13 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Aug 18 12:39:04 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BxNqS-0006H7-00 for ; Wed, 18 Aug 2004 12:39:04 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BxNue-0004B5-K1 for ged-emacs-devel@m.gmane.org; Wed, 18 Aug 2004 06:43:24 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1BxNuV-0004B0-MA for emacs-devel@gnu.org; Wed, 18 Aug 2004 06:43:15 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1BxNuT-0004An-Um for emacs-devel@gnu.org; Wed, 18 Aug 2004 06:43:15 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BxNuT-0004Ak-SF for emacs-devel@gnu.org; Wed, 18 Aug 2004 06:43:13 -0400 Original-Received: from [212.88.64.25] (helo=mail-relay.sonofon.dk) by monty-python.gnu.org with smtp (Exim 4.34) id 1BxNqE-0001fz-Vk for emacs-devel@gnu.org; Wed, 18 Aug 2004 06:38:52 -0400 Original-Received: (qmail 46333 invoked from network); 18 Aug 2004 10:38:49 -0000 Original-Received: from unknown (HELO kfs-l.imdomain.dk.cua.dk) (213.83.150.2) by 0 with SMTP; 18 Aug 2004 10:38:49 -0000 Original-To: quarl+dated+1093194046.34955e@nospam.quarl.org In-Reply-To: Original-Lines: 45 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:26300 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:26300 Karl Chen 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 > > * 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 http://www.cua.dk