Emacs visits files in buffers. Editing changes the buffer first; saving writes its current contents to the associated pathname. Read minibuffer messages because permissions, conflicting disk changes, or other errors can prevent a write.
Advanced Text-Fu · Lesson 10
Emacs Manipulate Files
Learn how to visit, save, rename, revisit, and review file-backed buffers in Emacs.