The Emacs command C-x 4 a adds a new entry to the change log
file for the file you are editing
(add-change-log-entry-other-window
).
A change log file contains a chronological record of when and why you have changed a program, consisting of a sequence of entries describing individual changes. Normally it is kept in a file called `ChangeLog' in the same directory as the file you are editing, or one of its parent directories. A single `ChangeLog' file can record changes for all the files in its directory and all its subdirectories.
A change log entry starts with a header line that contains your name,
your email address (taken from the variable user-mail-address
),
and the current date and time. Aside from these header lines, every
line in the change log starts with a space or a tab. The bulk of the
entry consists of items, each of which starts with a line starting
with whitespace and a star. Here are two entries, both dated in May
1993, each with two items:
@medbreak
1993-05-25 Richard Stallman <[email protected]> * man.el: Rename symbols `man-*' to `Man-*'. (manual-entry): Make prompt string clearer. * simple.el (blink-matching-paren-distance): Change default to 12,000. 1993-05-24 Richard Stallman <[email protected]> * vc.el (minor-mode-map-alist): Don't use it if it's void. (vc-cancel-version): Doc fix.
(Previous Emacs versions used a different format for the date.)
One entry can describe several changes; each change should have its own item. Normally there should be a blank line between items. When items are related (parts of the same change, in different places), group them by leaving no blank line between them. The second entry above contains two items grouped in this way.
C-x 4 a visits the change log file and creates a new entry unless the most recent entry is for today's date and your name. It also creates a new item for the current file. For many languages, it can even guess the name of the function or other object that was changed.
The change log file is visited in Change Log mode. In this major mode, each bunch of grouped items counts as one paragraph, and each entry is considered a page. This facilitates editing the entries. C-j and auto-fill indent each new line like the previous line; this is convenient for entering the contents of an entry.
Version control systems are another way to keep track of changes in your program and keep a change log. See section Features of the Log Entry Buffer.
Go to the first, previous, next, last section, table of contents.