[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: difference between window and buffer
From: |
Jean Louis |
Subject: |
Re: difference between window and buffer |
Date: |
Tue, 12 Jan 2021 07:31:19 +0300 |
User-agent: |
Mutt/2.0 (3d08634) (2020-11-07) |
* 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