;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&\210\302\314\304\305\315DD\316\310\311\312\313&\207" [require ebdb-com custom-declare-variable ebdb-snarf-routines funcall function #[0 "\301\302\303\304!\305QD\306BB\207" [ebdb-url-valid-schemes (ebdb-field-mail "[[:blank:]([<\"]*\\([[:alnum:]][^[:space:]\":\n<[]+@[^]:[:space:])>\"\n]+[[:alnum:]]\\)") ebdb-field-url "\\(" regexp-opt "//[^ \n ]+\\)" ((ebdb-field-phone "\\(\\+?[[:digit:]]\\{1,3\\}[ )-.]?[[:digit:] -.()]\\{6,\\}\\)"))] 5] "An alist of EBDB field classes and related regexps.\nEach alist element is an EBDB field class symbol, followed by a\nlist of regular expressions that can be used to produce instances\nof that class when passed to `ebdb-parse'. Each regular\nexpression should contain at least one parenthetical group: the\n`ebdb-parse' method of the class will receive the results of\n(match-string 1)." :group ebdb-snarf :type list ebdb-snarf-name-re #[0 "\300C\207" ["\\(?:[[:upper:]][[:lower:]'-]+[,.[:blank:]]*\\)\\{2,\\}"] 1] "A list of regular expressions matching names.\nThis is a separate option from `ebdb-snarf-routines' because\nsnarfing doesn't search for names separately, only in conjunction\nwith other field types.\n\nRegular expressions in this list should not include parenthetical\ngroups."] 8) #@582 Snarf text and attempt to display/update/create a record from it. If STRING is given, snarf the string. If START and END are given in addition to STRING, assume they are 0-based indices into it. If STRING is nil but START and END are given, assume they are buffer positions, and snarf the region between. If all three arguments are nil, snarf the entire current buffer. If RECORDS is present, it is a list of records that we assume may be relevant to snarfed field data. If RET is non-nil, return the records. Otherwise display them. (fn &optional STRING START END RECS RET) (defalias 'ebdb-snarf #[1280 "\300 \203\301\302 \303 \"\202>\204\203!\203!O\202>\2034\2034\2044\301\"\202>\203<\202>\304 \305\306\307\"!!\204a\211\203[\310\311\312\311\313 C%\202b\314\315!\202b\211\207" [use-region-p buffer-substring-no-properties region-beginning region-end buffer-string ebdb-snarf-query ebdb-snarf-collapse ebdb-snarf-collect ebdb-display-records nil t selected-window message "No snarfable data found"] 13 (#$ . 1722) nil]) #@513 Collect EBDB record information from string STR. This function will find everything that looks like field information, and do its best to organize it into likely groups. If RECORDS is given, it should be a list of records that we think have something to do with the text in the string. This function returns a list of vectors. Each vector contains three elements: a record, a list of name-class instances, and a list of other field instances. Any of the three elements can be nil. (fn STR &optional RECORDS) (defalias 'ebdb-snarf-collect #[513 "\304\205 \305\306\"\307\310\311\312#\313Q\314\310\315 \316#\317Q\304\211\320\321!r\211q\210\322\323\324\325\326!\327\"\330$\216\331\332 \333Q\334 #c\210eb\210\335\304\336#\203{\323\224b\210\323\225\212\337n\203Y\340\323!\202[\341 \336#\205\255\3421\253\343\344\345\323!\304\211\346\307\206t\347\350Q\"\203\206\351\334\336\211$\266\202\202\211\266\202\346\352\206\221\347\353Q\"\203\243\351\334\336\211$\266\205\202\246\266\205\"0\202\255\210\304)\211\203\343\3542\340\211\205\335\211@\211\323H\203\326\355\323H\344\356!#\203\326\357\354\"\210A\266\202\202\270\2620\206\347\360\361\304\"\203\374\211\323H\204\374\211\211\362\362HBI\266\211\203[\211@\211A\211\203S\211@\212\335\336#\203K\3631C\343@\345\362!\"\262\n  \235?\205?\211\330\f\330HBI\266  B\211\262\n0\202G\210\202\f\210\202\f)A\266\202\202\210A\266\202\202\375\210\211\323H\204n\211\362H\204n\211\330H\203t\211 B\262 b\266\202>*\210)\207" [ebdb-snarf-routines ebdb-snarf-name-re case-fold-search mail-citation-prefix-regexp nil mapcar #[257 "\300\301\211#\207" [vector nil] 5 "\n\n(fn R)"] "\\(?:" mapconcat #[257 "\211A@;\203 \211A@\207\300\301A@\302#\207" [mapconcat identity "\\|"] 5 "\n\n(fn R)"] "\\|*" "\\)+" "\\(" identity "\\|" "\\)[-\n ,:]*" generate-new-buffer " *temp*" make-byte-code 0 "\301\300!\205 \302\300!\207" vconcat vector [buffer-name kill-buffer] 2 replace-regexp-in-string "^" "[[:blank:]]+" "" re-search-forward t re-search-backward line-beginning-position point-at-bol (error) ebdb-parse ebdb-field-name match-string-no-properties string-match "[ \n ]+" "\\)\\'" replace-match "\\`\\(?:" "\\)" match ebdb-record-search ebdb-string throw make-vector 3 1 (ebdb-unparseable)] 22 (#$ . 2791)]) #@613 Process INPUT, which is a list of bundled field information. INPUT is probably produced by `ebdb-snarf-collect'. It should be a list of vectors, each with three elements: a single record, a list of name field instances, and a list of other field instances. Any of the three elements can be nil. Compare each bundle against the database, and where possible find existing records that match information in the bundle. Discard redundant fields, or fields that are incompatible with the record they're grouped with. Return the same list of (possibly altered) vectors, usually to `ebdb-snarf-query'. (fn INPUT) (defalias 'ebdb-snarf-collapse #[257 "\302\211\211\203\326\211@\211G\303H\304H\305H\211\302\211\204Z\306\302\211\204'\307 \210\203B\310\311\312\313\314\315\"\316\"\317\320% \"\266\202\202E \266\202\321\322\323  \"\"\"\242\211\262 \203Z \262\203\275\211\203\233\211@\3241\217\325\326!\302\326!B\"\242\205\213\327\326!\330!#?\205\213\211B\211\2620\202\223\210\202\224\210A\266\202\202_\210\211\203\271\211@\327\331\330!#\204\262\211B\262A\266\202\202\235\210\202\303\262\262\315# B\262 \266 A\266\202\202\210\207" [ebdb-db-list ebdb-record-tracker nil 0 1 2 ebdb-search ebdb-load seq-filter make-byte-code 257 "\301\203 \302\300\"\207\303\300\"\207" vconcat vector [object-of-class-p same-class-p] 4 "\n\n(fn R)" mapcar #[257 "\300!\301!D\207" [eieio-object-class-name ebdb-string] 4 "\n\n(fn F)"] append (ebdb-unacceptable-field) ebdb-record-field-slot-query eieio-object-class ebdb-record-search ebdb-string ebdb-field-name] 25 (#$ . 5115)]) #@200 Query the user about handling INPUT. INPUT is a list of vectors of bundled information representing records. Ask about field instances that we haven't been able to handle automatically. (fn INPUT) (defalias 'ebdb-snarf-query #[257 "\301\211\211\211\2036\211@\211G\302H\303H\304H\211\211\204\224\305\306\307\204'\2037\306\310\311\312\313\n\n\"\314#\"\2028\315\"!\203\224\205E\316\317\"\211G\303U\203R\211@A\202b\211\203a\320\321\322\"\"A\202b\301\323\301\324\"\325\326\327\"\330\331\301##\262\203\200\332\"\262\333\334\"\210\333\335\"\210\336\"\210\337!\266\211\203\211\203\332\211@\305\306\340\312!\312!#!\203\315\3411\305\3421\277\343\"00\202\3110\210\202\311\210\202\323\210\202\323\211B\262A\266\202\202\231\210\211\203\f\211@\305\306\344\312!\312!#!\203\377\343\345#\210\346\"\210\202\211B\262A\266\202\202\334\210\333\347\"\210\202#\313#\262\f\301\262\301\262\211\203-\211 B\262 \266A\266\202\202\210\350!\211\203\245\211@\305\306\351\312!\"!\203P\352 \202{\305\306\353\312!\"!\203z\323\301\324\"\331\326\327\"!\333\334\"\210\333\335\"\210\337\336\"!\266\202\202{\301\211\262\203\236\3541\231\343\"\210\346\"\210B\211\2620\202\235\210\202\236\210A\266\202\202:\210\207" [ebdb-default-name-class nil 0 1 2 yes-or-no-p format "Create new record%s? " " for fields %s" mapconcat ebdb-string append "/" "" mapcar #[257 "\300!B\207" [ebdb-string] 3 "\n\n(fn N)"] assoc-string completing-read "Use name: " ebdb-prompt-for-db t make-instance slot-value record-class :name ebdb-read delq run-hook-with-args ebdb-create-hook ebdb-change-hook ebdb-db-add-record ebdb-init-record "Add %s to %s? " (ebdb-unacceptable-field) (ebdb-init-field) ebdb-record-insert-field "Add %s as an aka for %s? " aka ebdb-init-field ebdb-after-change-hook delete-dups "Add %s to existing record? " ebdb-prompt-for-record "Add %s to new record? " (ebdb-unacceptable-field)] 23 (#$ . 6745)]) (provide 'ebdb-snarf)