;ELC ;;; Compiled ;;; in Emacs version 26.3 ;;; with all optimizations. ;;; This file uses dynamic docstrings, first added in Emacs 19.29. ;;; This file does not contain utf-8 non-ASCII characters, ;;; and so can be loaded in Emacs versions earlier than 23. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (byte-code "\300\301!\210\302\303\304\305\306DD\307\310\311\312\313&\207" [require ebdb custom-declare-variable ebdb-format-buffer-name funcall function #[0 "\300\207" [#1="*EBDB Format*"] 1 #1#] "Default name of buffer in which to display formatted records." :type string :group ebdb-record-display] 8) #@51 Variable for holding all instantiated formatters. (defvar ebdb-formatter-tracker nil (#$ . 713)) (byte-code "\300\301\302\303!\"\210\300\304\305\303!\"\210\300\306\304\"\210\307\306\310\311#\210\312\303\313\304#\314\303\315\316\317$\207" [defalias ebdb-formatter-p eieio-make-class-predicate ebdb-formatter ebdb-formatter--eieio-childp eieio-make-child-predicate ebdb-formatter-child-p make-obsolete "use (cl-typep ... \\='ebdb-formatter) instead" "25.1" define-symbol-prop cl-deftype-satisfies eieio-defclass-internal (eieio-instance-tracker) ((label :initarg :label :type string :initform "") (tracking-symbol :initform ebdb-formatter-tracker) (format-buffer-name :initarg :format-buffer-name :type string :initform `,ebdb-format-buffer-name) (coding-system :type symbol :initarg :coding-system :initform `,buffer-file-coding-system :documentation "The coding system for the formatted\n file/buffer/stream.") (post-format-function :type (or null function) :initarg :post-format-function :initform nil :documentation "A function to be called after formatting is\n complete. Probably a major mode.")) (:abstract t :documentation "Abstract base class for EBDB formatters.\n Subclass this to produce real formatters.")] 6) #@72 You cannot create a new object of type `ebdb-formatter'. (fn &rest _) (defalias 'ebdb-formatter #[128 "\300\301!\207" [error "Class ebdb-formatter is abstract"] 3 (#$ . 1948)]) (byte-code "\300\301\302\303!\"\210\300\304\305\303!\"\210\300\306\304\"\210\307\306\310\311#\210\312\303\313\304#\314\303\315\316\317$\207" [defalias ebdb-formatter-freeform-p eieio-make-class-predicate ebdb-formatter-freeform ebdb-formatter-freeform--eieio-childp eieio-make-child-predicate ebdb-formatter-freeform-child-p make-obsolete "use (cl-typep ... \\='ebdb-formatter-freeform) instead" "25.1" define-symbol-prop cl-deftype-satisfies eieio-defclass-internal (ebdb-formatter) ((include :type list :initarg :include :initform nil :documentation "A list of field classes to include.") (exclude :type list :initarg :exclude :initform nil :documentation "A list of field classes to exclude. This\n slot is only honored if \"include\" is nil.") (sort :type list :initarg :sort :initform '(ebdb-field-mail ebdb-field-phone ebdb-field-address "_" ebdb-field-notes) :documentation "How field instances should be sorted. Field\n classes should be listed in their proper sort order. A \"_\"\n placeholder indicates where all other fields should go.") (combine :type list :initarg :combine :initform nil :documentation "A list of field classes which should be\n output with all instances grouped together.") (collapse :type list :initarg :collapse :initform nil :documentation "A list of field classes which should be\n \"collapsed\". What this means is up to the formatter, but it\n generally indicates that most of the field contents will\n hidden unless the user takes some action, such as clicking or\n hitting . (Currently unimplemented.)") (header :type list :initarg :header :initform '((ebdb-record-person ebdb-field-role ebdb-field-image) (ebdb-record-organization ebdb-field-domain ebdb-field-image)) :documentation "A list of field classes which will be output\n in the header of the record, grouped by record class type.")) (:abstract t :documentation "An abstract formatter for formats that can\n accept variable numbers and types of fields.")] 6) #@81 You cannot create a new object of type `ebdb-formatter-freeform'. (fn &rest _) (defalias 'ebdb-formatter-freeform #[128 "\300\301!\207" [error "Class ebdb-formatter-freeform is abstract"] 3 (#$ . 4127)]) (byte-code "\300\301\302\303!\"\210\300\304\305\303!\"\210\300\306\304\"\210\307\306\310\311#\210\312\303\313\304#\314\303\315\316\317$\207" [defalias ebdb-formatter-constrained-p eieio-make-class-predicate ebdb-formatter-constrained ebdb-formatter-constrained--eieio-childp eieio-make-child-predicate ebdb-formatter-constrained-child-p make-obsolete "use (cl-typep ... \\='ebdb-formatter-constrained) instead" "25.1" define-symbol-prop cl-deftype-satisfies eieio-defclass-internal (ebdb-formatter) ((fields :type list :initarg :fields :initform nil :documentation "A list of the record fields to output.\n Fields will be output in the order listed.") (field-missing :type (or string symbol function) :initarg :field-missing :initform "none" :documentation "How to handle missing fields. Can be a\n string, which will be inserted in place of the missing field,\n a symbol, which will be raised as an error symbol, or a\n function, which will be called with three arguments: the\n formatter, the record, and the field spec.")) (:abstract t :documentation "An abstract formatter for formats that require\n an exact specification of fields.")] 6) #@84 You cannot create a new object of type `ebdb-formatter-constrained'. (fn &rest _) (defalias 'ebdb-formatter-constrained #[128 "\300\301!\207" [error "Class ebdb-formatter-constrained is abstract"] 3 (#$ . 5499)]) (byte-code "\300\301\302\303!\"\210\300\304\305\303!\"\210\300\306\304\"\210\307\306\310\311#\210\312\303\313\304#\314\303\315\316\317$\207" [defalias ebdb-formatter-tabular-p eieio-make-class-predicate ebdb-formatter-tabular ebdb-formatter-tabular--eieio-childp eieio-make-child-predicate ebdb-formatter-tabular-child-p make-obsolete "use (cl-typep ... \\='ebdb-formatter-tabular) instead" "25.1" define-symbol-prop cl-deftype-satisfies eieio-defclass-internal (ebdb-formatter-constrained) ((record-separator :type (or string character) :initarg :record-separator :initform "") (field-separator :type (or string character) :initarg :field-separator :initform "")) (:documentation "A formatter for outputting records in tabular\n format.")] 6) #@79 Create a new object of class type `ebdb-formatter-tabular'. (fn &rest SLOTS) (defalias 'ebdb-formatter-tabular #[128 "\300\301\302#\207" [apply make-instance ebdb-formatter-tabular] 5 (#$ . 6466)]) (byte-code "\300\301\302\303#\300\207" [function-put ebdb-formatter-tabular compiler-macro ebdb-formatter-tabular--anon-cmacro] 4) #@26 (fn WHOLE &rest SLOTS) (defalias 'ebdb-formatter-tabular--anon-cmacro #[385 "\211@;\204\207\300\301\302@@#@\303@DABB\"\207" [macroexp--warn-and-return format "Obsolete name arg %S to constructor %S" identity] 7 (#$ . 6803)]) (byte-code "\300\301\302\303\302\304%\210\305\306\307\306\310\302#\311#\210\305\312\307\312\313\302#\314#\210\305\315\307\315\316\302#\317#\210\305\320\307\320\321\302#\322#\210\305\323\307\323\324\302#\325#\210\305\326\307\326\327\302#\330#\210\305\331\307\331\332\302#\333#\210\305\334\307\334\335\302#\336#\210\305\337\307\337\340\302#\341#\210\305\342\307\342\343\302#\344#\210\300\306\302\345\302\346%\210\300\312\302\347\302\350%\210\300\342\302\351\302\352%\210\300\342\302\353\302\354%\210\300\342\302\355\302\356%\210\300\342\302\357\302\360%\210\300\337\302\361\302\362%\210\300\337\302\363\302\364%\210\300\337\302\365\302\366%\210\300\337\302\367\302\370%\210\300\323\302\371\302\372%\210\300\323\302\373\302\374%\210\300\331\302\375\302\376%\210\300\326\302\377\302\201@%\210\300\323\302\201A\201B\201C%\210\300\323\302\201D\201B\201E%\210\300\331\302\201F\302\201G%\210\300\326\302\201H\302\201I%\210\300\315\302\201J\302\201K%\210\300\315\302\201L\302\201M%\210\300\306\302\201N\302\201O%\210\300\334\302\201P\302\201Q%\210\305\201R\201S\201T!\"\210\305\201U\201V\201T!\"\210\305\201W\201U\"\210\201X\201W\201Y\201Z#\210\201[\201T\201\\\201U#\201]\201T\201^\201_\302$\207" [cl-generic-define-method ebdb-string nil ((fmt ebdb-formatter)) #[257 "\300\301\"\207" [slot-value label] 4 "\n\n(fn FMT)"] defalias ebdb-fmt-header cl-generic-define (fmt records) "Insert a string at the beginning of the list of records.\n\n(fn FMT RECORDS)" ebdb-fmt-footer (fmt records) "Insert a string at the end of the list of records.\n\n(fn FMT RECORDS)" ebdb-fmt-record (fmt record) "Handle the insertion of formatted RECORD.\nThis method collects all the fields for RECORD, splits them into\nheader and body fields, and then calls `ebdb-fmt-record-header'\nand `ebdb-fmt-compose-fields'.\n\n(fn FMT RECORD)" ebdb-fmt-record-header (fmt record fields) "Format a header for RECORD, using fields in FIELDS.\n\n(fn FMT RECORD FIELDS)" ebdb-fmt-collect-fields (fmt record &optional fields) "Return a list of RECORD's FIELDS to be formatted.\n\n(fn FMT RECORD &optional FIELDS)" ebdb-fmt-process-fields (fmt record &optional fields) "Process the FIELDS belonging to RECORD.\nThis means grouping them into lists containing various formatting\ninformation, mostly drawn from FMT's `combine' and `collapse'\nslots.\n\n(fn FMT RECORD &optional FIELDS)" ebdb-fmt-sort-fields (fmt record &optional fields) "Sort FIELDS belonging to RECORD according to FMT.\n\n(fn FMT RECORD &optional FIELDS)" ebdb-fmt-compose-fields (fmt object &optional field-list depth) "Compose the lists produced by `ebdb-fmt-process-fields'.\nThe lists of class instances and formatting information are\nturned into indented strings, and the entire block is returned as\na single string value. Optional argument DEPTH is used when\nrecursively composing subfields of fields.\n\n(fn FMT OBJECT &optional FIELD-LIST DEPTH)" ebdb-fmt-field (fmt field style record) "Format FIELD value of RECORD.\nThis method only returns the string value of FIELD itself,\npossibly with text properties attached.\n\n(fn FMT FIELD STYLE RECORD)" ebdb-fmt-field-label (fmt field-or-class style &optional record) "Format a field label, using formatter FMT.\nFIELD-OR-CLASS is a field class or a field instance, and STYLE is\na symbol indicating a style of some sort, such as 'compact or\n'expanded.\n\n(fn FMT FIELD-OR-CLASS STYLE &optional RECORD)" (_fmt _records) #[514 "\300\207" [#1=""] 3 "\n\n(fn FMT RECORDS)"] (_fmt _records) #[514 "\300\207" [#1#] 3 "\n\n(fn FMT RECORDS)"] ((_fmt ebdb-formatter) (cls (subclass ebdb-field)) _style &optional (_record ebdb-record)) #[899 "\211\203 \211A\262\242\202\203\301\302\303\304G\\D\"\210\305!\207" [ebdb-record signal wrong-number-of-arguments nil 4 ebdb-field-readable-name] 10 "\n\n(fn FMT CLS STYLE &optional (_RECORD ebdb-record))"] ((_fmt ebdb-formatter) (field ebdb-field) _style &optional (_record ebdb-record)) #[899 "\211\203 \211A\262\242\202\203\301\302\303\304G\\D\"\210\305!\207" [ebdb-record signal wrong-number-of-arguments nil 4 ebdb-field-readable-name] 10 "\n\n(fn FMT FIELD STYLE &optional (_RECORD ebdb-record))"] ((_fmt ebdb-formatter) (field ebdb-field-labeled) _style &optional (_record ebdb-record)) #[899 "\211\203 \211A\262\242\202\203\301\302\303\304G\\D\"\210\305!\207" [ebdb-record signal wrong-number-of-arguments nil 4 ebdb-field-label] 10 "\n\n(fn FMT FIELD STYLE &optional (_RECORD ebdb-record))"] ((_fmt ebdb-formatter) (field ebdb-field-labeled) (_style (eql compact)) &optional (_record ebdb-record)) #[899 "\211\203 \211A\262\242\202\203\301\302\303\304G\\D\"\210\305!\207" [ebdb-record signal wrong-number-of-arguments nil 4 ebdb-field-readable-name] 10 "\n\n(fn FMT FIELD STYLE &optional (_RECORD ebdb-record))"] ((fmt ebdb-formatter) (field ebdb-field-labeled) (_style (eql compact)) (record ebdb-record)) #[1028 "\300\301\302!\303\304$#\207" [format "(%s) %s" ebdb-field-label ebdb-fmt-field oneline] 12 "\n\n(fn FMT FIELD STYLE RECORD)"] ((_fmt ebdb-formatter) (field ebdb-field) (_style (eql oneline)) (_record ebdb-record)) #[1028 "\300\301!\302\"@\207" [split-string ebdb-string "\n"] 7 "\n\n(fn FMT FIELD STYLE RECORD)"] ((fmt ebdb-formatter) (field ebdb-field) (_style (eql collapse)) (record ebdb-record)) #[1028 "\300\301$\207" [ebdb-fmt-field oneline] 9 "For now, treat collapse the same as oneline.\n\n(fn FMT FIELD STYLE RECORD)"] ((_fmt ebdb-formatter) (field ebdb-field) _style (_record ebdb-record)) #[1028 "\300!\207" [ebdb-string] 6 "The base implementation for FIELD simply returns the value of\n `ebdb-string'.\n\n(fn FMT FIELD STYLE RECORD)"] ((fmt ebdb-formatter-freeform) (record ebdb-record) &optional field-list) #[770 "\300\301\302\303\304\305\306\307#\"\"\"\310\311\312\313\314\315!\316\"\317\320%\"\262\207" [append mapcar cdr seq-remove #[257 "\300@\301\"\206 \211A?\207" [eql name] 4 "\n\n(fn ELT)"] ebdb-record-current-fields nil t seq-filter make-byte-code 257 "\301\300\302\"\203\303\301\300\302\"\"\207\303\301\300\304\"\"?\207" vconcat vector [slot-value include ebdb-foo-in-list-p exclude] 6 "\n\n(fn F)"] 13 "Collect all fields of RECORD, and filter according to FMT.\nReturns RECORD's field as a simple list.\n\n(fn FMT RECORD &optional FIELD-LIST)"] ((fmt ebdb-formatter-constrained) (record ebdb-record)) #[514 "\300\301\"\300\302\"\303G\304\"\211G\305\211W\2035\211\306 \n8\"\206+8BI\266\211T\262\202\266\207" [slot-value fields field-missing make-vector nil 0 ebdb-record-field] 14 "Collect RECORD's fields according to FMT's `fields' slot.\nReturn as a vector of field instances, with nil in place of\nmissing fields.\n\n(fn FMT RECORD)"] ((_fmt ebdb-formatter-constrained) (_record ebdb-record) &optional fields) #[770 "\207" #2=[] 4 "Don't sort by default.\n\n(fn FMT RECORD &optional FIELDS)"] ((_fmt ebdb-formatter-constrained) (_record ebdb-record) &optional fields) #[770 "\207" #2# 4 "Process fields for the \"constrained\" formatter class.\nAt present, just makes sure that multiple field instances are\ncombined into a single string.\n\n(fn FMT RECORD &optional FIELDS)"] ((fmt ebdb-formatter-freeform) (record ebdb-record-organization) &optional field-list) t #[1027 "\301\302\303!\"\"#\207" [ebdb-org-hashtable append gethash ebdb-record-uuid] 12 "\n\n(fn CL--CNM FMT RECORD &optional FIELD-LIST)"] ((fmt ebdb-formatter-freeform) (record ebdb-record-person) &optional field-list) #[1027 "\301\302\303\304\305\n!\"\"\"#\207" [ebdb-relation-hashtable append mapcar cdr gethash ebdb-record-uuid] 14 "\n\n(fn CL--CNM FMT RECORD &optional FIELD-LIST)"] ((fmt ebdb-formatter-freeform) (_record ebdb-record) field-list) #[771 "\300\301\"\302\303\"\206 \211G\304\305\"\203*\306\307\310\311\312\313\"\314\"\315\316%\317#\262\207" [slot-value sort seq-position "_" seq-sort ebdb-field-compare seq-sort-by make-byte-code 257 "\302\300\303!\"\206\n\301\207" vconcat vector [seq-position eieio-object-class-name] 5 "\n\n(fn F)" <] 14 "Sort FIELD-LIST using sort order from FMT.\nFirst sorts all fields with `ebdb-field-compare', then sorts\nagain by the order of each field's class symbol in the 'sort\nslot of FMT.\n\n(fn FMT RECORD FIELD-LIST)"] ((fmt ebdb-formatter-freeform) (_record ebdb-record) field-list) #[771 "\300\211\211\301\302\"\203h\211A\262\242\211\262\203a\303\301\302\"\"\204)B\262\202 B\262\203L\304@\305!\"\203L\211A\262\242\211\262B\262\202.\306\307!B\310\311\237BEB\262\300\262\202 \237\262\300\262\211\203\245\211@\211<\203}\211B\262\202\236\306\307!B\311CB\312\303\301\313\"\"\203\226\313\202\227\314BEB\262A\266\202\202i\210\237\262\207" [nil slot-value combine ebdb-foo-in-list-p same-class-p eieio-object-class class eieio-object-class-name (style . compact) inst style collapse normal] 17 "Process FIELD-LIST for FMT.\nAt present that means handling the combine and collapse slots of\nFMT.\n\nThis method assumes that fields in FIELD-LIST have already been\ngrouped by field class.\n\nThe return value is a list of alists. Each alist has three keys:\n'class, holding a class symbol, 'style, holding either the symbol\n`collapse' or the symbol `normal', and 'inst, a list of all the\ninstances in this bundle. The `combine' style works by putting\nmultiple instances in a single alist.\n\n(fn FMT RECORD FIELD-LIST)"] ((fmt ebdb-formatter-freeform) (record ebdb-record)) #[514 "\300\301!\302\303\"\"A\304\305\306\307\310\311!\312\"\313\314%\315\316\317  \"##\"\320\321\"\320\322\"\211\323#\324  \325$P\266\202\207" [assoc eieio-object-class-name slot-value header seq-group-by make-byte-code 257 "\301\302\303\"\300\"\203\f\304\207\305\207" vconcat vector [ebdb-foo-in-list-p alist-get class header-fields body-fields] 5 "\n\n(fn F)" ebdb-fmt-process-fields ebdb-fmt-sort-fields ebdb-fmt-collect-fields map-elt header-fields body-fields ebdb-fmt-record-header ebdb-fmt-compose-fields 1] 14 "\n\n(fn FMT RECORD)"] ((fmt ebdb-formatter-tabular) (rec ebdb-record)) #[514 "\300\301\302\"##\303\304\"\305#P\207" [ebdb-fmt-process-fields ebdb-fmt-sort-fields ebdb-fmt-collect-fields slot-value record-separator ebdb-fmt-compose-fields] 11 "\n\n(fn FMT REC)"] ((fmt ebdb-formatter-tabular) _records) #[514 "\300\301\302\"\303\304\305\306\307\310\n!\311\"\312\313%\301\314\"\301\302\"#Q\207" ["Name" slot-value field-separator mapconcat make-byte-code 257 "\211;\203\207\301!\204\302!\203\303\300\304#\207\2119\205 \305!\207" vconcat vector [class-p eieio-object-p ebdb-fmt-field-label normal symbol-name] 5 "\n\n(fn F)" fields] 12 "\n\n(fn FMT RECORDS)"] ((fmt ebdb-formatter-tabular) (rec ebdb-record) &optional field-list _depth) #[1026 "\301\302\"\303!>\204\304\305\306D\"\210\211\307H\262\301\310\"\311\312\313\314\315\316\f\f\"\317\"\320\321%\301\310\"#Q\207" [cl-struct-ebdb-record-cache-tags slot-value cache type-of signal wrong-type-argument ebdb-record-cache 1 field-separator mapconcat make-byte-code 257 "\302!\203 \303\300\304\301$\207\211:\205I\211@A\211;\203\"\211\211\262\202G\2119\2034\211\305\301D\"\266\202\202G\306!\203F\211\300\301#\266\202\202G\307\266\202\207" vconcat vector [eieio-object-p ebdb-fmt-field compact signal functionp nil] 9 "\n\n(fn F)"] 15 "\n\n(fn FMT REC &optional FIELD-LIST DEPTH)"] ebdb-formatter-csv-p eieio-make-class-predicate ebdb-formatter-csv ebdb-formatter-csv--eieio-childp eieio-make-child-predicate ebdb-formatter-csv-child-p make-obsolete "use (cl-typep ... \\='ebdb-formatter-csv) instead" "25.1" define-symbol-prop cl-deftype-satisfies eieio-defclass-internal (ebdb-formatter-tabular) ((record-separator :initform "\n") (field-separator :initform ",") (post-format-function :initform (lambda nil (when (fboundp 'csv-mode) (csv-mode)))))] 6) #@75 Create a new object of class type `ebdb-formatter-csv'. (fn &rest SLOTS) (defalias 'ebdb-formatter-csv #[128 "\300\301\302#\207" [apply make-instance ebdb-formatter-csv] 5 (#$ . 18939)]) (byte-code "\300\301\302\303#\300\207" [function-put ebdb-formatter-csv compiler-macro ebdb-formatter-csv--anon-cmacro] 4) #@26 (fn WHOLE &rest SLOTS) (defalias 'ebdb-formatter-csv--anon-cmacro #[385 "\211@;\204\207\300\301\302@@#@\303@DABB\"\207" [macroexp--warn-and-return format "Obsolete name arg %S to constructor %S" identity] 7 (#$ . 19257)]) (byte-code "\300\301\302\303\304\305%\210\300\306\302\307\304\310%\210\311\312\313\314\315DD\316\317\320\321\322&\207" [cl-generic-define-method ebdb-fmt-field nil ((fmt ebdb-formatter-csv) (_field ebdb-field) _style (_rec ebdb-record)) t #[1285 "\301\302\" ;\203\"\303\304\305#)\266\203\203\"\306\307\"\202#\211\207" [inhibit-changing-match-data slot-value field-separator nil t string-match format "\"%s\""] 14 "Quote field strings containing the separator.\n\n(fn CL--CNM FMT FIELD STYLE REC)"] ebdb-fmt-header ((_fmt ebdb-formatter-csv) _records) #[771 " \300P\207" ["\n"] 5 "\n\n(fn CL--CNM FMT RECORDS)"] custom-declare-variable ebdb-default-csv-formatter funcall function #[0 "\300\301\302\303\304\305%\207" [make-instance ebdb-formatter-csv :label "csv" :fields (mail-primary)] 6] "Default CSV formatter." :group ebdb :type ebdb-formatter-csv] 8) (defalias 'ebdb-prompt-for-formatter #[0 "\301\302\"\303\304\305\"\"A\207" [ebdb-formatter-tracker mapcar #[257 "\300\301\"B\207" [slot-value label] 4 "\n\n(fn FORMATTER)"] assoc completing-read "Use formatter: "] 5 nil nil]) (provide 'ebdb-format)