I suspect that the recent changes in how Emacs runs initialisation may
well expose a few edge cases for the customise interface. The custimise
interface is fairly basic and makes a few assumptions which may not hold
once you start altering the order of initialisation and package
loading. While it all works fine 80% of the time, it may fail for more
complex situations and the reality is, Org is large and complex.

Strictly speaking, I don't think it is a bug. The problem is getting the
right balance of what to load and what to leave for the user to decide
to load. If you never use beamer, then having all the beamer stuff
loaded by default is only going to slow down start up (though I do think
people are way too obsessed with startup time these days! I start emacs
about once per week and only that often because I shutdown my laptop on
the weekend when I leave work!). If beamer is not loaded when you
customise org-latex-classes, then it won't be in the variable and if it
isn't in the variable, it cannot be saved into the custom block. If you
then later decide to load it and it is loaded before your customisation
is loaded, then the value it adds to org-latex-classes is lost. If on
the other hand we 'hard code' it into the variable so it doesn't depend
on whether ox-beamer is loaded, then a definition will exist which won't
work when the user tries to use it as ox-beamer is not
loaded. Previously, I think custom blocks were loaded at the start of
your init, so before org was loaded, so this was less of an issue. No
with the early init stuff, things are not quite the same (a lot of guess
work here!).

Tim

Uwe Brauer <o...@mat.ucm.es> writes:

>>>> "Tim" == Tim Cross <theophil...@gmail.com> writes:
>
>    > Just a shot in the dark here .....
>
>    > You mentioned you used custom to modify the org-latex-classes
>    > variable. Does the code in the custom 'block' of your init file have
>    > beamer as one of the classes? 
>
> No it does not and this turns out a problem, also I thought the
> ox-beamer code contains a add-to-list which should do add beamer, but it
> seems not to do it.
>
>
>    > My suspicion is that when you added your exam class, for some
>    > reason, beamer had not been loaded and was not yet in the variable
>    > definition. When you edited it to add your exam class it has saved
>    > a version without beamer as a class.
>
>    > When you start emacs, with the new init and run order, the code
>
>    >> (unless (assoc "beamer" org-latex-classes)
>    >> (add-to-list 'org-latex-classes
>    >> '("beamer"
>    >> "\\documentclass[presentation]{beamer}"
>    >> ("\\section{%s}" . "\\section*{%s}")
>    >> ("\\subsection{%s}" . "\\subsection*{%s}")
>    >> ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))))
>
>    > is executed and beamer is added, but then your custom settings are
>    > evaluated and the variable is reset with the version you added the exam
>    > class to, which has no beamer entry, is used to reset the variable and
>    > the beamer setting is lost.
>
>
> What you say makes send but this seems to defy the whole idea of custom!
>
>
>    > I would start by deleting the org-latex-classes customization and try
>    > adding it again to see if that fixes the problem. This is one reason I
>    > rarely use customise - I prefer to have the code in my own init file so
>    > that I can see exactly when everything is run.
>
> Thanks! I will do that and you are very right about custom, it is very
> convenient but buggier than I thought.
>
> Uwe 


-- 
Tim Cross

Reply via email to