Kiran Chauhan

Cogito, ergo sum // I think, therefore I am.

Emacs Minipost Pt. 6

Do you remember that in last Minipost we did some modifications in main.c file and saved it again for the sake of practice? I wants you to open that directory/folder location in file manager.

Notice we're seeing two files - main.c file and another file that has same name but ends with ~ e.g. main.c~. This is how Emacs save the backup of your file in case something goes wrong.

If you want, we can disable this backup saving by configuring this option in Emacs config file. Open the Emacs config file and add following:

(setq make-backup-files nil)

Follow these steps:

  1. Press ctrl-x ctrl-f and open the Emacs config file (write the relative or absolute path).
  2. Do the modification as suggested above. e.g. add (setq make-backup-files nil) in config file.
  3. Press ctrl-x ctrl-s to save the config changes.
  4. Go to file manager and delete main.c~ file.
  5. Press ctrl-x ctrl-f and open the main.c file.
  6. Remove that extra printf() that we added previously.
  7. Press ctrl-x ctrl-s to save the changes in main.c file.
  8. Go to the file manager and see if we now have main.c~ file or not?
  9. Confirm that we don't have. If that is the case, yay! If not then try closing and then re-opening the Emacs.

Summary: We disabled the backup saving functionalities and practice the whole save, open, save flow.