Variable: eudc-inline-expansion-format
eudc-inline-expansion-format is a customizable variable defined in
eudc-vars.el.gz.
Value
nil
Documentation
Specify the format of the expansion of inline queries.
This variable controls what eudc-expand-inline actually inserts
in the buffer. It is either a list, or a function.
When set to a list, the expansion result will be formatted
according to the first element of the list, a string, which is
passed as the first argument to format. The remaining elements
of the list are symbols indicating attribute names; the
corresponding values are passed as additional arguments to
format.
When set to nil, the expansion result will be formatted using
eudc-rfc5322-make-address, and the PHRASE part will be
formatted according to "firstname name", quoting the result if
necessary. No COMMENT will be added in this case.
When set to a function, the expansion result will be formatted
using eudc-rfc5322-make-address, and the referenced function is
used to format the PHRASE, and COMMENT parts, respectively. It
receives a single argument, which is an alist of
protocol-specific attributes describing the recipient. To access
the alist elements using generic EUDC attribute names, such as
for example name, or email, use eudc-translate-query with
REVERSE set to t to transform the received attribute alist. The
function should return a list, which should contain two elements.
If the first element is a string, it will be used as the PHRASE
part, quoting it if necessary. If the second element is a string,
it will be used as the COMMENT part, unless it contains
characters not allowed in the COMMENT part by RFC 5322, in which
case the COMMENT part will be omitted.
This variable was added, or its default value changed, in Emacs 29.1.
Probably introduced at or before Emacs version 25.1.
Source Code
;; Defined in /usr/src/emacs/lisp/net/eudc-vars.el.gz
(defcustom eudc-inline-expansion-format nil
"Specify the format of the expansion of inline queries.
This variable controls what `eudc-expand-inline' actually inserts
in the buffer. It is either a list, or a function.
When set to a list, the expansion result will be formatted
according to the first element of the list, a string, which is
passed as the first argument to `format'. The remaining elements
of the list are symbols indicating attribute names; the
corresponding values are passed as additional arguments to
`format'.
When set to nil, the expansion result will be formatted using
`eudc-rfc5322-make-address', and the PHRASE part will be
formatted according to \"firstname name\", quoting the result if
necessary. No COMMENT will be added in this case.
When set to a function, the expansion result will be formatted
using `eudc-rfc5322-make-address', and the referenced function is
used to format the PHRASE, and COMMENT parts, respectively. It
receives a single argument, which is an alist of
protocol-specific attributes describing the recipient. To access
the alist elements using generic EUDC attribute names, such as
for example name, or email, use `eudc-translate-query' with
REVERSE set to t to transform the received attribute alist. The
function should return a list, which should contain two elements.
If the first element is a string, it will be used as the PHRASE
part, quoting it if necessary. If the second element is a string,
it will be used as the COMMENT part, unless it contains
characters not allowed in the COMMENT part by RFC 5322, in which
case the COMMENT part will be omitted."
:type '(choice (const :tag "RFC 5322 formatted \"first last <address>\"" nil)
(function :tag "RFC 5322 phrase/comment formatting function")
(list :tag "Format string (deprecated)"
(string :tag "Format String")
(repeat :inline t
:tag "Attributes"
(choice
:tag "Attribute"
(const :menu-tag "First Name" :tag "First Name" firstname)
(const :menu-tag "Surname" :tag "Surname" name)
(const :menu-tag "Email Address" :tag "Email Address" email)
(const :menu-tag "Phone" :tag "Phone" phone)
(symbol :menu-tag "Other")
(symbol :tag "Attribute name")))))
:version "29.1")