annotate man/ph.texi @ 190:e9f9de458416

Added tag r20-3b21 for changeset 489f57a838ef
author cvs
date Mon, 13 Aug 2007 09:57:10 +0200
parents 8eaf7971accc
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
173
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
1 \input texinfo.tex
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
2 @c %**start of header
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
3 @setfilename ph.info
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
4 @settitle ph.el Manual
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
5 @iftex
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
6 @afourpaper
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
7 @end iftex
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
8 @c %**end of header
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
9
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
10 @footnotestyle end
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
11
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
12 @ifinfo
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
13 This file documents ph.el v2.6
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
14
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
15 ph.el is part of GNU Emacs.
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
16
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
17 ph.el is an E-Lisp client interface to the CCSO white pages directory system
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
18 also known as PH/QI
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
19
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
20 Copyright @copyright{} 1997 Free Software Foundation, Inc.
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
21
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
22 Permission is granted to make and distribute verbatim
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
23 copies of this manual provided the copyright notice and
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
24 this permission notice are preserved on all copies.
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
25
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
26 @ignore
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
27 Permission is granted to process this file through TeX
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
28 and print the results, provided the printed document
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
29 carries a copying permission notice identical to this
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
30 one except for the removal of this paragraph (this
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
31 paragraph not being relevant to the printed manual).
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
32 @end ignore
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
33
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
34 Permission is granted to copy and distribute modified
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
35 versions of this manual under the conditions for
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
36 verbatim copying and the terms of the ``GNU General
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
37 Public License'', and provided that the entire
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
38 resulting derived work is distributed under the terms
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
39 of a permission notice identical to this one.
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
40
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
41 Permission is granted to copy and distribute
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
42 translations of this manual into another language,
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
43 under the above conditions for modified versions,
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
44 except that this permission notice may be stated in a
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
45 translation approved by the Free Software Foundation.
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
46 @end ifinfo
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
47
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
48 @titlepage
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
49 @title{ph Manual}
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
50 @subtitle{An Emacs client to the CCSO Nameserver}
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
51 @author by Oscar Figueiredo
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
52 @code{1.3}
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
53
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
54 @page
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
55 @vskip 0pt plus 1fill
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
56 Copyright @copyright{} 1997 Free Software Foundation, Inc.
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
57
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
58 Permission is granted to make and distribute verbatim
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
59 copies of this manual provided the copyright notice and
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
60 this permission notice are preserved on all copies.
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
61
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
62 @ignore
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
63 Permission is granted to process this file through TeX
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
64 and print the results, provided the printed document
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
65 carries a copying permission notice identical to this
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
66 one except for the removal of this paragraph (this
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
67 paragraph not being relevant to the printed manual).
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
68
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
69 @end ignore
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
70
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
71 Permission is granted to copy and distribute modified
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
72 versions of this manual under the conditions for
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
73 verbatim copying and the terms of the ``GNU General
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
74 Public License'', and provided that the entire
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
75 resulting derived work is distributed under the terms
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
76 of a permission notice identical to this one.
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
77
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
78 Permission is granted to copy and distribute
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
79 translations of this manual into another language,
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
80 under the above conditions for modified versions,
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
81 except that this permission notice may be stated in a
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
82 translation approved by the Free Software Foundation.
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
83 @end titlepage
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
84
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
85 @ifinfo
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
86 @node Top, Introduction, (dir), (dir)
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
87 @comment node-name, next, previous, up
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
88
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
89
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
90 This manual documents ph.el v2.6, an E-lisp client interface to the CCSO
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
91 PH/QI directory system.
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
92 @end ifinfo
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
93
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
94 @menu
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
95 * Introduction:: General info about the PH/QI directory system
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
96 * Installation:: How to install the package
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
97 * Usage:: The various usage possibilities explained
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
98 * Credits:: Who's done what
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
99 * Variables Index::
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
100 @end menu
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
101
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
102
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
103
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
104
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
105
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
106 @node Introduction, Installation, Top, Top
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
107 @comment node-name, next, previous, up
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
108 @chapter Introduction
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
109
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
110 The Central Computing Services Office (CCSO) of the University of
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
111 Illinois at Urbana Champaign (UIUC) created and freely distributes a
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
112 directory system that is currently in use in more than 300 organizations
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
113 around the world. The system records information about people such as
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
114 their address, phone number, e-mail, academic information or any other
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
115 details it was configured to.
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
116
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
117 The system consists of two parts: a database server traditionally called
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
118 @code{qi} and a command-line client called
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
119 @code{ph}. @file{ftp://uiarchive.cso.uiuc.edu/pub/packages/ph} is the
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
120 main distribution site.
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
121 @file{http://www.uiuc.edu/cgi-bin/ph/lookup?Query=.} provides a listing
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
122 of the QI servers in activity.
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
123
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
124 @code{ph.el} provides a client interface to this directory system
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
125 letting you:
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
126
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
127 @itemize @bullet
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
128 @item
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
129 query the server through a customizable form
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
130 @item
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
131 expand inline queries in buffers (for instance you can expand a name
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
132 to a mailing address in a mail message buffer)
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
133 @item
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
134 insert server records into your own BBDB database
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
135 (@pxref{Top,,BBDB,bbdb,BBDB Manual})
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
136 @end itemize
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
137
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
138 The original command-line @code{ph} client that comes with the
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
139 @code{ph/qi} distribution provides additional features like the
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
140 possibility to communicate with the server in login mode which makes it
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
141 possible to change records in the database. This is not implemented in
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
142 this e-lisp client.
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
143
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
144 @node Installation, Usage, Introduction, Top
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
145 @comment node-name, next, previous, up
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
146 @chapter Installation
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
147
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
148 If you are using @code{ph} from your GNU Emacs or XEmacs distribution
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
149 you can skip this section.
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
150
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
151 @code{ph} should work right out of the box with XEmacs 19.15 and above.
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
152 It will not work with versions of XEmacs below.
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
153
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
154 @code{ph} will work with Emacs 19.34 provided you have the @code{custom}
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
155 and @code{widget} libraries by Per Abrahmsen installed. You can get them
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
156 from @file{http://www.dina.kvl.dk/~abraham/custom/}
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
157
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
158 When installing @code{ph} yourself you should move @code{ph.el} to a
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
159 proper directory in your @code{load-path} and byte-compile it (see the
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
160 section on byte-compilation in your users manual if you do not know what
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
161 that means). Install @code{ph.info} into a directory where the info
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
162 system can find it or update your @code{Info-default-directory-list}
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
163 variable.
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
164
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
165 Then you can add the following into your @file{.emacs} startup file:
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
166 @lisp
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
167 (require 'ph)
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
168 (eval-after-load
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
169 "message"
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
170 '(define-key message-mode-map [(control ?c) (tab)] 'ph-expand-inline))
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
171 (eval-after-load
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
172 "mail"
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
173 '(define-key mail-mode-map [(control ?c) (tab)] 'ph-expand-inline))
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
174 @end lisp
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
175
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
176 Upon starting a new session you will find a new @code{Ph} sub-menu in the
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
177 @code{Tools} menu that will let you access all the interesting @code{ph}
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
178 functions.
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
179
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
180
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
181
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
182
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
183
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
184
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
185
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
186 @node Usage, Credits, Installation, Top
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
187 @comment node-name, next, previous, up
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
188 @chapter Usage
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
189
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
190 This chapter describes the usage of @code{ph.el}. Most functions are
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
191 available through the @code{Ph} sub-menu of the @code{Tools} sub-menu.
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
192
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
193 @menu
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
194 * Querying QI Servers:: How queries are performed and handled
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
195 * Query Form:: How to use and customize the query form
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
196 * Inline Query Expansion:: How to use and customize inline queries
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
197 * Creating BBDB Records:: How to insert query results into your BBDB
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
198 * The Server Hotlist:: How to use and manage the server hotlist
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
199 @end menu
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
200
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
201
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
202 @node Querying QI Servers, Query Form, Usage, Usage
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
203 @comment node-name, next, previous, up
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
204 @section Querying Servers
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
205
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
206 @code{ph} basic functionality is to let you query a QI server and return
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
207 the results back to you. There are several things you may want to
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
208 customize in this process.
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
209
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
210
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
211 @menu
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
212 * Selecting a Server:: The first thing to do
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
213 * Return Fields:: How to configure query results
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
214 * Handling Duplicate Fields:: What to do when records have duplicate fields
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
215 @end menu
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
216
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
217 @node Selecting a Server, Return Fields, Querying QI Servers, Querying QI Servers
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
218 @subsection Selecting a Server
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
219
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
220 Before doing any query you will need to set the query server, this is
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
221 the name of the host machine running the @code{qi} software. If you do
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
222 not set it in any fashion, @code{ph} will ask you for one when you
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
223 make your first query.
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
224
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
225 @defvar ph-server
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
226 The name or IP address of the CCSO (PH/QI) server. A port number may be
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
227 specified by appending a colon and a number to the name of the
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
228 server. You will not need this unless your server runs on different port
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
229 than the usual 105.
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
230 @end defvar
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
231
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
232 @node Return Fields, Handling Duplicate Fields, Selecting a Server, Querying QI Servers
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
233 @subsection Return Fields
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
234
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
235 @code{qi} servers are configured to return a default set of fields for
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
236 each record matching a query if the query specifies none. The variable
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
237 @code{ph-default-return-fields} controls the return fields you want for
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
238 your queries.
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
239
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
240 @defvar ph-default-return-fields
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
241 A list of the default fields to extract from CCSO entries. If it
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
242 contains @code{all} then all available fields are returned. @code{nil}
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
243 means return the default fields as configured in the server. Default is
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
244 @code{nil}
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
245 @end defvar
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
246
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
247 The server may return several matching records to a query. Some of the
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
248 records may however not contain all the fields you requested. You can
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
249 chose to discard those records.
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
250
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
251 @defopt ph-strict-return-matches
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
252 If non-@code{nil}, entries that do not contain all the requested return
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
253 fields are ignored. Default is @code{t}.
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
254 @end defopt
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
255
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
256 @node Handling Duplicate Fields, , Return Fields, Querying QI Servers
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
257 @subsection Handling Duplicate Fields
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
258
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
259 @code{qi} authorizes records to have different instances of the same
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
260 field. For instance the record of a person may contain several e-mail
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
261 fields containing different e-mail addresses. This is difficult to
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
262 distinguish from fields having multi-line values such as the postal
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
263 address that may contain a line for the street and another one for the
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
264 zip code and city name. In both cases, @code{ph} considers the field be
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
265 duplicated.
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
266
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
267 @code{ph} has several methods to deal with duplicate fields. The
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
268 available methods are:
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
269
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
270 @table @code
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
271 @item list
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
272 Makes a list with the different values of the duplicate field. The
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
273 record keeps only one instance of the field the value of which is a list
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
274 of all the different values. This is the default method that is used to
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
275 handle duplicate fields for which no other method has been specified.
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
276 @item first
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
277 Discards all the duplicate values of the field keeping only the first
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
278 one.
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
279 @item concat
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
280 Concatenates the different values using @code{\n} as a separator. The
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
281 record keeps only one instance of the field the value of which is a
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
282 single multi-line string.
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
283 @item duplicate
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
284 Duplicates the whole record into as many instances as there are different
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
285 values for the field. This is the default for the e-mail field. Thus a
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
286 record containing 3 different e-mail addresses is duplicated into three
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
287 different records each having a single e-mail address. This is
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
288 particularly useful in combination with @code{select} as the method to
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
289 handle multiple matches in inline expansion queries (@pxref{Inline Query
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
290 Expansion}) because you are presented with the 3 addresses in a
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
291 selection buffer
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
292 @end table
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
293
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
294 Because a method may not be applicable to all fields, the variable
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
295 @code{ph-duplicate-fields-handling-method} lets you specify either a
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
296 default method for all fields or a method for each individual field.
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
297
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
298 @defvar ph-duplicate-fields-handling-method
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
299 A method to handle entries containing duplicate fields. This is either
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
300 an alist (@var{field} . @var{method}) or a symbol @var{method}. The
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
301 alist form of the variable associates a method to an individual field,
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
302 the second form specifies a method applicable to all fields. Available
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
303 methods are: @code{list}, @code{first}, @code{concat}, @code{duplicate}
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
304 duplicates the entire entry into as many instances as different values.
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
305 Defaults to @code{list}.
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
306 @end defvar
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
307
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
308
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
309
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
310 @node Query Form, Inline Query Expansion, Querying QI Servers, Usage
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
311 @comment node-name, next, previous, up
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
312 @section Query Form
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
313
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
314 The simplest way to query your directory server is to use the query
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
315 form. You display the query form with the @code{Query Form} menu item or
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
316 by typing @kbd{M-x ph-query-form}. The fields presented in this form are
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
317 defined by the @code{ph-form-fields} variable (unless a non-@code{nil}
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
318 argument is supplied to @code{ph-query-form}).
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
319
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
320 @defvar ph-form-fields
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
321 A list of fields presented in the query form. You can get a list of
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
322 valid field names with the @code{List Valid Field Names} menu item or
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
323 @kbd{M-x ph-get-field-list}. Defaults to @code{name}, @code{email} and
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
324 @code{phone}.
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
325 @end defvar
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
326
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
327 @deffn Command ph-query-form get-fields-from-server
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
328 Display a form to query the CCSO PH/QI Nameserver.
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
329 If given a non-nil argument the function first queries the server
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
330 for the existing fields and displays a corresponding form.
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
331 @end deffn
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
332
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
333 Since the names of the fields may not be explicit enough or adapted to
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
334 be directly displayed as prompt strings in the form, the variable
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
335 @code{ph-fieldname-formstring-alist} lets you define prompt strings for
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
336 the various fields.
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
337
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
338 @defvar ph-fieldname-formstring-alist
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
339 This is an alist mapping CCSO database field names onto prompt strings
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
340 used in query/response forms. Prompt strings for fields that are not in
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
341 this alist are derived by replacing underscores with spaces and
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
342 capitalizing the individual words.
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
343 @end defvar
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
344
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
345 Upon successful completion the command will display a buffer containing
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
346 the results of the query. The fields that are returned for each record
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
347 are controlled by @code{ph-default-return-fields} (@pxref{Return
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
348 Fields})
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
349
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
350 @node Inline Query Expansion, Creating BBDB Records, Query Form, Usage
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
351 @comment node-name, next, previous, up
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
352 @section Inline Query Expansion
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
353
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
354 Instead of using a query form, you may prefer inline expansion. This is
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
355 a powerful method to get completion from your directory server. The most
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
356 common usage is for expanding names to e-mail addresses in mail message
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
357 buffers. The expansion is performed by the command
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
358 @code{ph-expand-inline}. The operation is controlled by the variables
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
359 @code{ph-inline-expansion-format}, @code{ph-inline-query-format-list},
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
360 @code{ph-expanding-overwrites-query} and
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
361 @code{ph-multiple-match-handling-method}
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
362
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
363 @deffn Command ph-expand-inline replace-p
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
364 Query the server and expand the query string before point. The query
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
365 string consists of the buffer substring from the point back to the
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
366 preceding comma, colon or beginning of line. If it consists of more than
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
367 one word the variable @code{ph-inline-query-format-list} controls how
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
368 these are mapped onto CCSO database field names. After querying the
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
369 server for the given string, the expansion specified by
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
370 @code{ph-inline-expansion-format} is inserted in the buffer at point. If
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
371 @var{replace-p} is @code{t} then this expansion replaces the query
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
372 string in the buffer. If @code{ph-expanding-overwrites-query} is
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
373 non-@code{nil} then the meaning of @var{replace-p} is negated.
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
374 @end deffn
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
375
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
376 @defvar ph-inline-query-format-list
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
377 Format of an inline expansion query. If the inline query string
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
378 consists of several words, this list specifies how these individual
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
379 words are associated to CCSO database field names. If @code{nil} all
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
380 the words will be mapped onto the default CCSO database key (generally
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
381 @code{name}). Default is @code{nil}.
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
382 @end defvar
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
383
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
384 @defvar ph-inline-expansion-format
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
385 This variable lets you control what is exactly inserted into the buffer
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
386 upon an inline expansion request. It is a list whose first element is a
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
387 string passed to @code{format}. Remaining elements are symbols
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
388 corresponding to CCSO database field names, corresponding field values
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
389 are passed as additional arguments to format. Default is @code{("%s"
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
390 email)} but you may want to consider a value like @code{("%s <%s>" name
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
391 email)}
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
392 @end defvar
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
393
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
394 @defvar ph-multiple-match-handling-method
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
395 This variable controls what to do when multiple entries match a query
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
396 for an inline expansion. Possible values are:
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
397 @table @code
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
398 @item first
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
399 The first match is considered as being the only one, the others are
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
400 discarded.
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
401 @item select
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
402 A selection buffer pops-up where you can choose a particular match. This
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
403 is the default value of the variable.
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
404 @item all
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
405 The expansion uses all records successively
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
406 @item abort
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
407 An error is signaled. The expansion aborts.
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
408 @end table
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
409
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
410
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
411 Defaults to @code{select}
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
412 @end defvar
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
413
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
414
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
415
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
416 @node Creating BBDB Records, The Server Hotlist, Inline Query Expansion, Usage
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
417 @comment node-name, next, previous, up
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
418 @section Creating BBDB Records
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
419
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
420 With @code{ph}, you can automatically create BBDB records
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
421 (@pxref{Top,,BBDB,bbdb,BBDB Manual}) from records you get from a PH/QI
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
422 server. You do this by moving the point to the appropriate record in a
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
423 query result display buffer and invoking the command
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
424 @code{ph-insert-record-at-point-into-bbdb} with the corresponding
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
425 keyboard binding, @kbd{b} @footnote{This keybinding does not actually
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
426 call @code{ph-insert-record-at-point-into-bbdb} but uses
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
427 @code{ph-try-bbdb-insert} instead.} or with the menu. @code{ph} cannot
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
428 update an existing BBDB record and will signal an error if you try to
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
429 insert a record matching an existing one.
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
430
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
431 Because the CCSO directory system does not enforce a strict record
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
432 format, local installations of the QI server use different names for the
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
433 record fields and have different ways to organize the
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
434 information. Furthermore BBDB has its own record structure that has
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
435 little to do with what is commonly found on QI servers. For these
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
436 reasons the process of converting a record from its QI format to the
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
437 BBDB format is highly customizable.
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
438
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
439 @defvar ph-bbdb-conversion-alist
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
440 This is the variable that lets you customize how BBDB fields map to
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
441 PH/QI records. Its value is an alist of cells of the form
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
442 @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
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
443 environment (standard field names are @code{name}, @code{company}, @code{net}, @code{phone},
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
444 @code{address} and @code{notes}). @var{spec-or-list} is either a single
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
445 mapping specification or a list of mapping specifications. Lists of
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
446 mapping specifications are valid for the @code{phone} and
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
447 @code{address} BBDB fields only. @var{spec}s are actually s-expressions
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
448 which are evaluated as follows:
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
449
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
450 @table @asis
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
451 @item a string
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
452 evaluates to itself
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
453 @item a symbol
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
454 evaluates to the symbol value. Symbols corresponding to PH/QI fields
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
455 present in the record evaluate to the value of the field in the record
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
456 @item a form
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
457 is evaluated as a function. The argument list may contain PH/QI field
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
458 names which evaluate to the corresponding values in the record. The form
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
459 evaluation should return something appropriate for the particular
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
460 @var{bbdb-field} (see @code{bbdb-create-internal}).
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
461 @code{ph-bbdbify-phone} and @code{ph-bbdbify-address} are provided as
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
462 convenience functions to parse phones and addresses.
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
463 @end table
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
464 @end defvar
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
465
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
466 The default value of @code{ph-bbdb-conversion-alist} is:
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
467
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
468 @lisp
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
469 ((name . name)
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
470 (net . email)
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
471 (address . (ph-bbdbify-address address "Address"))
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
472 (phone . ((ph-bbdbify-phone phone "Phone")
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
473 (ph-bbdbify-phone office_phone "Office Phone"))))
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
474 @end lisp
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
475
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
476 This means that:
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
477
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
478 @itemize @bullet
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
479 @item
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
480 the @code{name} field of the BBDB record gets its value
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
481 from the @code{name} field of the PH/QI record
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
482 @item
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
483 the @code{net} field of the BBDB record gets its value
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
484 from the @code{email} field of the PH/QI record
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
485 @item
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
486 the @code{address} field of the BBDB record is obtained by parsing the
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
487 @code{address} field of the PH/QI record with the function
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
488 @code{ph-bbdbify-address}
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
489 @item
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
490 two @code{phone} fields are created (when possible) in the BBDB record.
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
491 The first one has "Phone" for location and its value is obtained by
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
492 parsing the @code{phone} field of the PH/QI record with the function
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
493 @code{ph-bbdbify-phone}. The second one has "Office Phone" for location
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
494 its value is obtained by parsing the @code{office_phone} field of the
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
495 PH/QI record with the function @code{ph-bbdbify-phone}.
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
496 @end itemize
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
497
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
498 @defun ph-bbdbify-phone @var{phone} @var{location}
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
499 This is a convenience function provided for use in
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
500 @code{ph-bbdb-conversion-alist}. It parses @var{phone} into a vector
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
501 compatible with @code{bbdb-create-internal}. @var{phone} is either a string
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
502 supposedly containing a phone number or a list of such strings which are
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
503 concatenated. @var{location} is used as the phone location for BBDB.
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
504 @end defun
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
505
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
506 @defun ph-bbdbify-address @var{addr} @var{location}
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
507 This is a convenience function provided for use in
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
508 @code{ph-bbdb-conversion-alist}. It parses @var{addr} into a vector
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
509 compatible with @code{bbdb-create-internal}. @var{addr} should be an
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
510 address string of no more than four lines or a list of lines. The last
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
511 line is searched for the zip code, city and state name. @var{location}
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
512 is used as the phone location for BBDB.
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
513 @end defun
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
514
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
515 Note that only a subset of the fields you selected with
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
516 @code{ph-default-return-fields} and that are actually displayed may
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
517 actually be inserted as part of the newly created BBDB record.
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
518
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
519
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
520 @node The Server Hotlist, , Creating BBDB Records, Usage
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
521 @comment node-name, next, previous, up
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
522 @section The Server Hotlist
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
523
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
524 @code{ph} lets you maintain a list of frequently used servers so that you
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
525 can easily switch from one to another. This hotlist appears in the
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
526 @code{Server} sub-menu. You select a server in this list by clicking on
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
527 its name. You can add the current server to the list with the command
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
528 @code{ph-bookmark-current-server}. The list is contained in the variable
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
529 @code{ph-server-hotlist} which is stored in and retrieved from the file
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
530 designated by @code{ph-options-file}.
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
531
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
532 @deffn Command ph-bookmark-server server
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
533 Add @var{server} to the hotlist of servers
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
534 @end deffn
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
535
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
536 @deffn Command ph-bookmark-current-server
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
537 Add the current server to the hotlist of servers
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
538 @end deffn
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
539
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
540 @defvar ph-options-file
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
541 The name of a file where @code{ph} stores its internal variables
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
542 (currently only the hotlist is stored there). @code{ph} will try to load
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
543 that file upon initialization so, if you choose a file name
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
544 different from the defaults @file{~/.ph-options}, be sure to set this
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
545 variable to the appropriate value @emph{before} @code{ph} is itself
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
546 loaded.
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
547 @end defvar
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
548
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
549 There is currently no way to remove a server from the list other than
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
550 editing directly the @code{ph-options-file}.
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
551
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
552
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
553
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
554 @node Credits, Variables Index, Usage, Top
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
555 @comment node-name, next, previous, up
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
556 @chapter Credits
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
557
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
558 The original CCSO Nameserver software (@code{ph} & @code{qi}) was
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
559 written at the University of Illinois at Urbana Champaign.
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
560
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
561 The Emacs client @code{ph.el} was written and is maintained by Oscar
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
562 Figueiredo.
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
563
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
564 Thanks to Soren Dayton for his suggestions, his enthusiasm and his help
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
565 in testing and proofreading the code and docs.
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
566
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
567 @node Variables Index, , Credits, Top
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
568 @comment node-name, next, previous, up
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
569 @unnumbered Variables Index
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
570
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
571 @printindex vr
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
572
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
573 @contents
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents:
diff changeset
574 @bye