[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] ERT test for checking HTML export: void-variable org-export-filt
From: |
Sebastien Vauban |
Subject: |
Re: [O] ERT test for checking HTML export: void-variable org-export-filters-alist |
Date: |
Fri, 30 Jan 2015 15:54:47 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.4 (windows-nt) |
Hello,
Sebastien Vauban wrote:
> Here is my code to do so:
>
> (require 'ox)
>
> (defun compare-org-html-export-files (orgfile)
> "Compare current export of ORGFILE with HTML file already present on disk."
> (let* ((base-name
> (concat (file-name-directory orgfile) (file-name-base orgfile)))
> (htmlfile (concat base-name ".html"))
> htmlcontents)
> (should
> (equal
> ;; new export
> (with-temp-buffer
> (insert-file-contents orgfile)
> (setq htmlcontents (org-export-as 'html))
> (delete-region (point-min) (point-max))
> (insert htmlcontents)
> (buffer-string))
> ;; old export
> (with-temp-buffer
> (insert-file-contents htmlfile)
> (buffer-string))))))
>
> Any idea why the variable `org-export-filters-alist' is said to be void,
> while I explicitly load both `ox' (where it's defined) and `ox-html'?
And adding the require of `ox' and/or `ox-html' inside the test (or the
defun `compare-org-html-export-files') does not change anything.
Best regards,
Seb
--
Sebastien Vauban