| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This chapter provides a complete reference guide to Patcher. Everything there is to know about Patcher is here, but if you want to find a particular piece of information, you'd better know already where to look for it...
6.1 Patcher Projects Storing project descriptions 6.2 Patcher Entry Points Calling Patcher 6.3 Patcher FakeMail Mode Driving the fakemail buffer 6.4 Gnus Mail Method Special settings for Gnus 6.5 Patcher Minor Mode Driving the mail buffer 6.6 Patcher LogMsg Mode Driving the log message buffer
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
6.1.1 Project Registration Where to store Patcher Projects 6.1.2 Project Options How to describe Patcher projects 6.1.3 Special Project Options Exceptions to the rules
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Patcher stores projects descriptions in the following two variables:
patcher
List of project descriptors used by patcher-mail and
patcher-mail-subproject.
Each project descriptor looks like `(NAME DIR :OPTION VALUE ...)' where NAME is a string naming your project, DIR is a string specifying the directory in which it resides, and the remainder is a sequence of option/value pairs (see section 6.1.2 Project Options).
patcher
List of subproject descriptors used by patcher-mail and
patcher-mail-subproject.
Each subproject descriptor looks like `(NAME PARENT :OPTION VALUE ...)' where NAME is a string naming your subproject, PARENT is a string naming the project this subproject is based on, and the remainder is a sequence of option/value pairs (see section 6.1.2 Project Options).
Subprojects must lie under the same directory as (or under a subdirectory of) the parent project. Subprojects and project must not have names in common.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
For each existing project option, Patcher also has a fallback user
option with a default value. The name of the fallback variable is
obtained by replacing the colon in the project option's name with the
prefix patcher-default-. They all belong to the Custom group
patcher-default.
When Patcher needs the value of a particular option, it first looks in the project descriptor to see if the option is given. If that fails, it recursively looks in the options of all inherited projects (see section 6.1.3 Special Project Options). If that still fails, it finally falls back to the value given by the corresponding fallback variable.
Here's a list of available project options:
:mail-method
Currently, there are four built-in methods: compose-mail (the
default), sendmail, message, gnus and fake.
You can also define your own method, say foo. In that case, you
must provide a function named patcher-mail-foo which takes two
arguments: a project descriptor and a string containing the subject of
the message. This function must prepare a mail buffer. If you want to do
this, please see how it's done for the built-in methods.
:subject-prefix
nil
A %n occurring in this string will be replaced with the project's
name. A space will be inserted between the prefix and the rest of the
subject, as appropriate. This part of the subject is never prompted for.
:subject-committed-prefix
nil means don't change the prefix after committing.
:subject
nil
A %n occurring in this string will be replaced with the project's
name. Please note that this is used only to provide a default value for
prompted subjects. Subjects are always prompted for.
:mail-prologue
nil.
:change-logs-updating
Possible values and their meaning are:
automatic
manual
nil
:change-logs-user-name
If nil, let patch-to-change-log decide what to use. Otherwise, it
should be a string.
:change-logs-user-mail
If nil, let patch-to-change-log decide what to use. Otherwise, it
should be a string.
:change-logs-appearance
The values currently supported are:
verbatim
packed
patch
nil
:change-logs-prologue
This applies when ChangeLog additions appear verbatim in the message. A
%f occurring in this string will be replaced with the ChangeLog
file name (relative to the project's directory).
:diff-prologue-function
Insertion must occur at current point in current buffer. This function should take one (symbol) argument indicating the kind of diff:
sources indicates a source diff only,
change-logs indicates a ChangeLog diff only,
mixed indicates a diff on both source and ChangeLog
files.
The following variables are bound (when appropriate) when this function is executed:
name
source-diff
change-log-diff
source-files
change-log-files
In the case of a mixed diff, a nil value for
change-log-diff indicates that the same command was used for both
the source and ChangeLog files.
:diff-command
A %f occurring in this string will be replaced with the files
affected by the patch. These files can be specified by using
patcher-mail-subproject instead of patcher-mail to prepare
the patch, or by using a permanent subproject. Otherwise, the %f
will simply be removed.
:after-diff-hook
Each function should take two optional arguments delimiting the diff region (no argument means process the whole buffer) and work in the current buffer. The point is placed at the beginning of the region, and the buffer excursion is saved for you.
There is a special built-in function named
patcher-prcs-diff-convert that can be used in this hook to
convert PRCS diff output to a traditional one.
:diff-line-filter
When inserting a diff in Patcher mails, lines matching this regexp will be excluded. Note: the regexp must match the whole line. Don't add beginning and end of line markers to it, Patcher will do this for you.
By default, local files unknown to CVS are filtered out.
:change-logs-diff-command
This value is used when the ChangeLogs appearance is either
packed or patch. If set to diff, use the same
command as for the rest of the patch. Otherwise, it should be a string.
A %f occurring in this string will be replaced with the ChangeLog
filenames.
Note: it is highly recommended to remove the context from ChangeLog diffs because they often fail to apply correctly.
:commit-privilege
:commit-command
This command should contain either a %s or a %S which will
be replaced with the name of a file containing the commit log message,
or he log message itself, respectively. A %f occurring in the
command will be replaced with the files affected by the patch. These
files can be specified by using patcher-mail-subproject instead
of patcher-mail to prepare the patch, or by using a permanent
subproject. Otherwise, the %f will simply be removed.
:confirm-commits
:committed-notice
:failed-command-regexp
Commands in question are the diff and the commit one.
:log-message-items
This is nil, or a list of the following items:
subject
compressed-change-logs
change-logs
:change-logs-separator
Either nil, or a string which will be inserted in a line of its
own.
:edit-log-message
:kill-source-files-after-sending
Not implemented yet.
:kill-change-logs-after-sending
:kill-source-files-after-diffing
These files are loaded temporarily by patch-to-change-log. If
this variable is non nil, patch-to-change-log will be
instructed to remove them when they are not needed anymore.
:to-address
This variable is used by all mail methods except the gnus one. If not defined, it is prompted for.
:gnus-group
This variable is used only by the gnus mail method. The mail
sending process will behave as if you had type `C-u a' in the
*Group* buffer on that Gnus group. If not defined, it is prompted
for.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The following project options behave in a somewhat particular way. None of the has a corresponding fallback user option.
:inheritance
:subdirectory
:files
:subdirectory
subproject option is given, these files or directories should be
relative to this subdirectory. Otherwise, they should be relative to the
base project's directory.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
There are currently two main entry points for calling Patcher:
PROJECT is the name of a Patcher project or permanent subproject.
SUBJECT is the subject of the mail.
When called interactively, use a prefix ARG to override the value
of the diff command to use for this project. Note that this is not the
way to restrict the diff to certain files. If you want to work on a
temporary subset of the (sub)project (e.g. some files, subdirectories
etc), you have two alternatives, use the function
patcher-mail-subproject instead.
PROJECT is the name of a project or a subproject.
SUBJECT is the subject of the mail.
FILES is a string listing one or more files, possibly with wild cards; essentially, part of a command line to be interpolated into the diff and maybe the commit commands issued by Patcher.
When called interactively, use a prefix ARG to override the value of the diff command to use for this project.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Patcher FakeMail mode is the major mode that drives the fake mail buffer. Nothing much to say about it.
Pretend to send a fake Patcher mail. Only perform the usual cleanup after real Patcher mails are sent.
Show the current Patcher version.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This mail method requires a running Gnus session. Here are some user options that control Patcher in this respect:
patcher-mail
Whether Patcher should run Gnus.
If Gnus is not running at the time it is needed, Patcher can start it (or not) depending on the value of this variable (a symbol):
nil, Patcher will abort execution,
prompt (the default), Patcher will ask you what to do,
t Patcher will unconditionally start Gnus.
patcher-mail
Whether Patcher should start Gnus in a new frame.
Possible values (symbols) are:
nil
t
follow
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Patcher minor mode is the mode that drives Patcher in all mail buffers.
(Re)generate the diff in the current Patcher mail buffer.
When called interactively, use a prefix ARG to override the diff command used for this project.
Note that this is not the way to specify files affected by this patch.
(Re)Insert ChangeLog entries in the current Patcher mail buffer.
patcher-mail
ChangeLogs insertion checking prior to sending a Patcher mail.
This option affects the behavior of Patcher when ChangeLogs are supposed to appear by manual insertion into the mail buffer:
nil, Patcher never checks that you have inserted them, and
lets you send the message as-is,
t, Patcher blindly aborts the sending process if you have
forgotten to insert the ChangeLog entries in the message buffer,
ask (the default), Patcher asks you whether you want to
proceed with sending or not.
Prepare to, and possibly commit a change to a project's repository. The change is the one that is announced in the mail buffer.
When called interactively, use a prefix ARG to override the commit command to use. Note that this is not meant to modify the source and ChangeLog files affected by the commit: they are computed automatically.
patcher-mail
Commit action checking prior to sending a Patcher mail.
This option affects the behavior of Patcher when you have set the
:commit-privilege project option:
nil, Patcher never checks that you have commited your changes,
and lets you send the message without having done so,
t, Patcher blindly aborts the sending process if you have
forgotten to commit your changes,
ask (the default), Patcher asks you whether you want to
proceed with sending or not.
Show the current Patcher version.
patcher
String to use in the modeline when Patcher minor mode is active.
patcher
Hooks to run after setting up Patcher minor mode.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Patcher LogMsg mode is the mode that drives Patcher in log message buffers.
Insert the Patcher mail subject into the current LogMsg buffer at point.
Insert ChangeLog entries in the current Patcher LogMsg buffer at point.
When used interactively, use a prefix ARG to also insert the ChangeLogs separator string.
Insert compressed ChangeLog entries in the current Patcher LogMsg buffer.
(Re)Init the log message in the current Patcher LogMsg buffer.
Commit the change described in the current Patcher LogMsg buffer.
When called interactively, use a prefix ARG to override the commit command.
Show the current Patcher version.
| [ << ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |