Hello everyone,

I was hoping I could get some insight on using the
`org-publish-find-title' and `org-publish-find-date' functions.  I am
trying to build an add-on for org-publish and using some org-publish
functions.

Sometimes the function returns the error:
  "org-publish-cache-get: ‘org-publish-cache-get’ called, but no cache present"

I'm not sure if this is a bug or if these functions cannot be used
externally.  I don't fully understand how the cache is being saved/cleared.
Can anyone help me with this?


Code of `org-publish-find-title' in org-publish.el version: 9.6.15

(defun org-publish-find-title (file project)
  "Find the title of FILE in PROJECT."
 (let ((file (org-publish--expand-file-name file project)))
    (or (org-publish-cache-get-file-property file :title nil t)
    (let* ((parsed-title (org-publish-find-property file :title project))
           (title
       (if parsed-title
            ;; Remove property so that the return value is
            ;; cache-able (i.e., it can be `read' back).
            (org-no-properties
             (org-element-interpret-data parsed-title))
          (file-name-nondirectory (file-name-sans-extension file)))))
      (org-publish-cache-set-file-property file :title title)))))

Thanks,

Thomas Ingram
https://taingram.org


Reply via email to