unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Jean Louis <bugs@gnu.support>
To: help-gnu-emacs@gnu.org
Subject: Re: difference between window and buffer
Date: Tue, 12 Jan 2021 07:31:19 +0300	[thread overview]
Message-ID: <X/0mFxxiSpobG/9G@protected.rcdrun.com> (raw)
In-Reply-To: <trinity-a5a1269a-9980-4273-bd4f-1f1f142a1a60-1610365899433@3c-app-mailcom-bs13>

* michael-franzese@gmx.com <michael-franzese@gmx.com> [2021-01-11 14:53]:
> 
> I am getting confused what is the difference between window and buffer.

You could find it in the info documentation:

20.1 Concepts of Emacs Windows
==============================

Each Emacs window displays one Emacs buffer at any time.  A single
buffer may appear in more than one window; if it does, any changes in
its text are displayed in all the windows where it appears.  But these
windows can show different parts of the buffer, because each window has
its own value of point.

   At any time, one Emacs window is the “selected window”; the buffer
this window is displaying is the current buffer.  On graphical displays,
the point is indicated by a solid blinking cursor in the selected
window, and by a hollow box in non-selected windows.  On text terminals,
the cursor is drawn only in the selected window.  *Note Cursor
Display::.
-----------------

I will explain it how I see it:

- buffers are memory parts that Emacs as software maintains. Buffers
  usually contain text or or other pieces of information. And usually
  buffers can be edited. Some buffers cannot be edited as they may be
  read-only, some are only to display information, keep, process or
  manage information. Buffers can be many. They are not seen unless
  displayed in a window.

- window is the rectangular area that you see in Emacs. You can split
  it into multiple windows. Window may show one buffer of text or
  other information, and you could split windows to display multiple
  buffers. You can as well use multiple windows to display and use the
  same buffer.

The command M-x list-buffers should help you understand it, as then
you can see there are so many buffers even if you just have one
rectangular area in front of you displaying the current buffer or the
one buffer being used in the window.

Jean




  parent reply	other threads:[~2021-01-12  4:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-11 11:51 difference between window and buffer michael-franzese
2021-01-11 12:05 ` Eduardo Ochs
2021-01-12  4:31 ` Jean Louis [this message]
2021-01-12  4:50 ` Emanuel Berg via Users list for the GNU Emacs text editor

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=X/0mFxxiSpobG/9G@protected.rcdrun.com \
    --to=bugs@gnu.support \
    --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).