------------------------------------------------------------------------ If you load `ox-html`, the default value of `org-html-head-include-scripts` is nil, despite the defcustom:
(defcustom org-html-head-include-scripts t ... The reason is that `org-expot-define-backend`, which is called earlier in the file, contains the following line in the options alist: (:html-head-include-scripts nil "html-scripts" org-html-head-include-scripts) and the call apparently binds `org-html-head-include-scripts' to nil, so by the time the defcustom is evaluated, it's too late. I was confused by that, but the description of `defcustom' in the Emacs Lisp Ref manual states: The argument STANDARD is an expression that specifies the standard value for OPTION. Evaluating the ‘defcustom’ form evaluates STANDARD, but does not necessarily bind the option to that value. If OPTION already has a default value, it is left unchanged. If the user has already saved a customization for OPTION, the user’s customized value is installed as the default value. Otherwise, the result of evaluating STANDARD is installed as the default value. I verified that if I move the `defcustom' to before the `org-export-defined-backend' call, everything works as expected. See https://emacs.stackexchange.com/questions/80783/org-mode-export-to-html-onmouseover-highlighting-of-referenced-code-lines for the original question and the analysis. Emacs : GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.38, cairo version 1.17.8) of 2023-12-28 Package: Org mode version 9.7-pre (release_9.6.20-1267-gb0c3c9 @ /home/nick/src/emacs/org/org-mode/lisp/) -- Nick