comparison lisp/net/eudc-vars.el @ 32229:108b464ba713

(eudc): Add :version, :link.
author Dave Love <fx@gnu.org>
date Fri, 06 Oct 2000 18:56:44 +0000
parents babfd92e24bf
children 581e16bc15c7
comparison
equal deleted inserted replaced
32228:6a5bae3ed1c1 32229:108b464ba713
27 27
28 (require 'custom) 28 (require 'custom)
29 29
30 ;;{{{ EUDC Main Custom Group 30 ;;{{{ EUDC Main Custom Group
31 31
32 (defgroup eudc nil 32 (defgroup eudc nil
33 "Emacs Unified Directory Client." 33 "Emacs Unified Directory Client."
34 :version "21.1"
35 :link '(info-link "(eudc)")
34 :group 'mail 36 :group 'mail
35 :group 'comm) 37 :group 'comm)
36 38
37 (defcustom eudc-server nil 39 (defcustom eudc-server nil
38 "*The name or IP address of the directory server. 40 "*The name or IP address of the directory server.
53 55
54 (defcustom eudc-protocol nil 56 (defcustom eudc-protocol nil
55 "*The directory protocol to use to query the server. 57 "*The directory protocol to use to query the server.
56 Supported protocols are specified by `eudc-supported-protocols'." 58 Supported protocols are specified by `eudc-supported-protocols'."
57 :type `(choice :menu-tag "Protocol" 59 :type `(choice :menu-tag "Protocol"
58 ,@(mapcar (lambda (s) 60 ,@(mapcar (lambda (s)
59 (list 'const ':tag (symbol-name s) s)) 61 (list 'const ':tag (symbol-name s) s))
60 eudc-known-protocols)) 62 eudc-known-protocols))
61 :group 'eudc) 63 :group 'eudc)
62 64
63 65
73 A value of nil means return the default attributes as configured in the 75 A value of nil means return the default attributes as configured in the
74 server." 76 server."
75 :type '(choice :menu-tag "Return Attributes" 77 :type '(choice :menu-tag "Return Attributes"
76 (const :menu-tag "Server defaults (nil)" nil) 78 (const :menu-tag "Server defaults (nil)" nil)
77 (const :menu-tag "All" all) 79 (const :menu-tag "All" all)
78 (repeat :menu-tag "Attribute list" 80 (repeat :menu-tag "Attribute list"
79 :tag "Attribute name" 81 :tag "Attribute name"
80 :value (nil) 82 :value (nil)
81 (symbol :tag "Attribute name"))) 83 (symbol :tag "Attribute name")))
82 :group 'eudc) 84 :group 'eudc)
83 85
84 (defcustom eudc-multiple-match-handling-method 'select 86 (defcustom eudc-multiple-match-handling-method 'select
85 "*What to do when multiple entries match an inline expansion query. 87 "*What to do when multiple entries match an inline expansion query.
86 Possible values are: 88 Possible values are:
87 `first' (equivalent to nil) which means keep the first match only, 89 `first' (equivalent to nil) which means keep the first match only,
88 `select' pop-up a selection buffer, 90 `select' pop-up a selection buffer,
89 `all' expand to all matches, 91 `all' expand to all matches,
90 `abort' the operation is aborted, an error is signaled." 92 `abort' the operation is aborted, an error is signaled."
91 :type '(choice :menu-tag "Method" 93 :type '(choice :menu-tag "Method"
92 (const :menu-tag "Use First" 94 (const :menu-tag "Use First"
93 :tag "Use First" first) 95 :tag "Use First" first)
94 (const :menu-tag "Select Interactively" 96 (const :menu-tag "Select Interactively"
95 :tag "Select Interactively" select) 97 :tag "Select Interactively" select)
96 (const :menu-tag "Use All" 98 (const :menu-tag "Use All"
97 :tag "Use All" all) 99 :tag "Use All" all)
98 (const :menu-tag "Abort Operation" 100 (const :menu-tag "Abort Operation"
99 :tag "Abort Operation" abort) 101 :tag "Abort Operation" abort)
100 (const :menu-tag "Default (Use First)" 102 (const :menu-tag "Default (Use First)"
101 :tag "Default (Use First)" nil)) 103 :tag "Default (Use First)" nil))
102 :group 'eudc) 104 :group 'eudc)
103 105
104 (defcustom eudc-duplicate-attribute-handling-method '((email . duplicate)) 106 (defcustom eudc-duplicate-attribute-handling-method '((email . duplicate))
105 "*A method to handle entries containing duplicate attributes. 107 "*A method to handle entries containing duplicate attributes.
108 the second form specifies a method applicable to all attributes. 110 the second form specifies a method applicable to all attributes.
109 Available methods are: 111 Available methods are:
110 `list' or nil lets the value of the attribute be a list of values, 112 `list' or nil lets the value of the attribute be a list of values,
111 `first' keeps the first value and discards the others, 113 `first' keeps the first value and discards the others,
112 `concat' concatenates the values into a single multiline string, 114 `concat' concatenates the values into a single multiline string,
113 `duplicate' duplicates the entire entry into as many instances as 115 `duplicate' duplicates the entire entry into as many instances as
114 different values." 116 different values."
115 :type '(choice (const :menu-tag "List" list) 117 :type '(choice (const :menu-tag "List" list)
116 (const :menu-tag "First" first) 118 (const :menu-tag "First" first)
117 (const :menu-tag "Concat" concat) 119 (const :menu-tag "Concat" concat)
118 (const :menu-tag "Duplicate" duplicate) 120 (const :menu-tag "Duplicate" duplicate)
127 (const :menu-tag "First" first) 129 (const :menu-tag "First" first)
128 (const :menu-tag "Concat" concat) 130 (const :menu-tag "Concat" concat)
129 (const :menu-tag "Duplicate" duplicate))))) 131 (const :menu-tag "Duplicate" duplicate)))))
130 :group 'eudc) 132 :group 'eudc)
131 133
132 (defcustom eudc-inline-query-format '((name) 134 (defcustom eudc-inline-query-format '((name)
133 (firstname name)) 135 (firstname name))
134 "*Format of an inline expansion query. 136 "*Format of an inline expansion query.
135 This is a list of FORMATs. A FORMAT is itself a list of one or more 137 This is a list of FORMATs. A FORMAT is itself a list of one or more
136 EUDC attribute names. A FORMAT applies if it contains as many attributes as 138 EUDC attribute names. A FORMAT applies if it contains as many attributes as
137 there are individual words in the inline query string. 139 there are individual words in the inline query string.
138 If several FORMATs apply then they are tried in order until a match 140 If several FORMATs apply then they are tried in order until a match
139 is found. 141 is found.
140 If nil, all the words are mapped onto the default server or protocol 142 If nil, all the words are mapped onto the default server or protocol
141 attribute name. 143 attribute name.
142 144
143 The attribute names in FORMATs are not restricted to EUDC attribute names 145 The attribute names in FORMATs are not restricted to EUDC attribute names
144 but can also be protocol/server specific names. In this case, this variable 146 but can also be protocol/server specific names. In this case, this variable
145 must be set in a protocol/server-local fashion, see `eudc-server-set' and 147 must be set in a protocol/server-local fashion, see `eudc-server-set' and
167 "*A list specifying the format of the expansion of inline queries. 169 "*A list specifying the format of the expansion of inline queries.
168 This variable controls what `eudc-expand-inline' actually inserts in 170 This variable controls what `eudc-expand-inline' actually inserts in
169 the buffer. First element is a string passed to `format'. Remaining 171 the buffer. First element is a string passed to `format'. Remaining
170 elements are symbols indicating attribute names; the corresponding values 172 elements are symbols indicating attribute names; the corresponding values
171 are passed as additional arguments to `format'." 173 are passed as additional arguments to `format'."
172 :type '(list 174 :type '(list
173 (string :tag "Format String") 175 (string :tag "Format String")
174 (repeat :inline t 176 (repeat :inline t
175 :tag "Attributes" 177 :tag "Attributes"
176 (choice 178 (choice
177 :tag "Attribute" 179 :tag "Attribute"
178 (const :menu-tag "First Name" :tag "First Name" firstname) 180 (const :menu-tag "First Name" :tag "First Name" firstname)
179 (const :menu-tag "Surname" :tag "Surname" name) 181 (const :menu-tag "Surname" :tag "Surname" name)
180 (const :menu-tag "Email Address" :tag "Email Address" email) 182 (const :menu-tag "Email Address" :tag "Email Address" email)
181 (const :menu-tag "Phone" :tag "Phone" phone) 183 (const :menu-tag "Phone" :tag "Phone" phone)
186 (defcustom eudc-inline-expansion-servers 'server-then-hotlist 188 (defcustom eudc-inline-expansion-servers 'server-then-hotlist
187 "*Which servers to contact for the expansion of inline queries. 189 "*Which servers to contact for the expansion of inline queries.
188 Possible values are: 190 Possible values are:
189 `current-server': the EUDC current server. 191 `current-server': the EUDC current server.
190 `hotlist': the servers of the hotlist in the order they appear, 192 `hotlist': the servers of the hotlist in the order they appear,
191 `server-then-hotlist': the current server and then the servers of 193 `server-then-hotlist': the current server and then the servers of
192 the hotlist." 194 the hotlist."
193 :type '(choice :tag "Servers" 195 :type '(choice :tag "Servers"
194 :menu-tag "Servers" 196 :menu-tag "Servers"
195 (const :menu-tag "Current server" current-server) 197 (const :menu-tag "Current server" current-server)
196 (const :menu-tag "Servers in the hotlist" hotlist) 198 (const :menu-tag "Servers in the hotlist" hotlist)
213 :group 'eudc) 215 :group 'eudc)
214 216
215 (defcustom eudc-query-form-attributes '(name firstname email phone) 217 (defcustom eudc-query-form-attributes '(name firstname email phone)
216 "*A list of attributes presented in the query form." 218 "*A list of attributes presented in the query form."
217 :tag "Attributes in Query Forms" 219 :tag "Attributes in Query Forms"
218 :type '(repeat 220 :type '(repeat
219 (choice 221 (choice
220 :tag "Attribute" 222 :tag "Attribute"
221 (const :menu-tag "First Name" :tag "First Name" firstname) 223 (const :menu-tag "First Name" :tag "First Name" firstname)
222 (const :menu-tag "Surname" :tag "Surname" name) 224 (const :menu-tag "Surname" :tag "Surname" name)
223 (const :menu-tag "Email Address" :tag "Email Address" email) 225 (const :menu-tag "Email Address" :tag "Email Address" email)
243 (roomnumber . "Office") 245 (roomnumber . "Office")
244 (telephonenumber . "Phone") 246 (telephonenumber . "Phone")
245 (uniqueidentifier . "ID") 247 (uniqueidentifier . "ID")
246 (objectclass . "Object Class")) 248 (objectclass . "Object Class"))
247 "*Alist of user-defined names for directory attributes. 249 "*Alist of user-defined names for directory attributes.
248 These names are used as prompt strings in query/response forms 250 These names are used as prompt strings in query/response forms
249 instead of the raw directory attribute names. 251 instead of the raw directory attribute names.
250 Prompt strings for attributes that are not listed here 252 Prompt strings for attributes that are not listed here
251 are derived by splitting the attribute name 253 are derived by splitting the attribute name
252 at `_' characters and capitalizing the individual words." 254 at `_' characters and capitalizing the individual words."
253 :tag "User-defined Names of Directory Attributes" 255 :tag "User-defined Names of Directory Attributes"
264 :group 'eudc) 266 :group 'eudc)
265 267
266 (defcustom eudc-attribute-display-method-alist nil 268 (defcustom eudc-attribute-display-method-alist nil
267 "*An alist specifying methods to display attribute values. 269 "*An alist specifying methods to display attribute values.
268 Each member of the list is of the form (NAME . FUNC) where NAME is a lowercased 270 Each member of the list is of the form (NAME . FUNC) where NAME is a lowercased
269 string naming a directory attribute (translated according to 271 string naming a directory attribute (translated according to
270 `eudc-user-attribute-names-alist' if `eudc-use-raw-directory-names' is 272 `eudc-user-attribute-names-alist' if `eudc-use-raw-directory-names' is
271 non-nil) and FUNC a function that will be passed the corresponding 273 non-nil) and FUNC a function that will be passed the corresponding
272 attribute values for display." 274 attribute values for display."
273 :tag "Attribute Decoding Functions" 275 :tag "Attribute Decoding Functions"
274 :type '(repeat (cons :tag "Attribute" 276 :type '(repeat (cons :tag "Attribute"
275 (symbol :tag "Name") 277 (symbol :tag "Name")
276 (symbol :tag "Display Function"))) 278 (symbol :tag "Display Function")))
277 :group 'eudc) 279 :group 'eudc)
278 280
279 (defcustom eudc-external-viewers '(("XV" "xv" "-") 281 (defcustom eudc-external-viewers '(("XV" "xv" "-")
280 ("ImageMagick" "display" "-") 282 ("ImageMagick" "display" "-")
281 ("ShowAudio" "showaudio")) 283 ("ShowAudio" "showaudio"))
282 "*A list of viewer program specifications. 284 "*A list of viewer program specifications.
283 Viewers are programs which can be piped a directory attribute value for 285 Viewers are programs which can be piped a directory attribute value for
284 display or arbitrary processing. Each specification is a list whose 286 display or arbitrary processing. Each specification is a list whose
285 first element is a string naming the viewer. The second element is the 287 first element is a string naming the viewer. The second element is the
286 executable program which should be invoked, and following elements are 288 executable program which should be invoked, and following elements are
287 arguments that should be passed to the program." 289 arguments that should be passed to the program."
288 :tag "External Viewer Programs" 290 :tag "External Viewer Programs"
289 :type '(repeat (list :tag "Viewer" 291 :type '(repeat (list :tag "Viewer"
290 (string :tag "Name") 292 (string :tag "Name")
307 309
308 ;;}}} 310 ;;}}}
309 311
310 ;;{{{ PH Custom Group 312 ;;{{{ PH Custom Group
311 313
312 (defgroup eudc-ph nil 314 (defgroup eudc-ph nil
313 "Emacs Unified Directory Client - CCSO PH/QI Backend." 315 "Emacs Unified Directory Client - CCSO PH/QI Backend."
314 :group 'eudc) 316 :group 'eudc)
315 317
316 (defcustom eudc-ph-bbdb-conversion-alist 318 (defcustom eudc-ph-bbdb-conversion-alist
317 '((name . name) 319 '((name . name)
327 of SPECs. Lists of specs are valid only for the `phone' and `address' 329 of SPECs. Lists of specs are valid only for the `phone' and `address'
328 BBDB fields. SPECs are sexps which are evaluated: 330 BBDB fields. SPECs are sexps which are evaluated:
329 a string evaluates to itself, 331 a string evaluates to itself,
330 a symbol evaluates to the symbol value. Symbols naming PH/QI fields 332 a symbol evaluates to the symbol value. Symbols naming PH/QI fields
331 present in the record evaluate to the value of the field in the record, 333 present in the record evaluate to the value of the field in the record,
332 a form is evaluated as a function. The argument list may contain PH/QI 334 a form is evaluated as a function. The argument list may contain PH/QI
333 field names which eval to the corresponding values in the 335 field names which eval to the corresponding values in the
334 record. The form evaluation should return something appropriate for 336 record. The form evaluation should return something appropriate for
335 the particular BBDB-FIELD (see `bbdb-create-internal'). 337 the particular BBDB-FIELD (see `bbdb-create-internal').
336 `eudc-bbdbify-phone' and `eudc-bbdbify-address' are provided as convenience 338 `eudc-bbdbify-phone' and `eudc-bbdbify-address' are provided as convenience
337 functions to parse phones and addresses." 339 functions to parse phones and addresses."
343 345
344 ;;}}} 346 ;;}}}
345 347
346 ;;{{{ LDAP Custom Group 348 ;;{{{ LDAP Custom Group
347 349
348 (defgroup eudc-ldap nil 350 (defgroup eudc-ldap nil
349 "Emacs Unified Directory Client - LDAP Backend." 351 "Emacs Unified Directory Client - LDAP Backend."
350 :group 'eudc) 352 :group 'eudc)
351 353
352 (defcustom eudc-ldap-bbdb-conversion-alist 354 (defcustom eudc-ldap-bbdb-conversion-alist
353 '((name . cn) 355 '((name . cn)
362 of SPECs. Lists of specs are valid only for the `phone' and `address' 364 of SPECs. Lists of specs are valid only for the `phone' and `address'
363 BBDB fields. SPECs are sexps which are evaluated: 365 BBDB fields. SPECs are sexps which are evaluated:
364 a string evaluates to itself, 366 a string evaluates to itself,
365 a symbol evaluates to the symbol value. Symbols naming LDAP attributes 367 a symbol evaluates to the symbol value. Symbols naming LDAP attributes
366 present in the record evaluate to the value of the field in the record, 368 present in the record evaluate to the value of the field in the record,
367 a form is evaluated as a function. The argument list may contain LDAP 369 a form is evaluated as a function. The argument list may contain LDAP
368 field names which eval to the corresponding values in the 370 field names which eval to the corresponding values in the
369 record. The form evaluation should return something appropriate for 371 record. The form evaluation should return something appropriate for
370 the particular BBDB-FIELD (see `bbdb-create-internal'). 372 the particular BBDB-FIELD (see `bbdb-create-internal').
371 `eudc-bbdbify-phone' and `eudc-bbdbify-address' are provided as convenience 373 `eudc-bbdbify-phone' and `eudc-bbdbify-address' are provided as convenience
372 functions to parse phones and addresses." 374 functions to parse phones and addresses."
378 380
379 ;;}}} 381 ;;}}}
380 382
381 ;;{{{ BBDB Custom Group 383 ;;{{{ BBDB Custom Group
382 384
383 (defgroup eudc-bbdb nil 385 (defgroup eudc-bbdb nil
384 "Emacs Unified Directory Client - BBDB Backend." 386 "Emacs Unified Directory Client - BBDB Backend."
385 :group 'eudc) 387 :group 'eudc)
386 388
387 (defcustom eudc-bbdb-use-locations-as-attribute-names t 389 (defcustom eudc-bbdb-use-locations-as-attribute-names t
388 "If non-nil, BBDB address and phone locations are used as attribute names. 390 "If non-nil, BBDB address and phone locations are used as attribute names.