Emacs: Refresh File Automatically

By Xah Lee. Date: . Last updated: .

If someone modified a file that is already opened in your emacs, typically emacs will detect it, and when you type something, emacs will ask you what to do.

you can manually update the file from disk by Alt+x revert-buffer

To always refresh automatically, put this in your Emacs Init File:

;; set file to auto refresh when change detected (For example, changed by other)
(global-auto-revert-mode 1)

Emacs: auto save, backup

ErgoEmacs mascot-s276x226
Buy Xah Emacs Tutorial

Emacs Init

Init Basics

Keys

Font

Text Editing

Completion

File

Restore Things

Backup/AutoSave

Line

Appearance

Misc

Advanced Init Tips

packages