Function: org-persist-read:generic

org-persist-read:generic is a macro defined in org-persist.el.gz.

Signature

(org-persist-read:generic CONTAINER REFERENCE-DATA COLLECTION)

Documentation

Read and return the data stored in CONTAINER.

REFERENCE-DATA is associated with CONTAINER in the persist file. COLLECTION is the plist holding data collection.

Source Code

;; Defined in /usr/src/emacs/lisp/org/org-persist.el.gz
(defmacro org-persist-read:generic (container reference-data collection)
  "Read and return the data stored in CONTAINER.
REFERENCE-DATA is associated with CONTAINER in the persist file.
COLLECTION is the plist holding data collection."
  `(let* ((c (org-persist--normalize-container ,container))
          (read-func-symbol (intern (format "org-persist-read:%s" (car c)))))
     (setf ,collection (plist-put ,collection :last-access (float-time)))
     (setf ,collection (plist-put ,collection :last-access-hr (format-time-string "%FT%T%z" (float-time))))
     (unless (fboundp read-func-symbol)
       (error "org-persist: Read function %s not defined"
              read-func-symbol))
     (funcall read-func-symbol c ,reference-data ,collection)))