unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Split frame?
@ 2007-03-13 19:01 Vols
  2007-03-13 19:33 ` Tassilo Horn
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Vols @ 2007-03-13 19:01 UTC (permalink / raw)
  To: help-gnu-emacs

Hi, group,

I have 3 file in one frame, say file1.c, file2.c and file3.c
I use 'C-x 3' to split the frame vertically. The problem is these two
frames are identical. When I open a 'file4.c' in left frame, it
appears in right frame too.
How to make these two frames independent? Thanks

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

* Re: Split frame?
  2007-03-13 19:01 Split frame? Vols
@ 2007-03-13 19:33 ` Tassilo Horn
  2007-03-13 20:10 ` Malte Spiess
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 13+ messages in thread
From: Tassilo Horn @ 2007-03-13 19:33 UTC (permalink / raw)
  To: help-gnu-emacs

"Vols" <volunteers@gmail.com> writes:

Hi,

> I have 3 file in one frame, say file1.c, file2.c and file3.c I use
> 'C-x 3' to split the frame vertically.

You confuse frames and windows. Please have a look at

,----[ (info "(emacs)Buffers") ]
| The text you are editing in Emacs resides in an object called a
| "buffer".
`----

,----[ (info "(emacs)Windows") ]
| Emacs can split a frame into two or many windows.
`----

,----[ (info "(emacs)Frames") ]
| When using a graphical display, you can create multiple windows at the
| system in a single Emacs session.  Each system-level window that
| belongs to Emacs displays a "frame" which can contain one or several
| Emacs windows.
`----

> The problem is these two frames are identical.

Those two _windows_ display the same _buffers_.

> When I open a 'file4.c' in left frame, it appears in right frame too.

Sure, cause both windows are associated with the same buffer.

> How to make these two frames independent?

You have to switch to another buffer in one of the windows. You do that
with `C-x b' (`switch-buffer'). There are many different modes and
functions for fast and convenient buffer switching/maneuvering like
`ibuffer' and `ido', just to name a few. Have a look at the docs and
www.emacswiki.org.

Bye,
Tassilo
-- 
The glass is neither half-full nor half-empty: it's twice as big as it
needs to be.

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

* Re: Split frame?
  2007-03-13 19:01 Split frame? Vols
  2007-03-13 19:33 ` Tassilo Horn
@ 2007-03-13 20:10 ` Malte Spiess
  2007-03-13 20:33 ` Peter Dyballa
       [not found] ` <mailman.894.1173818057.7795.help-gnu-emacs@gnu.org>
  3 siblings, 0 replies; 13+ messages in thread
From: Malte Spiess @ 2007-03-13 20:10 UTC (permalink / raw)
  To: help-gnu-emacs

"Vols" <volunteers@gmail.com> writes:

> Hi, group,
>
> I have 3 file in one frame, say file1.c, file2.c and file3.c

You seem not to be very familiar with the Emacs names for things like
frames and windows.
In Emacs a frame is a thing you can move around with your window
manager. A window is a part (with text) in a frame.

So what do you mean here??

> I use 'C-x 3' to split the frame vertically. The problem is these two
> frames are identical. When I open a 'file4.c' in left frame, it
> appears in right frame too.

You probably mean window? I don't have the effect here.

> How to make these two frames independent? Thanks

They pretty much are here. Windows, too.

Please be more precise.

Malte

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

* Re: Split frame?
  2007-03-13 19:01 Split frame? Vols
  2007-03-13 19:33 ` Tassilo Horn
  2007-03-13 20:10 ` Malte Spiess
@ 2007-03-13 20:33 ` Peter Dyballa
       [not found] ` <mailman.894.1173818057.7795.help-gnu-emacs@gnu.org>
  3 siblings, 0 replies; 13+ messages in thread
From: Peter Dyballa @ 2007-03-13 20:33 UTC (permalink / raw)
  To: Vols; +Cc: help-gnu-emacs


Am 13.03.2007 um 20:01 schrieb Vols:

> I have 3 file in one frame, say file1.c, file2.c and file3.c
> I use 'C-x 3' to split the frame vertically. The problem is these two
> frames are identical. When I open a 'file4.c' in left frame, it
> appears in right frame too.
> How to make these two frames independent? Thanks

This does not happen to me – but I am not using four C files! (Not  
regularly.)

Can you reproduce this behaviour when you launch GNU Emacs with -Q,  
i.e. no local customisation at all? And: how do you open each of  
these four files?

--
Greetings

   Pete

$ sumascii BILL GATES
   B   I   L   L   G   A   T   E   S
  66+ 73+ 76+ 76+ 71+ 65+ 84+ 69+ 83 = 663

  and add 3 because he's Bill Gates the third.

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

* Re: Split frame?
       [not found] ` <mailman.894.1173818057.7795.help-gnu-emacs@gnu.org>
@ 2007-03-13 21:37   ` Vols
  2007-03-13 21:56     ` Peter Dyballa
  2007-03-13 22:04     ` Colin S. Miller
  0 siblings, 2 replies; 13+ messages in thread
From: Vols @ 2007-03-13 21:37 UTC (permalink / raw)
  To: help-gnu-emacs

On Mar 13, 1:33 pm, Peter Dyballa <Peter_Dyba...@Web.DE> wrote:
> Am 13.03.2007 um 20:01 schrieb Vols:
>
> > I have 3 file in one frame, say file1.c, file2.c and file3.c
> > I use 'C-x 3' to split the frame vertically. The problem is these two
> > frames are identical. When I open a 'file4.c' in left frame, it
> > appears in right frame too.
> > How to make these two frames independent? Thanks
>
> This does not happen to me - but I am not using four C files! (Not
> regularly.)
>
I installed a plugin "tabbar.el" so that each file has a tab at the
top of the window. (looks like the tab in firefox).
Usually I need to work with more than 10 ".c" or ".h" files at the
same time. I used 'C-x C-f' to open files. After I used 'C-x 3' to
split to two windows, the tabs in each window are identical. If I kill
one buffer in left window, this buffer is also killed in right window.
This is my problem.

Vol.

> Can you reproduce this behaviour when you launch GNU Emacs with -Q,
> i.e. no local customisation at all? And: how do you open each of
> these four files?
>
> --
> Greetings
>
>    Pete
>
> $ sumascii BILL GATES
>    B   I   L   L   G   A   T   E   S
>   66+ 73+ 76+ 76+ 71+ 65+ 84+ 69+ 83 = 663
>
>   and add 3 because he's Bill Gates the third.

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

* Re: Split frame?
  2007-03-13 21:37   ` Vols
@ 2007-03-13 21:56     ` Peter Dyballa
  2007-03-14 13:18       ` Stephen Berman
  2007-03-13 22:04     ` Colin S. Miller
  1 sibling, 1 reply; 13+ messages in thread
From: Peter Dyballa @ 2007-03-13 21:56 UTC (permalink / raw)
  To: Vols; +Cc: help-gnu-emacs


Am 13.03.2007 um 22:37 schrieb Vols:

> I installed a plugin "tabbar.el" so that each file has a tab at the
> top of the window. (looks like the tab in firefox).
> Usually I need to work with more than 10 ".c" or ".h" files at the
> same time. I used 'C-x C-f' to open files. After I used 'C-x 3' to
> split to two windows, the tabs in each window are identical. If I kill
> one buffer in left window, this buffer is also killed in right window.
> This is my problem.

No, this is tabbar's problem! I use it in two Emacs flavours and know  
what you're writing of ...

I don't see much sense in using tabbar.el, because it is behaving  
strangely or I need to re-read the docs, except the Emacsen are a bit  
handicapped. Doesn't the usual control-(left-)click bring up a pop-up  
with sorted or grouped buffers?

--
Greetings

   Pete

"If you don't find it in the index, look very carefully through the  
entire
  catalogue."          –  Sears, Roebuck, and Co., Consumer's Guide,  
1897

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

* Re: Split frame?
  2007-03-13 21:37   ` Vols
  2007-03-13 21:56     ` Peter Dyballa
@ 2007-03-13 22:04     ` Colin S. Miller
  1 sibling, 0 replies; 13+ messages in thread
From: Colin S. Miller @ 2007-03-13 22:04 UTC (permalink / raw)
  To: help-gnu-emacs

Vols,

I think you are slightly confused about how Emacs handles buffers (files) and windows.

Unlike most MS-Windows applications, a file is not locked to a window.

It is possible to have a file displayed in several windows at once;
all will be updated when any edits are made.
Likewise, it is possible to remove a buffer from a window;
It will still be loaded in Emacs, but not currently displayed.


Assuming you have two unloaded files, foo.c and goo.h, try this


C-x 0
* Closes all windows except the current one, and expands
   remaining window to size of frame.

C-x f goo.h  RET
* Reads goo.h from disk, and displays it in current window,
   hiding previously displayed buffer.

C-x f foo.c  RET
* Reads foo.c from disk, and displays it in current window,
   hiding previously displayed buffer (goo.h).
   NB goo.h is still open in emacs, but is not associated with a buffer,
   and therefore not displayed.

C-x 3
* splits window into two windows, horizontally. Both windows
   display the same buffer, foo.c

C-x o
* Swaps from current window into next window.

C-x b goo.h RET
Makes current window display the buffer 'goo.h'

C-x o
* Swaps from current window into next window.

After this,
foo.c should be on the left,
goo.h on the right,
and you are editing foo.c

You can press
C-x o
to swap between them at any time.


NB
In Emacs,
A 'buffer' is either a buffer that has been loaded from disk,
an unsaved document, output from Emacs, etc.
A frame is what is normally called a window in MS-Windows.
A window is what is normally called a MDI window in MS-Windows.

This is because Emacs was originally written before windowing systems were invented.

HTH.
Colin S. Miller

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

* Re: Split frame?
  2007-03-13 21:56     ` Peter Dyballa
@ 2007-03-14 13:18       ` Stephen Berman
  2007-03-14 14:03         ` Peter Dyballa
  0 siblings, 1 reply; 13+ messages in thread
From: Stephen Berman @ 2007-03-14 13:18 UTC (permalink / raw)
  To: help-gnu-emacs

On Tue, 13 Mar 2007 22:56:45 +0100 Peter Dyballa <Peter_Dyballa@Web.DE> wrote:

> Am 13.03.2007 um 22:37 schrieb Vols:
>
>> I installed a plugin "tabbar.el" so that each file has a tab at the
>> top of the window. (looks like the tab in firefox).
>> Usually I need to work with more than 10 ".c" or ".h" files at the
>> same time. I used 'C-x C-f' to open files. After I used 'C-x 3' to
>> split to two windows, the tabs in each window are identical. If I kill
>> one buffer in left window, this buffer is also killed in right window.
>> This is my problem.
>
> No, this is tabbar's problem! I use it in two Emacs flavours and know
> what you're writing of ...

Why do you think this is a problem with tabbar?  It has nothing to do
with tabbar that, if a buffer is displayed in multiple windows, then
killing the buffer will remove its display from all those windows.

> I don't see much sense in using tabbar.el, because it is behaving
> strangely or I need to re-read the docs, except the Emacsen are a bit
> handicapped.

What do you mean by strange behavior?  I use tabbar and don't see any
behavior I consider strange.

>              Doesn't the usual control-(left-)click bring up a pop-up
> with sorted or grouped buffers?

The default binding of C-<mouse-1> is mouse-buffer-menu, which pops up
an unsorted and ungrouped buffer list.  What you describe sounds like
msb-mode (which overrides C-<mouse-1>).

Steve Berman

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

* Re: Split frame?
  2007-03-14 13:18       ` Stephen Berman
@ 2007-03-14 14:03         ` Peter Dyballa
  2007-03-14 14:36           ` Stephen Berman
  0 siblings, 1 reply; 13+ messages in thread
From: Peter Dyballa @ 2007-03-14 14:03 UTC (permalink / raw)
  To: Stephen Berman; +Cc: help-gnu-emacs


Am 14.03.2007 um 14:18 schrieb Stephen Berman:

> On Tue, 13 Mar 2007 22:56:45 +0100 Peter Dyballa wrote:
>
>> Am 13.03.2007 um 22:37 schrieb Vols:
>>
>>> I installed a plugin "tabbar.el" so that each file has a tab at the
>>> top of the window. (looks like the tab in firefox).
>>> Usually I need to work with more than 10 ".c" or ".h" files at the
>>> same time. I used 'C-x C-f' to open files. After I used 'C-x 3' to
>>> split to two windows, the tabs in each window are identical. If I  
>>> kill
>>> one buffer in left window, this buffer is also killed in right  
>>> window.
>>> This is my problem.
>>
>> No, this is tabbar's problem! I use it in two Emacs flavours and know
>> what you're writing of ...
>
> Why do you think this is a problem with tabbar?

It exhibits strange behaviour that fits into Vols' experience! I can  
kill in the upper window a buffer that still exists in the lower  
window. Only difference: the upper window had a valid dired contents,  
the lower window is just blank and kind of re-uses the same buffer  
name. Types of buffers are grouped, so a structure can change in the  
upper window and persists to exist in the lower buffer – only the  
contents is gone with the wind. This grouping also leads to an  
inability to return with C-x b to a previously used buffer, because  
the "group" has changed. One can never see all buffers open, I have  
to use mouse-buffer-menu to see what's in the frame(s) or session.

One such grouping goes with buffers which names start with ``*´´:  
*shell* | *grep* | *Man something*. The (fundamental mode) buffers  
*Messages* or *Completions* or *calendar* or *Holidays* or *temp*  
(from calendar) are not in this group. Messages* and *scratch* build  
one group, *Holidays* and *Moonphases* are also grouped as another pair.

I have no strong indication and I could not reproduce Vols'  
experience, it's just an assumption. To really verify this  
experience, Vols should follow my suggestion to launch GNU Emacs with  
no or less customisation, i.e. with -Q or -q switches ...

>
>> I don't see much sense in using tabbar.el, because it is behaving
>> strangely or I need to re-read the docs, except the Emacsen are a bit
>> handicapped.
>
> What do you mean by strange behavior?  I use tabbar and don't see any
> behavior I consider strange.

See above description.

>
>>              Doesn't the usual control-(left-)click bring up a pop-up
>> with sorted or grouped buffers?
>
> The default binding of C-<mouse-1> is mouse-buffer-menu, which pops up
> an unsorted and ungrouped buffer list.  What you describe sounds like
> msb-mode (which overrides C-<mouse-1>).
>

It's bound to mouse-buffer-menu.

--
Greetings

   Pete

“Computers are good at following instructions, but not at reading  
your mind.”
    - D. E. Knuth, The TeXbook, Addison-Wesley 1984, 1986, 1996, p. 9

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

* Re: Split frame?
  2007-03-14 14:03         ` Peter Dyballa
@ 2007-03-14 14:36           ` Stephen Berman
  2007-03-14 15:09             ` Peter Dyballa
  0 siblings, 1 reply; 13+ messages in thread
From: Stephen Berman @ 2007-03-14 14:36 UTC (permalink / raw)
  To: help-gnu-emacs

On Wed, 14 Mar 2007 15:03:59 +0100 Peter Dyballa <Peter_Dyballa@Web.DE> wrote:

> Am 14.03.2007 um 14:18 schrieb Stephen Berman:
>>
>> Why do you think this is a problem with tabbar?
>
> It exhibits strange behaviour that fits into Vols' experience! I can
> kill in the upper window a buffer that still exists in the lower
> window. Only difference: the upper window had a valid dired contents,
> the lower window is just blank and kind of re-uses the same buffer
> name. Types of buffers are grouped, so a structure can change in the
> upper window and persists to exist in the lower buffer – only the
> contents is gone with the wind. This grouping also leads to an
> inability to return with C-x b to a previously used buffer, because
> the "group" has changed. One can never see all buffers open, I have
> to use mouse-buffer-menu to see what's in the frame(s) or session.
>
> One such grouping goes with buffers which names start with ``*´´:
> *shell* | *grep* | *Man something*. The (fundamental mode) buffers
> *Messages* or *Completions* or *calendar* or *Holidays* or *temp*
> (from calendar) are not in this group. Messages* and *scratch* build
> one group, *Holidays* and *Moonphases* are also grouped as another
> pair.
>
> I have no strong indication and I could not reproduce Vols'
> experience, it's just an assumption. To really verify this
> experience, Vols should follow my suggestion to launch GNU Emacs with
> no or less customisation, i.e. with -Q or -q switches ...

What version of tabbar.el are you using?  What you describe sounds
like a bug that was fixed in CVS some time ago (the current CVS
version is 1.69 (tabbar-version 2.0) from 8 June 2006; I cannot
reproduce what you describe in that version).  If you are using the
latest released version (tabbar-version 1.3), I would highly recommend
replacing it with the CVS version.  But if you do, be aware that there
were major changes between 1.3 and 2.0, and you may have to make
changes to your ~/.emacs or custom-file.

>>>              Doesn't the usual control-(left-)click bring up a pop-up
>>> with sorted or grouped buffers?
>>
>> The default binding of C-<mouse-1> is mouse-buffer-menu, which pops up
>> an unsorted and ungrouped buffer list.  What you describe sounds like
>> msb-mode (which overrides C-<mouse-1>).
>>
>
> It's bound to mouse-buffer-menu.

Are you saying this shows you a sorted and group buffer list, like
msb-mode does?  That would be very strange.  I don't get that with
mouse-buffer-menu in GNU Emacs 22.0.93.1 (i686-pc-linux-gnu, GTK+
Version 2.10.6) of 2007-02-08.

Steve Berman

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

* Re: Split frame?
  2007-03-14 14:36           ` Stephen Berman
@ 2007-03-14 15:09             ` Peter Dyballa
  2007-03-14 15:57               ` Stephen Berman
  0 siblings, 1 reply; 13+ messages in thread
From: Peter Dyballa @ 2007-03-14 15:09 UTC (permalink / raw)
  To: Stephen Berman; +Cc: help-gnu-emacs


Am 14.03.2007 um 15:36 schrieb Stephen Berman:

> What version of tabbar.el are you using?

1.3 – thanks for mentioning that an update exists! Where can I find  
the newer code? The Emacs Wiki still points ti version 1.3 in http:// 
sourceforge.net/projects/emhacks/.

>>
>> It's bound to mouse-buffer-menu.
>
> Are you saying this shows you a sorted and group buffer list, like
> msb-mode does?  That would be very strange.  I don't get that with
> mouse-buffer-menu in GNU Emacs 22.0.93.1 (i686-pc-linux-gnu, GTK+
> Version 2.10.6) of 2007-02-08.

This behaviour is *very* old, more than 10 years (I saw it first in  
GNU Emacs 19.*). The popped up "Buffer Menu" shows titles like "Dired  
by date," "Fundamental," "PDFLaTeX/F," "C," "Help" ... and a triangle  
sign pointing to the right. When the mouse cursor hovers over a title  
an additional menu pops up showing the group's members from which I  
can choose. The road to success starts with this customisation:

	 '(mouse-buffer-menu-mode-mult 1)

BTW, I have no idea how msb-mode looks like. Simple grouped buffer  
list is OK for me.

--
Greetings

   Pete

"We have to expect it, otherwise we would be surprised."

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

* Re: Split frame?
  2007-03-14 15:09             ` Peter Dyballa
@ 2007-03-14 15:57               ` Stephen Berman
  2007-03-14 16:37                 ` Peter Dyballa
  0 siblings, 1 reply; 13+ messages in thread
From: Stephen Berman @ 2007-03-14 15:57 UTC (permalink / raw)
  To: help-gnu-emacs

On Wed, 14 Mar 2007 16:09:40 +0100 Peter Dyballa <Peter_Dyballa@Web.DE> wrote:

> Am 14.03.2007 um 15:36 schrieb Stephen Berman:
>
>> What version of tabbar.el are you using?
>
> 1.3 – thanks for mentioning that an update exists! Where can I find
> the newer code? The Emacs Wiki still points ti version 1.3 in http://
> sourceforge.net/projects/emhacks/.

>From that page click on the Code tab and select CVS Browse.

>>> It's bound to mouse-buffer-menu.
>>
>> Are you saying this shows you a sorted and group buffer list, like
>> msb-mode does?  That would be very strange.  I don't get that with
>> mouse-buffer-menu in GNU Emacs 22.0.93.1 (i686-pc-linux-gnu, GTK+
>> Version 2.10.6) of 2007-02-08.
>
> This behaviour is *very* old, more than 10 years (I saw it first in
> GNU Emacs 19.*). The popped up "Buffer Menu" shows titles like "Dired
> by date," "Fundamental," "PDFLaTeX/F," "C," "Help" ... and a triangle
> sign pointing to the right. When the mouse cursor hovers over a title
> an additional menu pops up showing the group's members from which I
> can choose. The road to success starts with this customisation:
>
> 	 '(mouse-buffer-menu-mode-mult 1)

Thanks, I wasn't aware of this variable.  In my Emacs it has the
default value of 4, which evidently suppresses the grouped listing.

> BTW, I have no idea how msb-mode looks like. Simple grouped buffer
> list is OK for me.

The popup menu also shows groups, but not strictly by major mode; it
also has a group of most recently used buffers and buffers of changed
files.  Just do M-x msb-mode and then C-<mouse-1> to try it.

Steve Berman

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

* Re: Split frame?
  2007-03-14 15:57               ` Stephen Berman
@ 2007-03-14 16:37                 ` Peter Dyballa
  0 siblings, 0 replies; 13+ messages in thread
From: Peter Dyballa @ 2007-03-14 16:37 UTC (permalink / raw)
  To: Stephen Berman; +Cc: help-gnu-emacs


Am 14.03.2007 um 16:57 schrieb Stephen Berman:

>
>> BTW, I have no idea how msb-mode looks like. Simple grouped buffer
>> list is OK for me.
>
> The popup menu also shows groups, but not strictly by major mode; it
> also has a group of most recently used buffers and buffers of changed
> files.  Just do M-x msb-mode and then C-<mouse-1> to try it.

I think I was using it in GNU Emacs 18.x – I remember it and the  
toggle to group this or that way ...

--
Greetings

   Pete

Build a man a fire and he'll be warm for a night, but set a man on  
fire and he'll be warm for the rest of his life.

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

end of thread, other threads:[~2007-03-14 16:37 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-13 19:01 Split frame? Vols
2007-03-13 19:33 ` Tassilo Horn
2007-03-13 20:10 ` Malte Spiess
2007-03-13 20:33 ` Peter Dyballa
     [not found] ` <mailman.894.1173818057.7795.help-gnu-emacs@gnu.org>
2007-03-13 21:37   ` Vols
2007-03-13 21:56     ` Peter Dyballa
2007-03-14 13:18       ` Stephen Berman
2007-03-14 14:03         ` Peter Dyballa
2007-03-14 14:36           ` Stephen Berman
2007-03-14 15:09             ` Peter Dyballa
2007-03-14 15:57               ` Stephen Berman
2007-03-14 16:37                 ` Peter Dyballa
2007-03-13 22:04     ` Colin S. Miller

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).