comparison man/eudc.texi @ 49600:23a1cea22d13

Trailing whitespace deleted.
author Juanma Barranquero <lekktu@gmail.com>
date Tue, 04 Feb 2003 14:56:31 +0000
parents 0a70200bde27
children 695cf19ef79e d7ddb3e565de
comparison
equal deleted inserted replaced
49599:5ade352e8d1c 49600:23a1cea22d13
68 * Overview:: Summary of EUDC features 68 * Overview:: Summary of EUDC features
69 * Installation:: How to install EUDC 69 * Installation:: How to install EUDC
70 * Usage:: The various usage possibilities explained 70 * Usage:: The various usage possibilities explained
71 * Credits:: Who's done what 71 * Credits:: Who's done what
72 * Command and Function Index:: 72 * Command and Function Index::
73 * Variables Index:: 73 * Variables Index::
74 @end menu 74 @end menu
75 75
76 76
77 77
78 78
81 @comment node-name, next, previous, up 81 @comment node-name, next, previous, up
82 @chapter Overview 82 @chapter Overview
83 83
84 EUDC, the @dfn{Emacs Unified Directory Client}, provides a common user 84 EUDC, the @dfn{Emacs Unified Directory Client}, provides a common user
85 interface to access directory servers using different directory 85 interface to access directory servers using different directory
86 protocols. 86 protocols.
87 87
88 Currently supported back-ends are: 88 Currently supported back-ends are:
89 89
90 @itemize @bullet 90 @itemize @bullet
91 @item 91 @item
97 @end itemize 97 @end itemize
98 98
99 The main features of the EUDC interface are: 99 The main features of the EUDC interface are:
100 100
101 @itemize @bullet 101 @itemize @bullet
102 @item 102 @item
103 Queries using a customizable form 103 Queries using a customizable form
104 @item 104 @item
105 Inline query expansion (for instance you can expand a name 105 Inline query expansion (for instance you can expand a name
106 to an email address in a mail message buffer using a server as an 106 to an email address in a mail message buffer using a server as an
107 address book) 107 address book)
214 You may also find it useful to add the following to your @file{.emacs} 214 You may also find it useful to add the following to your @file{.emacs}
215 initialization file to add a shortcut for email address expansion in 215 initialization file to add a shortcut for email address expansion in
216 email composition buffers (@pxref{Inline Query Expansion}) 216 email composition buffers (@pxref{Inline Query Expansion})
217 217
218 @lisp 218 @lisp
219 (eval-after-load 219 (eval-after-load
220 "message" 220 "message"
221 '(define-key message-mode-map [(control ?c) (tab)] 'eudc-expand-inline)) 221 '(define-key message-mode-map [(control ?c) (tab)] 'eudc-expand-inline))
222 (eval-after-load 222 (eval-after-load
223 "sendmail" 223 "sendmail"
224 '(define-key mail-mode-map [(control ?c) (tab)] 'eudc-expand-inline)) 224 '(define-key mail-mode-map [(control ?c) (tab)] 'eudc-expand-inline))
225 @end lisp 225 @end lisp
226 226
227 @menu 227 @menu
253 This chapter describes the usage of EUDC. Most functions and 253 This chapter describes the usage of EUDC. Most functions and
254 customization options are available through the @samp{Directory Search} 254 customization options are available through the @samp{Directory Search}
255 submenu of the @samp{Tools} submenu. 255 submenu of the @samp{Tools} submenu.
256 256
257 @menu 257 @menu
258 * Querying Servers:: How queries are performed and handled 258 * Querying Servers:: How queries are performed and handled
259 * Query Form:: How to use and customize the query form 259 * Query Form:: How to use and customize the query form
260 * Display of Query Results:: Controlling how query results are presented 260 * Display of Query Results:: Controlling how query results are presented
261 * Inline Query Expansion:: How to use and customize inline queries 261 * Inline Query Expansion:: How to use and customize inline queries
262 * The Server Hotlist:: How to use and manage the server hotlist 262 * The Server Hotlist:: How to use and manage the server hotlist
263 * Multi-server Queries:: How to query multiple servers successively 263 * Multi-server Queries:: How to query multiple servers successively
461 Upon successful completion of a form query, EUDC will display a buffer 461 Upon successful completion of a form query, EUDC will display a buffer
462 containing the results of the query. 462 containing the results of the query.
463 463
464 The fields that are returned for each record 464 The fields that are returned for each record
465 are controlled by @code{eudc-default-return-attributes} (@pxref{Return 465 are controlled by @code{eudc-default-return-attributes} (@pxref{Return
466 Attributes}). 466 Attributes}).
467 467
468 The display of each individual field can be performed by an arbitrary 468 The display of each individual field can be performed by an arbitrary
469 function which allows specific processing for binary values, such as 469 function which allows specific processing for binary values, such as
470 images or audio samples, as well as values with semantics, such as 470 images or audio samples, as well as values with semantics, such as
471 URLs. 471 URLs.
482 482
483 This variable has protocol-local definitions (see @pxref{Server/Protocol 483 This variable has protocol-local definitions (see @pxref{Server/Protocol
484 Locals}). For instance, it is defined as follows for LDAP: 484 Locals}). For instance, it is defined as follows for LDAP:
485 485
486 @lisp 486 @lisp
487 (eudc-protocol-set 'eudc-attribute-display-method-alist 487 (eudc-protocol-set 'eudc-attribute-display-method-alist
488 '(("jpegphoto" . eudc-display-jpeg-inline) 488 '(("jpegphoto" . eudc-display-jpeg-inline)
489 ("labeledurl" . eudc-display-url) 489 ("labeledurl" . eudc-display-url)
490 ("audio" . eudc-display-sound) 490 ("audio" . eudc-display-sound)
491 ("labeledurl" . eudc-display-url) 491 ("labeledurl" . eudc-display-url)
492 ("url" . eudc-display-url)) 492 ("url" . eudc-display-url))
493 'ldap) 493 'ldap)
494 @end lisp 494 @end lisp
495 495
496 EUDC provides a set of built-in functions to display binary value types: 496 EUDC provides a set of built-in functions to display binary value types:
497 497
545 controlled by the variables @code{eudc-inline-expansion-format}, 545 controlled by the variables @code{eudc-inline-expansion-format},
546 @code{eudc-inline-query-format}, 546 @code{eudc-inline-query-format},
547 @code{eudc-expanding-overwrites-query} and 547 @code{eudc-expanding-overwrites-query} and
548 @code{eudc-multiple-match-handling-method}. 548 @code{eudc-multiple-match-handling-method}.
549 549
550 If the query fails for a server, other servers may be tried successively 550 If the query fails for a server, other servers may be tried successively
551 until one of them finds a match (@pxref{Multi-server Queries}). 551 until one of them finds a match (@pxref{Multi-server Queries}).
552 552
553 @deffn Command eudc-expand-inline replace-p 553 @deffn Command eudc-expand-inline replace-p
554 Query the server and expand the query string before point. The query 554 Query the server and expand the query string before point. The query
555 string consists of the buffer substring from the point back to the 555 string consists of the buffer substring from the point back to the
562 query string in the buffer. If @code{eudc-expanding-overwrites-query} 562 query string in the buffer. If @code{eudc-expanding-overwrites-query}
563 is non-@code{nil} then the meaning of @var{replace-p} is negated. 563 is non-@code{nil} then the meaning of @var{replace-p} is negated.
564 @end deffn 564 @end deffn
565 565
566 @defvar eudc-inline-query-format 566 @defvar eudc-inline-query-format
567 Format of an inline expansion query. 567 Format of an inline expansion query.
568 This is actually a list of @var{format}s. A @var{format} is a list of 568 This is actually a list of @var{format}s. A @var{format} is a list of
569 one or more EUDC attribute names. A @var{format} applies if it contains 569 one or more EUDC attribute names. A @var{format} applies if it contains
570 as many attributes as individual words in the inline query string. If 570 as many attributes as individual words in the inline query string. If
571 several @var{format}s apply then they are tried in order until a match 571 several @var{format}s apply then they are tried in order until a match
572 is found. If @code{nil} all the words will be mapped onto the default 572 is found. If @code{nil} all the words will be mapped onto the default
573 server/protocol attribute name (generally @code{name}). 573 server/protocol attribute name (generally @code{name}).
574 574
575 For instance, use the following 575 For instance, use the following
576 @lisp 576 @lisp
577 (setq eudc-inline-query-format '((name) 577 (setq eudc-inline-query-format '((name)
578 (firstname) 578 (firstname)
579 (firstname name))) 579 (firstname name)))
580 @end lisp 580 @end lisp
581 @noindent 581 @noindent
582 to indicate that single word expansion queries are to be considered as 582 to indicate that single word expansion queries are to be considered as
583 surnames and if no match is found then they should be tried as first 583 surnames and if no match is found then they should be tried as first
584 names. Inline queries consisting of two words are considered as 584 names. Inline queries consisting of two words are considered as
585 consisting of a first name followed by a surname. If the query consists 585 consisting of a first name followed by a surname. If the query consists
586 of more than two words, then the first one is considered as the first 586 of more than two words, then the first one is considered as the first
587 name and the remaining words are all considered as surname constituents. 587 name and the remaining words are all considered as surname constituents.
588 588
589 @var{format}s are in fact not limited to EUDC attribute names, you can 589 @var{format}s are in fact not limited to EUDC attribute names, you can
590 use server or protocol specific names in them. It may be safer if you 590 use server or protocol specific names in them. It may be safer if you
618 @table @code 618 @table @code
619 @item first 619 @item first
620 The first match is considered as being the only one, the others are 620 The first match is considered as being the only one, the others are
621 discarded. 621 discarded.
622 @item select 622 @item select
623 A selection buffer pops up where you can choose a particular match. This 623 A selection buffer pops up where you can choose a particular match. This
624 is the default value of the variable. 624 is the default value of the variable.
625 @item all 625 @item all
626 The expansion uses all records successively 626 The expansion uses all records successively
627 @item abort 627 @item abort
628 An error is signaled. The expansion aborts. 628 An error is signaled. The expansion aborts.
635 635
636 @node The Server Hotlist, Multi-server Queries, Inline Query Expansion, Usage 636 @node The Server Hotlist, Multi-server Queries, Inline Query Expansion, Usage
637 @comment node-name, next, previous, up 637 @comment node-name, next, previous, up
638 @section The Server Hotlist 638 @section The Server Hotlist
639 639
640 EUDC lets you maintain a list of frequently used servers so that you 640 EUDC lets you maintain a list of frequently used servers so that you
641 can easily switch from one to another. This hotlist appears in the 641 can easily switch from one to another. This hotlist appears in the
642 @samp{Server} submenu. You select a server in this list by clicking on 642 @samp{Server} submenu. You select a server in this list by clicking on
643 its name. You can add the current server to the list with the command 643 its name. You can add the current server to the list with the command
644 @kbd{M-x eudc-bookmark-current-server}. The list is contained in the variable 644 @kbd{M-x eudc-bookmark-current-server}. The list is contained in the variable
645 @code{eudc-server-hotlist} which is stored in and retrieved from the file 645 @code{eudc-server-hotlist} which is stored in and retrieved from the file
659 Add the current server to the hotlist of servers 659 Add the current server to the hotlist of servers
660 @end deffn 660 @end deffn
661 661
662 @defvar eudc-options-file 662 @defvar eudc-options-file
663 The name of a file where EUDC stores its internal variables 663 The name of a file where EUDC stores its internal variables
664 (the hotlist and the current server). EUDC will try to load 664 (the hotlist and the current server). EUDC will try to load
665 that file upon initialization so, if you choose a file name 665 that file upon initialization so, if you choose a file name
666 different from the defaults @file{~/.eudc-options}, be sure to set this 666 different from the defaults @file{~/.eudc-options}, be sure to set this
667 variable to the appropriate value @emph{before} EUDC is itself 667 variable to the appropriate value @emph{before} EUDC is itself
668 loaded. 668 loaded.
669 @end defvar 669 @end defvar
773 @defvar eudc-bbdb-conversion-alist 773 @defvar eudc-bbdb-conversion-alist
774 The value of this variable should be a symbol naming an alist defining a 774 The value of this variable should be a symbol naming an alist defining a
775 mapping between BBDB field names onto directory attribute names records. 775 mapping between BBDB field names onto directory attribute names records.
776 This is a protocol-local variable and is initialized upon protocol 776 This is a protocol-local variable and is initialized upon protocol
777 switch (@pxref{Server/Protocol Locals}). The alist is made of cells of the 777 switch (@pxref{Server/Protocol Locals}). The alist is made of cells of the
778 form @code{(@var{bbdb-field} . @var{spec-or-list})}. 778 form @code{(@var{bbdb-field} . @var{spec-or-list})}.
779 @var{bbdb-field} is the name of a field 779 @var{bbdb-field} is the name of a field
780 that must be defined in your BBDB environment (standard field names are 780 that must be defined in your BBDB environment (standard field names are
781 @code{name}, @code{company}, @code{net}, @code{phone}, @code{address} 781 @code{name}, @code{company}, @code{net}, @code{phone}, @code{address}
782 and @code{notes}). 782 and @code{notes}).
783 @var{spec-or-list} is either a single mapping specification or a list of 783 @var{spec-or-list} is either a single mapping specification or a list of
784 mapping specifications. Lists of mapping specifications are valid for 784 mapping specifications. Lists of mapping specifications are valid for
785 the @code{phone} and @code{address} BBDB fields only. @var{spec}s are 785 the @code{phone} and @code{address} BBDB fields only. @var{spec}s are
786 actually s-expressions which are evaluated as follows: 786 actually s-expressions which are evaluated as follows:
787 787
788 @table @asis 788 @table @asis
789 @item a string 789 @item a string
790 evaluates to itself 790 evaluates to itself
791 @item a symbol 791 @item a symbol
792 evaluates to the symbol value. Symbols corresponding to directory 792 evaluates to the symbol value. Symbols corresponding to directory
793 attribute names present in the record evaluate to the value of the field 793 attribute names present in the record evaluate to the value of the field
794 in the record 794 in the record
795 @item a form 795 @item a form
796 is evaluated as a function. The argument list may contain attribute 796 is evaluated as a function. The argument list may contain attribute
797 names which evaluate to the corresponding values in the record. The form 797 names which evaluate to the corresponding values in the record. The form
798 evaluation should return something appropriate for the particular 798 evaluation should return something appropriate for the particular
799 @var{bbdb-field} (see @code{bbdb-create-internal}). 799 @var{bbdb-field} (see @code{bbdb-create-internal}).
800 @code{eudc-bbdbify-phone} and @code{eudc-bbdbify-address} are provided as 800 @code{eudc-bbdbify-phone} and @code{eudc-bbdbify-address} are provided as
801 convenience functions to parse phones and addresses. 801 convenience functions to parse phones and addresses.
814 @end lisp 814 @end lisp
815 815
816 This means that: 816 This means that:
817 817
818 @itemize @bullet 818 @itemize @bullet
819 @item 819 @item
820 the @code{name} field of the BBDB record gets its value 820 the @code{name} field of the BBDB record gets its value
821 from the @code{name} attribute of the directory record 821 from the @code{name} attribute of the directory record
822 @item 822 @item
823 the @code{net} field of the BBDB record gets its value 823 the @code{net} field of the BBDB record gets its value
824 from the @code{email} attribute of the directory record 824 from the @code{email} attribute of the directory record
930 @code{unbound} if @var{var} has no value local to @var{protocol}. 930 @code{unbound} if @var{var} has no value local to @var{protocol}.
931 @var{protocol} defaults to @code{eudc-protocol}. 931 @var{protocol} defaults to @code{eudc-protocol}.
932 @end defun 932 @end defun
933 933
934 @defun eudc-variable-server-value var [server] 934 @defun eudc-variable-server-value var [server]
935 Return the value of @var{var} local to @var{server}. 935 Return the value of @var{var} local to @var{server}.
936 Return @code{unbound} if @var{var} has no value local to @var{server}. 936 Return @code{unbound} if @var{var} has no value local to @var{server}.
937 @var{server} defaults to @code{eudc-server}. 937 @var{server} defaults to @code{eudc-server}.
938 @end defun 938 @end defun
939 939
940 Changing a protocol-local or server-local value of a variable has no 940 Changing a protocol-local or server-local value of a variable has no
950 950
951 @node Credits, Command and Function Index, Usage, Top 951 @node Credits, Command and Function Index, Usage, Top
952 @comment node-name, next, previous, up 952 @comment node-name, next, previous, up
953 @chapter Credits 953 @chapter Credits
954 954
955 EUDC was written by Oscar Figueiredo based on @file{ph.el} by the 955 EUDC was written by Oscar Figueiredo based on @file{ph.el} by the
956 same author. 956 same author.
957 957
958 Thanks to Soren Dayton for his suggestions, his enthusiasm and his help 958 Thanks to Soren Dayton for his suggestions, his enthusiasm and his help
959 in testing and proofreading the code and docs of @file{ph.el}. 959 in testing and proofreading the code and docs of @file{ph.el}.
960 960