Я пытаюсь написать экспортный бэкенд для Emacs org-mode. Этот режим является производным от ox-latex.el Exporter. Я хочу, чтобы экспортер вставил все файлы * .css и * .js в итоговый файл .html.
Экспортер работает, но не выдает никаких результатов в моих функциях, потому что это
assoc(t (("readthedocs" ("css" "htmlize.css" "readtheorg.css") ("js" "readtheorg.js" "jquery.js" "bootstrap.js"))))
call (это отладчик) возвращает ноль.
Что мне здесь не хватает?
Любая помощь приветствуется :) Полный код можно найти здесь https://pastebin.com/N475Uk9Z
EDIT:
(defconst org-static-html-themes
'(("readthedocs" . (("css" . ("htmlize.css"
"readtheorg.css"))
("js" . ("readtheorg.js"
"jquery.js"
"bootstrap.js"))))))
(defun org-static-html--build-head (info)
"Return information for the <head>..</head> of the HTML output.
INFO is a plist used as a communication channel."
(progn
(debug)
(org-element-normalize-string
(concat
(org-element-normalize-string (plist-get info :html-head))
(org-element-normalize-string (plist-get info :html-head-extra))
(org-element-normalize-string
(mapconcat (lambda (css)
(org-static-html-inline-css
(concat org-static-html-resource-path "/css/" css)))
(cdr (assoc "css"
(assoc
(plist-get info :static-html-theme)
org-static-html-themes))) "\n"))))))
Предполагается, что эта функция получает все CSS-файлы, связанные с соответствующей темой, и возвращает их, затем объединяет и оборачивает внутри тегов стиля.
Я должен сказать, что я использую Emacs версии 27.0.50.