From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: window-next-buffers Date: Thu, 24 Nov 2011 21:00:05 +0200 Organization: JURTA Message-ID: <8739dduz0q.fsf@mail.jurta.org> References: <878vn67y0l.fsf@gnu.org> <4ECE159F.8080300@gmx.at> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1322161247 5452 80.91.229.12 (24 Nov 2011 19:00:47 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 24 Nov 2011 19:00:47 +0000 (UTC) Cc: Chong Yidong , emacs-devel@gnu.org To: martin rudalics Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Nov 24 20:00:43 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RTeXK-0002hI-JU for ged-emacs-devel@m.gmane.org; Thu, 24 Nov 2011 20:00:42 +0100 Original-Received: from localhost ([::1]:51828 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RTeXK-0003C3-4G for ged-emacs-devel@m.gmane.org; Thu, 24 Nov 2011 14:00:42 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:42117) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RTeXH-0003By-GB for emacs-devel@gnu.org; Thu, 24 Nov 2011 14:00:40 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RTeXG-0004Fk-BO for emacs-devel@gnu.org; Thu, 24 Nov 2011 14:00:39 -0500 Original-Received: from smarty.dreamhost.com ([208.113.175.8]:47698) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RTeXD-0004Ew-BS; Thu, 24 Nov 2011 14:00:35 -0500 Original-Received: from ps18281.dreamhostps.com (ps18281.dreamhost.com [69.163.218.105]) by smarty.dreamhost.com (Postfix) with ESMTP id 1DF2C6E8093; Thu, 24 Nov 2011 11:00:34 -0800 (PST) Original-Received: from localhost (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id CB95D451C58D; Thu, 24 Nov 2011 11:00:26 -0800 (PST) In-Reply-To: <4ECE159F.8080300@gmx.at> (martin rudalics's message of "Thu, 24 Nov 2011 10:59:59 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.91 (x86_64-pc-linux-gnu) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.113.175.8 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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 Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:146205 Archived-At: >> Maintaining separate prev-history and next-history lists is not very >> Emacs-y. Why isn't this a ring? > > Because `window-previous-buffers' returns a list of pos> triples where the latter two are markers and `window-next-buffers' > a plain list of buffers. Maintaining markers is expensive, so I wanted > to reduce the overhead for the next buffers part of the list. This sounds like an overly optimization. But actually I can't find a case where `next-buffer' would fail to get information about markers. Is this because information about markers of next buffers is retrieved from `window-prev-buffers'? > > I do find the window-next-buffers stuff a bit weird, somehow, > > but it's not important. > > A window's next buffers are only needed while navigating back- and > forwards through that window's buffers. They are killed by > `set-window-buffer' (more precisely by `record-window-buffer'). A > window's previous buffers are persistent. Isn't better to push a new window to the top of the list of next buffers to not lose information about the rest of next buffers?