[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: elscreen and window-prev-buffers
From: |
Michael Heerdegen |
Subject: |
Re: elscreen and window-prev-buffers |
Date: |
Tue, 09 Oct 2012 00:28:38 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) |
Hi Geoffrey,
I'm a former user of elscreen. Yes, it's a bug, I saw that too. I
debugged it, but fixing it is not trivial.
Background:
The problem are the calls to `elscreen-goto-internal' in
`elscreen-get-screen-to-name-alist'.
Screens internally use window configurations. These are a
primitive data type. You are not able to "look inside them" if you
don't apply them. That's the underlying problem.
Sorry I can't help more. I only can provide a trivial patch that fixes
the problem for the price that the names of the screens disappear in the
header-line.
I now have given up using elscreen because of problems like that.
That winner-mode doesn't work well with elscreen was another one.
Regards,
Michael.
Geoffrey Ferrari <geoffrey.ferrari@gmail.com> writes:
> I'm seeing some strange interaction between elscreen
> (elscreen-20120413.1107 from marmalade repo) and window-prev-buffers.
>
> First let me illustrate the normal, expected behaviour. Suppose I
> start emacs 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) returns a list whose sole element is the
> scratch buffer. Then I open file2.txt 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 buffer. Then, when I open file1.txt, it returns
> a list of the scratch buffer and the buffer showing file1.txt. Then
> when I open file2.txt, it returns a list 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
> redisplayed in the order in which I opened them.
>
> Clearly, the behaviour here is different. For some reason, with
> elscreen and 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-buffers) *after* the scratch buffer.
>
> Has anyone else noticed this behaviour? Is there anything that can be
> done to improve it?