Next: , Previous: ChangeLogs Navigation, Up: ChangeLogs Handling


4.4.4 ChangeLogs Appearance

The appearance of ChangeLog entries in the message is controlled by the :change-logs-appearance project option. Its value must be a symbol from the following:

verbatim
This is the default. ChangeLog entries appear just as text in the message, above the patch. Most people prefer this kind of appearance since it is the most readable.
pack
ChangeLog entries appear as a patch (they are diff'ed against the archive). This patch is however distinct from the source patch, and appears above it.
patch
ChangeLog entries appear as a patch (they are diff'ed against the archive), and this patch is integrated into the source patch. In other words, the message looks like a global patch integrating both the sources and the ChangeLogs.
nil
The ChangeLog entries don't appear in the message at all.

When the ChangeLogs appearance is either pack or patch, the diff command used to generate the patch is controlled by the :change-logs-diff-command project option. The value can be nil, meaning that the same diff command is to be used as for the sources (see Diff Command), or it can be a string specifying an alternate command.

When diffing ChangeLog files, it is strongly recommended that you remove contexts from the diff, because otherwise, ChangeLog patches often fail to apply correctly.

The :change-logs-diff-command project option supports the same substitution constructs as the :diff-command one (see Diff Command). For example, here is the ChangeLogs diff command used in the git built-in theme (see Themes): ‘git diff -U0 --no-prefix HEAD%?f{ -- }%f’.

When ChangeLog entries are written in advance (see Manual ChangeLogs), Patcher can (and does) insert them into the mail buffer automatically. However, Patcher cannot tell when you're done filling in skeletons (see Automatic ChangeLogs), so in such a case you need to insert the ChangeLog entries explicitly. This is done by calling the function patcher-mail-insert-change-logs. It is bound to C-c C-p l in the mail buffer.

With an additional prefix argument, or when your project is set to not normally include ChangeLogs in mail buffers, you will also be prompted for an alternate appearance (for this time only).

In fact, this function can also be used in all situations to reinsert the ChangeLog entries into the mail buffer, whatever their appearance. This comes in handy if you decide to further modify them after the initial insertion (it's never too late to fix a typo).

One last note: the same binding is available in ChangeLog buffers as well. The effect is to call patcher-change-log-insert-change-logs, which in essence switches to the mail buffer and performs insertion in a row. This saves you one C-c C-p m keystroke.