next up previous contents
Next: Action Processors Up: BBDB Filters & Processors Previous: Output Filters

Subsections

  
Input Filters

``Input filters'' are used to import into BBDB information from a foreign system's data file.

The name of the function is conventionally named bbdb-input-<system> (e.g., bbdb-input-passwd is the name of the Emacs Lisp function for the UNIX password file input filter).

In general, an ``input filter'' expects the foreign system's data to be in the current buffer. The contents of the current buffer are used to create an Emacs Lisp file which when loaded will add new records into your BBDB database if they don't yet exist-existing BBDB records will not be modified.

General Facilities for Input Filtering

The result of running an input filter is to produce a new buffer a series of bif-create-record expressions, each corresponding to a single user's record. Notice that input filters do not directly modify the contents of the BBDB files (typically ` /.bbdb').

To actually modify the contents of the BBDB database, you must evaluated the expressions in the resultant buffer created by the input filter. One way to do so is simply to invoke M-x eval-buffer. Another way is to simply save the buffer to disk and load its contents into Emacs Lisp using M-x load-file.

UNIX Password Files

The UNIX password file input filter is in file bbdb-passwd.el.

1.
Use M-x find-file to visit the UNIX password file you wish to import.

2.
With the password file in the current buffer, invoke the input filter M-x bbdb-input-passwd. You will be prompted for the domain name associated with that host's password file; an organization name; as well as the file name to be associated with the buffer of bif-create-record expressions.

3.
Evaluate the contents of the input filter's buffer to add records into your BBDB database file.


next up previous contents
Next: Action Processors Up: BBDB Filters & Processors Previous: Output Filters