1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932
|
\input texinfo.tex
@c %**start of header
@setfilename eudc.info
@settitle Emacs Unified Directory Client (EUDC) Manual
@iftex
@afourpaper
@end iftex
@c %**end of header
@footnotestyle end
@ifinfo
@direntry
* EUDC:: A client for directory servers (LDAP, PH)
@end direntry
This file documents EUDC v1.28
EUDC is part of XEmacs.
EUDC is the Emacs Unified Directory Client, a common interface
interface to directory servers using various protocols such as LDAP or
the CCSO white pages directory system (PH/QI)
Copyright @copyright{} 1998 Free Software Foundation, Inc.
Permission is granted to make and distribute verbatim
copies of this manual provided the copyright notice and
this permission notice are preserved on all copies.
@ignore
Permission is granted to process this file through TeX
and print the results, provided the printed document
carries a copying permission notice identical to this
one except for the removal of this paragraph (this
paragraph not being relevant to the printed manual).
@end ignore
Permission is granted to copy and distribute modified
versions of this manual under the conditions for
verbatim copying and the terms of the ``GNU General
Public License'', and provided that the entire
resulting derived work is distributed under the terms
of a permission notice identical to this one.
Permission is granted to copy and distribute
translations of this manual into another language,
under the above conditions for modified versions,
except that this permission notice may be stated in a
translation approved by the Free Software Foundation.
@end ifinfo
@titlepage
@title{EUDC Manual}
@subtitle{The Emacs Unified Directory Client}
@author by Oscar Figueiredo
@code{1.0}
@page
@vskip 0pt plus 1fill
Copyright @copyright{} 1998 Free Software Foundation, Inc.
Permission is granted to make and distribute verbatim
copies of this manual provided the copyright notice and
this permission notice are preserved on all copies.
@ignore
Permission is granted to process this file through TeX
and print the results, provided the printed document
carries a copying permission notice identical to this
one except for the removal of this paragraph (this
paragraph not being relevant to the printed manual).
@end ignore
Permission is granted to copy and distribute modified
versions of this manual under the conditions for
verbatim copying and the terms of the ``GNU General
Public License'', and provided that the entire
resulting derived work is distributed under the terms
of a permission notice identical to this one.
Permission is granted to copy and distribute
translations of this manual into another language,
under the above conditions for modified versions,
except that this permission notice may be stated in a
translation approved by the Free Software Foundation.
@end titlepage
@ifinfo
@node Top, Overview, (dir), (dir)
@comment node-name, next, previous, up
This manual documents EUDC v1.28, the Emacs Unified Directory Client.
A common interface interface to directory servers using various
protocols such as LDAP or the CCSO white pages directory system (PH/QI)
@end ifinfo
@menu
* Overview:: Summary of EUDC features
* Installation:: How to install EUDC
* Usage:: The various usage possibilities explained
* Credits:: Who's done what
* Variables Index::
@end menu
@node Overview, Installation, Top, Top
@comment node-name, next, previous, up
@chapter Overview
EUDC, the Emacs Unified Directory Client, provides a common user
interface to access directory servers using different directory
protocols.
Currently supported back-ends are:
@itemize @bullet
@item
LDAP, Lightweight Directory Access Protocol
@item
CCSO PH/QI
@item
BBDB, Big Brother's Insiduous Database
@end itemize
The main features of the EUDC interface are:
@itemize @bullet
@item
Queries using a customizable form
@item
Inline query expansion (for instance you can expand a name
to an e-mail address in a mail message buffer using a server as an
address book)
@item
Multiple servers can be tried in turn until a match is found for an
inline query
@item
Fast minibuffer queries for e-mail addresses and phone numbers
@item
Interface to BBDB to let you insert server records into your own BBDB database
(@pxref{Top,,BBDB,bbdb,BBDB Manual})
@end itemize
@menu
* LDAP:: What is LDAP ?
* CCSO PH/QI:: What is CCSO, PH, QI ?
* BBDB:: What is BBDB ?
@end menu
@node LDAP, CCSO PH/QI, Overview, Overview
@comment node-name, next, previous, up
@section LDAP
LDAP, Lightweight Directory Access Protocol, is a communication
protocol for directory applications defined in RFC 1777.
Quoted from RFC 1777:
[LDAP] is designed to provide access to the X.500 Directory while not
incurring the resource requirements of the Directory Access Protocol
(DAP). This protocol is specifically targeted at simple management
applications and browser applications that provide simple read/write
interactive access to the X.500 Directory, and is intended to be a
complement to the DAP itself.
LDAP servers usually store (but are not limited to) information about
people such as their name, phone number, e-mail address, office
location, etc@enddots{} More information about LDAP can be found at
@url{http://www.umich.edu/~dirsvcs/ldap/}
EUDC requires external support to access LDAP directory servers
(@pxref{LDAP Requirements})
@node CCSO PH/QI, BBDB, LDAP, Overview
@comment node-name, next, previous, up
@section CCSO PH/QI
The Central Computing Services Office (CCSO) of the University of
Illinois at Urbana Champaign (UIUC) created and freely distributes a
directory system that is currently in use in more than 300 organizations
around the world. The system records information about people such as
their address, phone number, e-mail, academic information or any other
details it was configured to.
The system consists of two parts: a database server traditionally called
@code{qi} and a command-line client called
@code{ph}. @url{ftp://uiarchive.cso.uiuc.edu/pub/packages/ph} is the
main distribution site.
@url{http://www.uiuc.edu/cgi-bin/ph/lookup?Query=.} provides a listing
of the active @code{qi} servers.
The original command-line @code{ph} client that comes with the
@code{ph/qi} distribution provides additional features like the
possibility to communicate with the server in login mode which makes it
possible to change records in the database. This is not implemented in
EUDC.
@node BBDB, , CCSO PH/QI, Overview
@comment node-name, next, previous, up
@section BBDB
BBDB is the Big Brother's Insiduous Database, a package for Emacs
originally written by Jamie Zawinski and which provides rolodex-like
database functionality with tight integration with the Emacs mail and
news readers.
It is often used as an enhanced e-mail address book.
EUDC considers BBDB as a directory server backend just like LDAP or
PH/QI servers though BBDB has no client/server protocol and thus always
resides locally on your machine. The point in this is not to offer an
alternate way to query your BBDB database (BBDB itself provides much
more flexible ways to do that) but rather to offer an interface to your
local directory that is consistent with the interface to external
directories (LDAP, PH/QI). This is particularly interesting to perform
queries on multiple servers.
EUDC also offers a means to insert results from directory queries into
your own local BBDB (@pxref{Creating BBDB Records})
@node Installation, Usage, Overview, Top
@comment node-name, next, previous, up
@chapter Installation
The installation procedure depends on the Emacs flavor you are running.
On XEmacs, EUDC is distributed as an XEmacs package. Follow the rules
for the installation of XEmacs packages (@pxref{Packages,,XEmacs
Packages,xemacs,XEmacs Manual}).
On GNU Emacs simply copy the @code{*.el} files to some directory in your
@code{load-path}. Add the following to your @code{.emacs} init file:
@lisp
(require 'eudc)
@end lisp
This will install EUDC at startup.
After installing EUDC you will find (the next time you launch Emacs) a
new @code{Directory Search} submenu in the @code{Tools} menu that will give you
access to EUDC.
You may also find useful to add the following to your @code{.emacs}
initialization file to add a shortcut for e-mail address expansion in
e-mail composition buffers (@pxref{Inline Query Expansion})
@lisp
(eval-after-load
"message"
'(define-key message-mode-map [(control ?c) (tab)] 'eudc-expand-inline))
(eval-after-load
"mail"
'(define-key mail-mode-map [(control ?c) (tab)] 'eudc-expand-inline))
@end lisp
@menu
* LDAP Requirements:: EUDC needs external support for LDAP
@end menu
@node LDAP Requirements, , Installation, Installation
@comment node-name, next, previous, up
@section LDAP Requirements
EUDC needs external support to query LDAP servers. If LDAP support is
not available you will get that error message: @samp{Cannot open load
file: ldap}
In XEmacs LDAP support can be compiled into the XEmacs binary. LDAP
support is automatically compiled in when you build XEmacs provided
appropriate LDAP libraries are installed on your system. As of this
writing you can use either (URLs are subject to change):
@itemize @bullet
@item
Open LDAP Libraries
(@url{http://www.openldap.org/})
@item
University of Michigan's LDAP Client software
(@url{http://www.umich.edu/~dirsvcs/ldap/})
@item
Netscape's LDAP SDK (@url{http://developer.netscape.com/one/directory/})
@end itemize
In GNU Emacs, LDAP support is added by means of @code{ldap.el} available
from the same place you downloaded EUDC. @code{ldap.el} needs an
external command line utility named @code{ldapsearch} which is available
in the LDAP toolkits mentioned above.
@node Usage, Credits, Installation, Top
@comment node-name, next, previous, up
@chapter Usage
This chapter describes the usage of EUDC. Most functions and
customization options are available through the @code{Directory Search}
sub-menu of the @code{Tools} sub-menu.
@menu
* Querying Servers:: How queries are performed and handled
* Query Form:: How to use and customize the query form
* Inline Query Expansion:: How to use and customize inline queries
* The Server Hotlist:: How to use and manage the server hotlist
* Multi-server Queries:: How to query multiple servers sucessively
* Creating BBDB Records:: How to insert query results into your BBDB
* Server/Protocol Locals:: Customizing on a per server/protocol basis
@end menu
@node Querying Servers, Query Form, Usage, Usage
@comment node-name, next, previous, up
@section Querying Servers
EUDC's basic functionality is to let you query a directory server
and return the results back to you. There are several things you may
want to customize in this process.
@menu
* Selecting a Server:: The first thing to do
* Return Attributes:: Configuring what the server should return
* Duplicate Attributes:: What to do when records have duplicate attributes
@end menu
@node Selecting a Server, Return Attributes, Querying Servers, Querying Servers
@subsection Selecting a Server
Before doing any query you will need to set the directory server. You
need to specify the name of the host machine running the server software
and the protocol to use. If you do not set the server in any fashion,
EUDC will ask you for one when you make your first query.
You can set the server by selecting one from your hotlist of servers
(@pxref{The Server Hotlist}) available in the @samp{Server} submenu or
by selecting @samp{New Server} in that same menu.
@defvar eudc-server
The name or IP address of the remote directory server. A TCP port number
may be specified by appending a colon and a number to the name of the
server. You will not need this unless your server runs on a port other
than the default (which depends on the protocol).
If the directory server resides on your own computer (which is the case
if you use the BBDB backend) then `localhost' is a reasonable value.
@end defvar
@defvar eudc-protocol
The directory protocol to use to query the server. Currently supported
protocols in this version of EUDC are @samp{ph}, @samp{ldap} and @samp{bbdb}.
@end defvar
@deffn Command eudc-set-server
This command accessible from @samp{Server} submenu lets you specify a
new directory server and protocol.
@end deffn
@node Return Attributes, Duplicate Attributes, Selecting a Server, Querying Servers
@subsection Return Attributes
Directory servers may be configured to return a default set of attributes for
each record matching a query if the query specifies none. The variable
@code{eudc-default-return-attributes} controls the return attributes you want to
see, if different from the server defaults.
@defvar eudc-default-return-attributes
A list of the default attributes to extract from directory entries. If
set to the symbol @code{all} then all available attributes are returned. @code{nil}
returns the default attributes as configured in the server. Default is
@code{nil}
@end defvar
The server may return several matching records to a query. Some of the
records may however not contain all the attributes you requested. You can
discard those records.
@defopt eudc-strict-return-matches
If non-@code{nil}, entries that do not contain all the requested return
attributes are ignored. Default is @code{t}.
@end defopt
@node Duplicate Attributes, , Return Attributes, Querying Servers
@subsection Duplicate Attributes
Directory standards may authorize different instances of the same
attribute in a record. For instance the record of a person may contain
several e-mail fields containing different e-mail addresses. When using
a QI directory server this is difficult to distinguish from attributes
having multi-line values such as the postal address that may contain a
line for the street and another one for the zip code and city name. In
both cases, EUDC will consider the attribute be duplicated.
EUDC has several methods to deal with duplicated attributes. The
available methods are:
@table @code
@item list
Makes a list with the different values of the duplicate attribute. The
record is returned with only one instance of the attribute with a list
of all the different values as a value. This is the default method that
is used to handle duplicate fields for which no other method has been
specified.
@item first
Discards all the duplicate values of the field keeping only the first
one.
@item concat
Concatenates the different values using @code{\n} as a separator. The
record keeps only one instance of the field the value of which is a
single multi-line string.
@item duplicate
Duplicates the whole record into as many instances as there are different
values for the field. This is the default for the e-mail field. Thus a
record containing 3 different e-mail addresses is duplicated into three
different records each having a single e-mail address. This is
particularly useful in combination with @code{select} as the method to
handle multiple matches in inline expansion queries (@pxref{Inline Query
Expansion}) because you are presented with the 3 addresses in a
selection buffer
@end table
Because a method may not be applicable to all fields, the variable
@code{eudc-duplicate-attribute-handling-method} lets you specify either a
default method for all fields or a method for each individual field.
@defvar eudc-duplicate-attribute-handling-method
A method to handle entries containing duplicate attributes. This is
either an alist (@var{attr} . @var{method}) or a symbol @var{method}.
The alist form of the variable associates a method to an individual
attribute name, the second form specifies a method applicable to all
attribute names. Available methods are: @code{list}, @code{first}, @code{concat},
@code{duplicate} (see above). Defaults to @code{list}.
@end defvar
@node Query Form, Inline Query Expansion, Querying Servers, Usage
@comment node-name, next, previous, up
@section Query Form
The simplest way to query your directory server is to use the query
form. You display the query form with the @code{Query with Form} menu
item or by invoking the command @kbd{eudc-query-form}. The attribute
names presented in this form are defined by the
@code{eudc-query-form-attributes} variable (unless a non-@code{nil}
argument is supplied to @code{eudc-query-form}).
Since the different directory protocols to which eudc interfaces may
have different names for equivalent attributes, EUDC defines its own set
of attribute names and a mapping between these names and their
protocol-specific equivalent through the variable
@code{eudc-protocol-attributes-translation-alist}. Names currently
defined by EUDC are @samp{name}, @samp{firstname}, @samp{email} and
@samp{phone}.
@defvar eudc-query-form-attributes
A list of attributes presented in the query form. Attribute names in
this list should be either EUDC attribute names or valid attribute
names. You can get a list of valid attribute names for the current
protocol with the @code{List Valid Attribute Names} menu item or the
@kbd{eudc-get-attribute-list} command. Defaults to @code{name},
@code{email} and @code{phone}.
@end defvar
@deffn Command eudc-query-form get-fields-from-server
Display a form to query the directory server. If given a non-@code{nil}
argument the function first queries the server for the existing fields
and displays a corresponding form. All protocols may not support a
non-@code{nil} argument here.
@end deffn
Since the names of the fields may not be explicit enough or adapted to
be directly displayed as prompt strings in the form, the variable
@code{eudc-user-attribute-names-alist} lets you define more explicit
names for directory attribute names. This variable is ignored if
@code{eudc-use-raw-directory-names} is non-@code{nil}.
@defvar eudc-user-attribute-names-alist
This is an alist of user-defined names for the directory attributes used in
query/response forms. Prompt strings for attributes that are not in this
alist are derived by splitting the attribute name at underscores and
capitalizing the individual words.
@end defvar
@defvar eudc-use-raw-directory-names
If non-@code{nil}, use attributes names as defined in the directory.
Otherwise, directory query/response forms display the user attribute
names defined in @code{eudc-user-attribute-names-alist}.
@end defvar
Upon successful completion the command will display a buffer containing
the results of the query. The fields that are returned for each record
are controlled by @code{eudc-default-return-attributes} (@pxref{Return
Attributes})
@node Inline Query Expansion, The Server Hotlist, Query Form, Usage
@comment node-name, next, previous, up
@section Inline Query Expansion
Inline query expansion is a powerful method to get completion from your
directory server. The most common usage is for expanding names to e-mail
addresses in mail message buffers. The expansion is performed by the
command @code{eudc-expand-inline} which is available from the
@samp{Directory Search} menu but can also be conveniently bound to a key
shortcut (@pxref{Installation}) The operation is controlled by the
variables @code{eudc-inline-expansion-format},
@code{eudc-inline-query-format},
@code{eudc-expanding-overwrites-query} and
@code{eudc-multiple-match-handling-method}.
If the query fails for a server, other servers may be tried successively
until one of them finds a match (@pxref{Multi-server Queries}).
@deffn Command eudc-expand-inline replace-p
Query the server and expand the query string before point. The query
string consists of the buffer substring from the point back to the
preceding comma, colon or beginning of
line. @code{eudc-inline-query-format} controls how individual words
are mapped onto directory attribute names. After querying the server
for the given string, the expansion specified by
@code{eudc-inline-expansion-format} is inserted in the buffer at
point. If @var{replace-p} is @code{t} then this expansion replaces the
query string in the buffer. If @code{eudc-expanding-overwrites-query}
is non-@code{nil} then the meaning of @var{replace-p} is negated.
@end deffn
@defvar eudc-inline-query-format
Format of an inline expansion query.
This is actually a list of @var{format}s. A @var{format} is a list of
one or more EUDC attribute names. A @var{format} applies if it contains
as many attributes as individual words in the inline query string. If
several @var{format}s apply then they are tried in order until a match
is found. If @code{nil} all the words will be mapped onto the default
server/protocol attribute name (generally @code{name}).
For instance, use the following
@lisp
(setq eudc-inline-query-format '((name)
(firstname)
(firstname name)))
@end lisp
to indicate that single word expansion queries are to be considered as
surnames and if no match is found then they should be tried as first
names. Inline queries consisting of two words are considered as
consisting of a first name followed by a surname. If the query consists
of more than two words, then the first one is considered as the first
name and the remaining words are all considered as surname constituents.
@end defvar
@defvar eudc-inline-expansion-format
This variable lets you control exactly what is inserted into the buffer
upon an inline expansion request. It is a list whose first element is a
string passed to @code{format}. Remaining elements are symbols
corresponding to directory attribute names.
The corresponding attribute values
are passed as additional arguments to format. Default is @code{("%s"
email)} but you may want to consider a value like @code{("%s <%s>" name
email)}
@end defvar
@defvar eudc-multiple-match-handling-method
This variable controls what to do when multiple entries match a query
for an inline expansion. Possible values are:
@table @code
@item first
The first match is considered as being the only one, the others are
discarded.
@item select
A selection buffer pops-up where you can choose a particular match. This
is the default value of the variable.
@item all
The expansion uses all records successively
@item abort
An error is signaled. The expansion aborts.
@end table
Defaults to @code{select}
@end defvar
@node The Server Hotlist, Multi-server Queries, Inline Query Expansion, Usage
@comment node-name, next, previous, up
@section The Server Hotlist
EUDC lets you maintain a list of frequently used servers so that you
can easily switch from one to another. This hotlist appears in the
@code{Server} sub-menu. You select a server in this list by clicking on
its name. You can add the current server to the list with the command
@code{eudc-bookmark-current-server}. The list is contained in the variable
@code{eudc-server-hotlist} which is stored in and retrieved from the file
designated by @code{eudc-options-file}. EUDC also provides a facility to
edit the hotlist interactively (@pxref{The Hotlist Edit Buffer}).
The hotlist is also used to make queries on multiple servers
successively (@pxref{Multi-server Queries}). The order in which the
servers are tried is the order they appear in the hotlist, therefore it
is important to sort the hotlist appropriately.
@deffn Command eudc-bookmark-server server
Add @var{server} to the hotlist of servers
@end deffn
@deffn Command eudc-bookmark-current-server
Add the current server to the hotlist of servers
@end deffn
@defvar eudc-options-file
The name of a file where EUDC stores its internal variables
(the hotlist and the current server). EUDC will try to load
that file upon initialization so, if you choose a file name
different from the defaults @file{~/.eudc-options}, be sure to set this
variable to the appropriate value @emph{before} EUDC is itself
loaded.
@end defvar
@menu
* The Hotlist Edit Buffer:: An interactive hotlist editing facility
@end menu
@node The Hotlist Edit Buffer, , The Server Hotlist, The Server Hotlist
@comment node-name, next, previous, up
@subsection The Hotlist Edit Buffer
The hotlist edit buffer offers a means to manage a list of frequently
used servers. Commands are available in the context pop-up menu
generally bound to the right mouse button. Those commands also have
equivalent keybindings.
@deffn Command eudc-hotlist-add-server
Bound to @kbd{a}.
Add a new server to the hotlist on the line after point
@end deffn
@deffn Command eudc-hotlist-delete-server
Bound to @kbd{d}.
Delete the server on the line point is on
@end deffn
@deffn Command eudc-hotlist-select-server
Bound to @kbd{s}.
Select the server the point is on as the current directory server for
the next queries
@end deffn
@deffn Command eudc-hotlist-transpose-servers
Bound to @kbd{t}.
Bubble up the server the point is on to the top of the list
@end deffn
@deffn Command eudc-hotlist-quit-edit
Bound to @kbd{q}.
Save the changes and quit the hotlist edit buffer. Use @kbd{x} or
@code{kill-buffer} to exit without saving.
@end deffn
@node Multi-server Queries, Creating BBDB Records, The Server Hotlist, Usage
@comment node-name, next, previous, up
@section Multi-server Queries
When using inline query expansion (@pxref{Inline Query Expansion}), EUDC
can try to query successively a sequence of directory servers until one
of them successfully finds a match for the query.
@defvar eudc-inline-expansion-servers
This variable controls which servers are tried and in which order when
trying to perform an inline query. Possible values are:
@table @code
@item current-server
Only the current directory server is tried
@item hotlist
The servers in the hotlist are tried in order until one finds a match
for the query or `eudc-max-servers-to-query' is reached
@item server-then-hotlist
The current server then the servers in the hotlist are tried in the
order they appear in the hotlist until one of them finds a match or
`eudc-max-servers-to-query' is reached. This is the default.
@end table
@end defvar
@defvar eudc-max-servers-to-query
This variable indicates the maximum number of servers to query when
performing a multi-server query. The default, @code{nil}, indicates
that all available servers should be tried.
@end defvar
@node Creating BBDB Records, Server/Protocol Locals, Multi-server Queries, Usage
@comment node-name, next, previous, up
@section Creating BBDB Records
With EUDC, you can automatically create BBDB records
(@pxref{Top,,BBDB,bbdb,BBDB Manual}) from records you get from a
directory server. You do this by moving the point to the appropriate
record in a query result display buffer and invoking the command
@code{eudc-insert-record-at-point-into-bbdb} with the
keyboard binding @kbd{b} @footnote{This keybinding does not actually
call @code{eudc-insert-record-at-point-into-bbdb} but uses
@code{eudc-try-bbdb-insert} instead.}, or with the menu. EUDC
cannot update an existing BBDB record and will signal an error if you
try to insert a record matching an existing one.
Because directory systems may not enforce a strict record format, local
server installations may use different attribute names and have
different ways to organize the information. Furthermore BBDB has its own
record structure. For these reasons converting a record from its
external directory format to the BBDB format is a highly customizable
process.
@defvar eudc-bbdb-conversion-alist
The value of this variable should be a symbol naming an alist defining a
mapping between BBDB field names onto directory attribute names records.
This is a protocol-local variable and is initialized upon protocol
switch (@pxref{Server/Protocol Locals}) The alist is made of cells of the
form @code{(}@var{bbdb-field} . @var{spec-or-list}@code{)}.
@var{bbdb-field} is the name of a field
that must be defined in your BBDB environment (standard field names are
@code{name}, @code{company}, @code{net}, @code{phone}, @code{address}
and @code{notes}).
@var{spec-or-list} is either a single mapping specification or a list of
mapping specifications. Lists of mapping specifications are valid for
the @code{phone} and @code{address} BBDB fields only. @var{spec}s are
actually s-expressions which are evaluated as follows:
@table @asis
@item a string
evaluates to itself
@item a symbol
evaluates to the symbol value. Symbols corresponding to directory
attribute names present in the record evaluate to the value of the field
in the record
@item a form
is evaluated as a function. The argument list may contain attribute
names which evaluate to the corresponding values in the record. The form
evaluation should return something appropriate for the particular
@var{bbdb-field} (see @code{bbdb-create-internal}).
@code{eudc-bbdbify-phone} and @code{eudc-bbdbify-address} are provided as
convenience functions to parse phones and addresses.
@end table
@end defvar
The default value of the PH-specific value of that variable is
@code{eudc-ph-bbdb-conversion-alist}:
@lisp
((name . name)
(net . email)
(address . (eudc-bbdbify-address address "Address"))
(phone . ((eudc-bbdbify-phone phone "Phone")
(eudc-bbdbify-phone office_phone "Office Phone"))))
@end lisp
This means that:
@itemize @bullet
@item
the @code{name} field of the BBDB record gets its value
from the @code{name} attribute of the directory record
@item
the @code{net} field of the BBDB record gets its value
from the @code{email} attribute of the directory record
@item
the @code{address} field of the BBDB record is obtained by parsing the
@code{address} attribute of the directory record with the function
@code{eudc-bbdbify-address}
@item
two @code{phone} fields are created (when possible) in the BBDB record.
The first one has "Phone" for location and its value is obtained by
parsing the @code{phone} attribute of the PH/QI record with the function
@code{eudc-bbdbify-phone}. The second one has "Office Phone" for location
its value is obtained by parsing the @code{office_phone} attribute of the
PH/QI record with the function @code{eudc-bbdbify-phone}.
@end itemize
@defun eudc-bbdbify-phone phone location
This is a convenience function provided for use in
@code{eudc-bbdb-conversion-alist}. It parses @var{phone} into a vector
compatible with @code{bbdb-create-internal}. @var{phone} is either a string
supposedly containing a phone number or a list of such strings which are
concatenated. @var{location} is used as the phone location for BBDB.
@end defun
@defun eudc-bbdbify-address addr location
This is a convenience function provided for use in
@code{eudc-bbdb-conversion-alist}. It parses @var{addr} into a vector
compatible with @code{bbdb-create-internal}. @var{addr} should be an
address string of no more than four lines or a list of lines. The last
line is searched for the zip code, city and state name. @var{location}
is used as the phone location for BBDB.
@end defun
Note that only a subset of the attributes you selected with
@code{eudc-default-return-attributes} and that are actually displayed may
actually be inserted as part of the newly created BBDB record.
@node Server/Protocol Locals, , Creating BBDB Records, Usage
@comment node-name, next, previous, up
@section Server/Protocol Locals
EUDC can be customized independently for each server or directory
protocol. All variables can be given local bindings that are activated
when a particular server and/or protocol becomes active. This is much
like buffer-local bindings but on a per server or per protocol basis.
@menu
* Manipulating local bindings:: Functions to set and query local bindings
* LDAP Locals:: Built-in LDAP Local Variables
* PH Locals:: Built-in PH/QI Local Variables
@end menu
@node Manipulating local bindings, LDAP Locals, Server/Protocol Locals, Server/Protocol Locals
@comment node-name, next, previous, up
@subsection Manipulating local bindings
EUDC offers functions that let you set and query variables on a per
server or per protocol basis.
The following predicates allow to test for the existence of
server/protocol local bindings for a particular variable.
@defun eudc-server-local-variable-p var
Return non-nil if variable has server local bindings
@end defun
@defun eudc-protocol-local-variable-p var
Return non-nil if variable has protocol local bindings
@end defun
The following functions allow to set the value of a variable with
various degrees of localness.
@defun eudc-default-set var val
Set the EUDC default value of @var{var} to @var{val}.
The current binding of @var{var} (if local to the current server or
protocol) is not changed.
@end defun
@defun eudc-protocol-set var val [protocol]
Set the binding of @var{var} local to @var{protocol} to @var{val}.
If omitted @var{protocol} defaults to the current value of @code{eudc-protocol}.
The current binding of @var{var} is changed only if @var{protocol} is
omitted.
@end defun
@defun eudc-server-set var val [server]
Set the binding of @var{var} local to @var{server} to @var{val}.
If omitted @var{server} defaults to the current value of @code{eudc-server}.
The current binding of @var{var} is changed only if @var{server} is
omitted.
@end defun
@defun eudc-set var val
Set the most local (server, protocol or default) binding of @var{var} to @var{val}.
The current binding of @var{var} is also set to @var{val}.
@end defun
The following variables allow you to query for the various bindings of a
variable (local or non-local).
@defun eudc-variable-default-value var
Return the default binding of @var{var} (outside of a particular server
or protocol local binding).
Return @code{unbound} if @var{var} has no EUDC default value.
@end defun
@defun eudc-variable-protocol-value var [protocol]
Return the value of @var{var} local to @var{protocol}.
Return `unbound' if @var{var} has no value local to @var{protocol}.
@var{protocol} defaults to @code{eudc-protocol}.
@end defun
@defun eudc-variable-server-value (var &optional server)
Return the value of @var{var} local to @var{server}.
Return `unbound' if @var{var} has no value local to @var{server}.
@var{server} defaults to @code{eudc-server}.
@end defun
@node LDAP Locals, PH Locals, Manipulating local bindings, Server/Protocol Locals
@comment node-name, next, previous, up
@subsection LDAP Locals
@defvar eudc-ldap-bbdb-conversion-alist
An alist defining the mapping from BBDB to LDAP attribute names.
(@pxref{Creating BBDB Records})
@end defvar
@node PH Locals, , LDAP Locals, Server/Protocol Locals
@comment node-name, next, previous, up
@subsection PH Locals
@defvar eudc-ph-bbdb-conversion-alist
An alist defining the mapping from BBDB to PH/QI attribute names.
(@pxref{Creating BBDB Records})
@end defvar
@node Credits, Variables Index, Usage, Top
@comment node-name, next, previous, up
@chapter Credits
EUDC was written by Oscar Figueiredo based on @code{ph.el} by the
same author.
Thanks to Soren Dayton for his suggestions, his enthusiasm and his help
in testing and proofreading the code and docs of @code{ph.el}.
@node Variables Index, , Credits, Top
@comment node-name, next, previous, up
@unnumbered Variables Index
@printindex vr
@contents
@bye
|