Julien Barnier <[EMAIL PROTECTED]> writes: > Hi, > > I'm currently migrating a bunch of files from Muse to Org (not that > Muse was not a good project, but I'd like to minimize the number of > keyboard shortcuts to remember :-) ). > > One thing that I miss in Org is the ability to dynamically generate > the pramble and postamble during HTML (or LaTeX) export. In muse you > can provide a lisp function that is evaluated per file and which is > able to access file options with muse-publishing-directive. > > Is there a contrib or a method to do such a thing in Org mode ? >
Hi Julien, There is `org-export-preprocess-hook' which is run over your org file before the file is exported (to latex, html, or ascii). ,----`org-export-preprocess-hook' | org-export-preprocess-hook is a variable defined in `org-exp.el'. | Its value is | (org-export-blocks-preprocess) | | | Documentation: | Hook for preprocessing an export buffer. | Pretty much the first thing when exporting is running this hook. `---- If you add a function to this hook it would have access to the parameters set in the org file through the `parameters' alist, see `org-export-preprocess-string' in org-exp.el for more information. As for changing the preamble and postamble, I don't know if these are variables which could simply be overridden (which would be nice), or if you would want to insert these in the buffer inside of #+begin/end_html blocks. If you come up with a generally useful function please be sure to share it. Good luck -- Eric _______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode