BBDB Mode
=========
Functions bound to keys in BBDB Mode
------------------------------------
When the `*BBDB*' buffer is active (either summoned by one of the
commands in the previous section [Note:The BBDB.] or by your mail or
news program), a variety of commands become available for database
manipulation. Some of the commands listed below take numeric arguments.
These arguments can be generated by entering the number before pressing
the key(s) corresponding to the desired command. The output (if any) of
the listed commands will be displayed in the `*BBDB*' buffer, and can
be navigated through using the usual cursor motion commands.
`e'
(`bbdb-edit-current-field') Edit the field on the current line.
If the cursor is in the middle of a multi-line field, such as an
address or comments section, then the entire field is edited, not
just the current line.
`;'
(`bbdb-edit-notes') A shortcut for editing the NOTES field.
`d, C-k'
(`bbdb-delete-current-field-or-record') Delete the field on the
current line. If the current line is the first line of a record,
the BBDB will, after prompting the user, delete the entire record
from the database. This may also be applied to multiple records
at once by `*'.
`C-o'
(`bbdb-insert-new-field') Inserts a new field into the current
record. You are prompted (with completion) for the type of field
to insert (phone, address, notes, etc); if the string you type is
not a known field type, you will be asked whether to add a new
field with the entered name of type `notes'.
If you are inserting a new phone-number field, you can control
whether it is a North American or European phone number by
providing a prefix argument. A prefix arg of `^U' means it's to
be a euronumber, and any other prefix arg means it's to be a a
structured North American number. If no prefix argument is
supplied, the style used is controlled by the variable
`bbdb-north-american-phone-numbers-p'.
`C-x C-t'
(`bbdb-transpose-fields') This is like the `transpose-lines'
command, but it is for BBDB fields. If the cursor is on a field of
a BBDB record, that field and the previous field will be
transposed.
With non-zero numeric argument ARG, the previous field is moved
past ARG fields. With argument 0, the field indicated by point is
interchanged with the one indicated by mark.
Both fields must be in the same record, and must be of the same
basic type (that is, you can use this command to change the order
in which phone-number fields are listed, but you can't use it to
make an address appear before a phone number; the order of field
types is fixed.)
`n, p'
(`bbdb-next-record', `bbdb-prev-record') Move to the next and
previous displayed record, respectively.
`t'
(`bbdb-toggle-records-display-layout') Toggles the display layout
of a record. With a numeric argument of 0, the current record
will be made displayed in one line layout; with any other
argument, the current record will be shown in multi-line layout.
If `*t' is used instead of simply `t', then the state of all
records will be changed instead of just the one at point. In this
case, a numeric argument of 0 means that all records will
unconditionally be made one-line layout; any other numeric
argument means that all of the records will unconditionally be
shown expanded; and no numeric argument means that the records are
made to be in the opposite state of the record under point.
`T'
(`bbdb-display-record-completely') Show all the fields of the
current record. The display layout `full-multi-line' is used for
this.
`o'
(`bbdb-omit-record') Removes the current record from the display,
but does not delete it from the database; it merely makes it seem
as if the most recent search had not matched this record. With a
numeric argument, omit the next N records. With a negative
argument, go backwards.
`m'
(`bbdb-send-mail') Begin composing mail to the person represented
by the current record. The first email address is used.
Normally, the mail-sending package which is used is determined by
which mail-reading package is loaded; that is, if MH-E is loaded,
then `mh-send' will be used; if VM is loaded, then `vm-mail' is
used; if message is loaded, then it is used; otherwise, `mail' is
used. You can override this by setting the variable
`bbdb-send-mail-style' to one of the symbols `vm', `mh',
`message', or `mail'.
If `*m' is used instead of simply `m', then mail will be sent to
all of the folks listed in the `*BBDB*' buffer instead of just the
person under point.
This function does not at present use the facility provided by
`compose-mail' and `mail-user-agent'. In a future version of the
BBDB, it will.
`s, C-x C-s'
(`bbdb-save-db') Saves the BBDB file to disk.
`r'
(`bbdb-refile-record') Merge the current record into some other
record; that is, delete the record under point after copying all
of the data within it into some other record. this is useful if
you realize that somehow a redundant record has gotten into the
database, and you want to merge it with another.
If both records have names and/or companies, you are asked which
to use. Phone numbers, addresses, and network addresses are
simply concatenated. The first record is the record under the
point; the second is prompted for. Completion behavior is as
dictated by the variable `bbdb-completion-type'.
`M-d'
(`bbdb-dial') This command will attempt to dial the phone number
currently at point, or if point is at the start of a record, the
first phone number in the record. An extension, if present, is
disregarded.
The method of dialling is controlled by `bbdb-modem-dial'. If this
variable is nil, the BBDB will play touchtones corresponding to the
number to be dialled. Otherwise, this variable is treated as a
modem command string to be prepended to the number prior to
feeding it to `bbdb-modem-device'.
The BBDB plays touchtones using `bbdb-sound-player' to play the
sounds and the elements of `bbdb-sound-files' as the audio to be
played. The first ten elements of `bbdb-sound-files' correspond to
the touchtones for the digits `0' to `9', while the eleventh and
twelfth elements correspond to `#' and `*' respectively. The
default configuration assumes a Solaris[tm] installation with the
demonstration sound files in `/usr/demo/SOUND/sounds'.
The actual number dialled depends on the following variables:
`bbdb-dial-local-prefix-alist'
This is a list of (SEXPR REPLACEMENT) pairs. SEXPR is
evaluated to produce a regular expression which is then
applied to the number. If it matches, whatever it matches is
replaced by REPLACEMENT. The match and replace is performed
using each item in the list that matches, in sequence, so
that the output from one item may become input to another.
The default value for this variable is to remove
`(bbdb-default-area-code)' (i.e. the value of that variable,
in parenthesis) from the start of the number to be dialled.
Note: If this procedure produces a transformed number then no
further modifications (such as prefix additions, below) will
be made to the number before dialling.
Using a prefix argument to `bbdb-dial' disables the
processing of this variable. The other modifiers, below, are
not affected by this.
`bbdb-dial-local-prefix'
If the number to be dialled starts with a zero, it is deemed
to be a local number, and `bbdb-dial-local-prefix' is
prepended to it (see note above concerning
`bbdb-dial-local-prefix-alist' processing, however).
`bbdb-dial-long-distance-prefix'
If the number to be dialled starts with a plus sign (+), it
is deemed to be a long distance number, and
`bbdb-dial-long-distance-prefix' is prepended to it (see note
above concerning `bbdb-dial-local-prefix-alist' processing,
however).
`f'
(`bbdb-finger') This command fingers the network address of a
BBDB record. If this command is executed from the `*BBDB*' buffer,
it fingers the network address of the record which is at point;
otherwise, it prompts in the minibuffer (with completion) for a
user to finger. With a numeric prefix argument, it fingers the
Nth network address of the current record; with a prefix argument
of `^U', it fingers all of them. The `*finger*' buffer is filled
asynchronously, meaning that you don't have to wait around for it
to finish; but fingering another user before the first finger has
finished could have unpredictable results.
If this command is executed from the `*BBDB*' buffer, it may be
prefixed with `*' (as in `*f' instead of simply `f'), meaning to
finger all of the users currently listed instead of just the one
under point. The numeric prefix argument has the same
interpretation.
You can define a special network address to "finger" by defining a
field `finger-host'. The name of the field to be fingered can be
changed by setting `bbdb-finger-host-field'.
`q'
(`bbdb-bury-buffer') Hides the `*BBDB*' buffer. Note: This
command does not kill the `*BBDB*' buffer.
`?'
(`bbdb-help') This displays a one-line help message in the
minibuffer, showing some of the most common bbdb-mode commands.
`i'
(`bbdb-info') This documentation is displayed. Please note that
either `bbdb' or `bbdb.info' must be installed in one of the info
directories known to Emacs for this command to work.
`bbdb-info-file'
If this documentation is not installed in the standard Info
directory, then you should set this variable to the name of
the texinfo-formatted version of this file; the `bbdb-info'
command will use this file instead.
`W'
(`bbdb-www') Displays the Web page listed in the `www' field of
the current record. Note:Using Web Browsers.
`P'
(`bbdb-print') Creates a TeX file that contains a pretty-printed
version of BBDB records. If prefixed by `*', only the records
currently displayed will print. Note:bbdb-print.
`h'
Moves point to another window via the `other-window' function.
`c'
(`bbdb-create') Create a new database record from information
supplied by the user.
`C'
(`bbdb-changed') Display all records that have been changed since
the last time the database was saved.
`b'
(`bbdb') Begin a new database search. The results of the new
search will be displayed in place of the results of the old search.
`S a, S c, S o, S n'
(`bbdb-net', `bbdb-company', `bbdb-notes', `bbdb-name')
Begin a new database search. This search will be limited to the
net address, company, notes, or name fields, respectively, of
database records. Note:Basic Searching. for more details.
`*'
`bbdb-append-records' will make the next display/search command to
append its results to the BBDB buffer instead of replacing its
content.
With an prefix arg (C-u) toggle between always append and no
append. With an prefix arg that is a positive number append will
be enabled for that many times. With any other argument append
will be enabled once."
Other database manipulation functions
-------------------------------------
`bbdb-kill-older'
If called interactively (or with a single argument - a date in
`yyyy-mm-dd' format), it will kill all records that were last
modified before the given date as determined by the `timestamp'
field. Note:Predefined Hooks. If called non-interactively
with a date (in `yyyy-mm-dd' format), a comparison function and an
action function, the comparison function is applied to the
`timestamp' field of all records, and the action function applied
to those for whom the comparison function returns true. If `nil'
is supplied as the comparison function, `string-lessp' is used.