From: Geoffrey Ferrari <geoffrey.ferrari@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: elscreen and window-prev-buffers
Date: Sun, 7 Oct 2012 03:44:38 -0700 (PDT) [thread overview]
Message-ID: <9facc5e9-4ab9-49b6-bf1e-efee17ae8b82@googlegroups.com> (raw)
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?
next reply other threads:[~2012-10-07 10:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-07 10:44 Geoffrey Ferrari [this message]
2012-10-08 22:28 ` elscreen and window-prev-buffers Michael Heerdegen
[not found] ` <mailman.10629.1349735322.855.help-gnu-emacs@gnu.org>
2012-10-09 9:15 ` Geoffrey Ferrari
2012-10-09 12:31 ` Martin Butz
[not found] ` <mailman.10642.1349785915.855.help-gnu-emacs@gnu.org>
2012-10-10 19:06 ` Michael Heerdegen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9facc5e9-4ab9-49b6-bf1e-efee17ae8b82@googlegroups.com \
--to=geoffrey.ferrari@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.