unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: "Colin S. Miller" <no-spam-thank-you@csmiller.demon.co.uk>
To: help-gnu-emacs@gnu.org
Subject: Re: Split frame?
Date: Tue, 13 Mar 2007 22:04:53 +0000	[thread overview]
Message-ID: <45f72006$0$90271$14726298@news.sunsite.dk> (raw)
In-Reply-To: <1173821874.429444.164170@n76g2000hsh.googlegroups.com>

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

      parent reply	other threads:[~2007-03-13 22:04 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='45f72006$0$90271$14726298@news.sunsite.dk' \
    --to=no-spam-thank-you@csmiller.demon.co.uk \
    --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.
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).