unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* elscreen and window-prev-buffers
@ 2012-10-07 10:44 Geoffrey Ferrari
  2012-10-08 22:28 ` Michael Heerdegen
       [not found] ` <mailman.10629.1349735322.855.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 5+ messages in thread
From: Geoffrey Ferrari @ 2012-10-07 10:44 UTC (permalink / raw)
  To: help-gnu-emacs

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?


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: elscreen and window-prev-buffers
  2012-10-07 10:44 elscreen and window-prev-buffers Geoffrey Ferrari
@ 2012-10-08 22:28 ` Michael Heerdegen
       [not found] ` <mailman.10629.1349735322.855.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 5+ messages in thread
From: Michael Heerdegen @ 2012-10-08 22:28 UTC (permalink / raw)
  To: help-gnu-emacs

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?



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: elscreen and window-prev-buffers
       [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>
  0 siblings, 2 replies; 5+ messages in thread
From: Geoffrey Ferrari @ 2012-10-09  9:15 UTC (permalink / raw)
  To: help-gnu-emacs; +Cc: help-gnu-emacs

Michael,

Thank you for taking the time to reply and explain - it helps to know that someone has looked at this problem. Is there an alternative to elscreen that you would recommend?

Best wishes,

Geoffrey

On Monday, 8 October 2012 23:28:43 UTC+1, Michael Heerdegen  wrote:
> 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 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?



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: elscreen and window-prev-buffers
  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>
  1 sibling, 0 replies; 5+ messages in thread
From: Martin Butz @ 2012-10-09 12:31 UTC (permalink / raw)
  To: help-gnu-emacs

Geoffrey,

you might want to try /Escreen/ [1][2]

Martin

[1] <http://www.emacswiki.org/emacs/EmacsScreen>
[2] 
<http://blog.nguyenvq.com/2011/03/07/escreen-instead-of-elscreen-for-screen-like-features-in-emacs/>

Am 09.10.2012 11:15, schrieb Geoffrey Ferrari:
> Michael,
>
> Thank you for taking the time to reply and explain - it helps to know that someone has looked at this problem. Is there an alternative to elscreen that you would recommend?
>

[...]

>>> Has anyone else noticed this behaviour? Is there anything that can be
>>
>>> done to improve it?
>


-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| G. Martin Butz, mb@mkblog.org, 0421 98749324, www.mkblog.org |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: elscreen and window-prev-buffers
       [not found]     ` <mailman.10642.1349785915.855.help-gnu-emacs@gnu.org>
@ 2012-10-10 19:06       ` Michael Heerdegen
  0 siblings, 0 replies; 5+ messages in thread
From: Michael Heerdegen @ 2012-10-10 19:06 UTC (permalink / raw)
  To: help-gnu-emacs

Martin Butz <mb@mkblog.org> writes:

> Geoffrey,
>
> you might want to try /Escreen/ [1][2]
>
> Martin
>
> [1] <http://www.emacswiki.org/emacs/EmacsScreen>
> [2]
> <http://blog.nguyenvq.com/2011/03/07/escreen-instead-of-elscreen-for-screen-like-features-in-emacs/>

Indeed, that's a good alternative.  escreen doesn't have this problem.
However, without the header-line tabs, there are not much advantages
compared to just using frames instead of screens.  So, that's what I've
done in my setup: mimic the features of elscreen, but use frames
instead.

Besides: I'll write to the author of elscreen - maybe he is able to fix
the problem.


Regards,

Michael.



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-10-10 19:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-07 10:44 elscreen and window-prev-buffers Geoffrey Ferrari
2012-10-08 22:28 ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).