I am trying to check how frame, buffer, and file work.
It seems to me that frame commands(C-x 5 ...
) create a frame,
whether a buffer or file exists or not.
Here is what I am thinking:
C-x 5 2
1. Create a new frame.
2. Copy the current buffer into the new frame.
C-x 5 b bufname <RET>
1. Create a new frame.
2-1. Check if the bufname buffer exists.
2-2. Create a new buffer if 'bufname' does not exist.
3. Copy the buffer into the new frame.
C-x 5 f filename <RET>
1. Creates a new frame.
2-1. Open the file specified.
2-2. Create a new file if not exists.
3. Create a new buffer using the file above.
4. Assign the opened filename to the buffer name.
5. Copy the buffer into the new frame.
Am I right? It seems to me that we can have multiple frames for a single buffer.
Is emacs buffer a mapping between a buffer name and character sequence in memory?
When you open a file, does emacs assign a buffer name with its name(without extension) and add to the buffer list?