From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Geoffrey Ferrari Newsgroups: gmane.emacs.help Subject: elscreen and window-prev-buffers Date: Sun, 7 Oct 2012 03:44:38 -0700 (PDT) Message-ID: <9facc5e9-4ab9-49b6-bf1e-efee17ae8b82@googlegroups.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1349606719 3414 80.91.229.3 (7 Oct 2012 10:45:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 7 Oct 2012 10:45:19 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Oct 07 12:45:25 2012 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TKoMO-0003Qn-1f for geh-help-gnu-emacs@m.gmane.org; Sun, 07 Oct 2012 12:45:24 +0200 Original-Received: from localhost ([::1]:42306 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TKoMH-0007TC-Py for geh-help-gnu-emacs@m.gmane.org; Sun, 07 Oct 2012 06:45:17 -0400 Original-Received: by 10.224.223.84 with SMTP id ij20mr10639921qab.5.1349606679134; Sun, 07 Oct 2012 03:44:39 -0700 (PDT) Original-Received: by 10.236.114.164 with SMTP id c24mr40346yhh.17.1349606679066; Sun, 07 Oct 2012 03:44:39 -0700 (PDT) Original-Path: usenet.stanford.edu!l8no29401767qao.0!news-out.google.com!e10ni211270746qan.0!nntp.google.com!l8no29401760qao.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=86.172.102.225; posting-account=k4cNIwoAAABm6KLXXxkyaqtaNZIecmJf Original-NNTP-Posting-Host: 86.172.102.225 User-Agent: G2/1.0 Injection-Date: Sun, 07 Oct 2012 10:44:39 +0000 Original-Xref: usenet.stanford.edu gnu.emacs.help:194789 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:87123 Archived-At: I'm seeing some strange interaction between elscreen (elscreen-20120413.110= 7 from marmalade repo) and window-prev-buffers.=20 First let me illustrate the normal, expected behaviour. Suppose I start ema= cs with emacs -Q. At the start, the result of eval-ing (window-prev-buffers= ) is nil. Then I open file1.txt using find-file and (window-prev-buffers) r= eturns a list whose sole element is the scratch buffer. Then I open file2.t= xt and it returns a list of file1.txt and the scratch buffer. This is good = behaviour because when I kill the file2.txt buffer, I see file1.txt again, = and then when I kill file1.txt, I return to the scratch buffer. I return to= files in the order in which I opened them. Now suppose I activate elscreen (which automatically creates screen #0) and= then create a new screen, which becomes screen #1. At this starting point,= (window-prev-buffers) returns a list whose sole element is the scratch buf= fer. Then, when I open file1.txt, it returns a list of the scratch buffer a= nd the buffer showing file1.txt. Then when I open file2.txt, it returns a l= ist of the scratch buffer, then file1.txt's buffer, then file2.txt's buffer= . Now, if I kill file2.txt, the window automatically redisplays the scratch= buffer, not file1.txt. I think this is bad behaviour - my files are not re= displayed in the order in which I opened them. Clearly, the behaviour here is different. For some reason, with elscreen an= d a new screen, the scratch buffer is always kept as the first element of (= window-prev-buffers), and opening a new buffer appends it to (window-prev-b= uffers) *after* the scratch buffer. Has anyone else noticed this behaviour? Is there anything that can be done = to improve it?