emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] org-export-latex-final-hook not working


From: Giacomo M
Subject: [O] org-export-latex-final-hook not working
Date: Fri, 24 Jun 2016 11:01:47 +0200
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1

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)






reply via email to

[Prev in Thread] Current Thread [Next in Thread]