[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] org-export-latex-final-hook not working
From: |
Nicolas Goaziou |
Subject: |
Re: [O] org-export-latex-final-hook not working |
Date: |
Fri, 24 Jun 2016 11:11:44 +0200 |
Hello,
Giacomo M <address@hidden> writes:
> 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?
There is no such thing as `org-export-latex-final-hook'. You may want to
use `org-export-filter-final-output-functions'.
Regards,
--
Nicolas Goaziou