Next: , Previous: Query Form, Up: Usage

3.3 Display of Query Results

Upon successful completion of a form query, EUDC will display a buffer containing the results of the query.

The fields that are returned for each record are controlled by eudc-default-return-attributes (see Return Attributes).

The display of each individual field can be performed by an arbitrary function which allows specific processing for binary values, such as images or audio samples, as well as values with semantics, such as URLs.

— Variable: eudc-attribute-display-method-alist

An alist specifying methods to display attribute values. Each member of the list is of the form (name . func) where name is a lowercased string naming a directory attribute (translated according to eudc-user-attribute-names-alist if eudc-use-raw-directory-names is non-nil) and func a function that will be passed the corresponding attribute values for display.

This variable has protocol-local definitions (see see Server/Protocol Locals). For instance, it is defined as follows for LDAP:

     (eudc-protocol-set 'eudc-attribute-display-method-alist
                        '(("jpegphoto" . eudc-display-jpeg-inline)
                          ("labeledurl" . eudc-display-url)
                          ("audio" . eudc-display-sound)
                          ("labeledurl" . eudc-display-url)
                          ("url" . eudc-display-url))
                        'ldap)

EUDC provides a set of built-in functions to display binary value types:

— Function: eudc-display-generic-binary data

Display a button for unidentified binary data.

— Function: eudc-display-url url

Display URL and make it clickable.

— Function: eudc-display-sound data

Display a button to play the sound data.

— Function: eudc-display-jpeg-inline data

Display the JPEG data inline at point if possible.

— Function: eudc-display-jpeg-as-button data

Display a button for the JPEG data.

Right-clicking on a binary value button pops up a contextual menu with options to process the value. Among these are saving the attribute value to a file or sending it to an external viewer command. External viewers should expect the value on their standard input and should display it or perform arbitrary processing on it. Messages sent to standard output are discarded. External viewers are listed in the variable eudc-external-viewers which you can customize.

— Variable: eudc-external-viewers

This is a list of viewer program specifications. Each specification is a list whose first element is a string naming the viewer for unique identification, the second element is the executable program which should be invoked and the following elements are arguments that should be passed to the program.