As I have already explained, a mark does not necessarily have to point at a character loaded into a buffer; it can also point at a character in a file on disk somewhere. When this happens the mark is said to be non-resident.
t when the character pointed to by the marker
mark is resident in one of the editor's buffers.
When the function mark-file (see section Mark Components) is applied
to a non-resident mark it returns the full name of the file, for example,
(setq x (make-mark (pos 0 20) "/tmp/foo.c"))
=> #<mark "/tmp/foo.c" #<pos 1 21>>
(mark-resident-p x)
=> nil
(mark-file x)
=> "/tmp/foo.c"
When a file is loaded into a buffer all existing non-resident marks are examined to see if they point to that file. If so that mark has its file component set to the buffer that the file was loaded into.
Similarly, when a buffer is deleted any marks pointing to characters in that buffer are made non-resident: their file component is set to the name of the file.
When the function which moves the cursor to the position of a specific
mark (goto-mark, see section Moving to Marks) is called with a
non-resident mark it will try to load the file into a buffer.
The following code fragment can be used to ensure that a mark mark is resident,
(or (mark-resident-p mark)
(open-file (mark-file mark))
(error "Can't make mark resident, %S" mark))
Go to the first, previous, next, last section, table of contents.