Dear all,
I am using emacs with this configuration file:
#+BEGIN_SRC emacs-lisp
(setq load-path (append (file-expand-wildcards "~/.emacs.d/elpa/*") load-path))
(require 'org)
(require 'org-ref)
(require 'ox-extra)
(ox-extras-activate '(ignore-headlines))
(defun remove-orgmode-latex-labels ()
"Remove labels generated by org-mode"
(interactive)
(let ((case-fold-search nil))
(goto-char 1)
(replace-regexp "\\\\label{sec.*}" "")
)
)
(add-hook 'org-export-latex-final-hook 'remove-orgmode-latex-labels)
#+END_SRC
to load the latest orgmode from melpa and install a hook to remove
unwanted section labels on latex export.
If you open/create any .org file and export it to latex buffer or file,
the hook function is not called. if I visit the buffer and call
remove-orgmode-latex-labels, section labels are removed.
Where is the mistake?
Thanks,
Giacomo
GNU Emacs 24.5.1 (x86_64-w64-mingw32)
Org-mode version 8.3.4 (8.3.4-47-gaf853d-elpa)