# Trouble with org-export-before-processing-hook in .emacs

When I eval (add-hook 'org-export-before-processing-hook #'org-update-all-dblocks) in an emacs session, function org-update-all-dblocks seems to be called at the preprocessing stage of export, as expected. However, if i add the hook using the above line in .emacs and -- after restarting my GNU Emacs instance -- I call the LaTeX export function with C-c C-e l o from an org document, I get the error message "Wrong number of arguments: (0 . 0), 1" reported from the run-hook-with-args function. It is as if the org-export-before-processing-hook runs the hooked functions with an argument. Am I even supposed to adapt that variable? Also, how to achieve executing dynamic blocks on export, if what I attempted here is not the way?

• From docstring of org-export-before-processing-hook: Every function in this hook will be called with one argument: the back-end currently used, as a symbol.. You can either check the right backend is used or just wrap this function in a lambda that takes a single argument and doesn't use it. – DoMiNeLa10 Mar 28 '18 at 11:59
• Thanks, I should have looked at the docstring! Shouldn't you repost your comment as an answer? – Mali Remorker Mar 29 '18 at 6:30

Here's the relevant part of docstring for org-export-before-processing-hook: