From mboxrd@z Thu Jan 1 00:00:00 1970 From: Giacomo M Subject: org-export-latex-final-hook not working Date: Fri, 24 Jun 2016 11:01:47 +0200 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48157) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bGMzq-0000KI-K9 for emacs-orgmode@gnu.org; Fri, 24 Jun 2016 05:01:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bGMzl-0006cL-Ix for emacs-orgmode@gnu.org; Fri, 24 Jun 2016 05:01:54 -0400 Received: from mail-wm0-x232.google.com ([2a00:1450:400c:c09::232]:36008) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bGMzl-0006cH-Bu for emacs-orgmode@gnu.org; Fri, 24 Jun 2016 05:01:49 -0400 Received: by mail-wm0-x232.google.com with SMTP id f126so14221990wma.1 for ; Fri, 24 Jun 2016 02:01:49 -0700 (PDT) Received: from [127.0.0.1] ([212.189.161.135]) by smtp.gmail.com with ESMTPSA id g195sm2084237wme.23.2016.06.24.02.01.47 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 Jun 2016 02:01:47 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: "emacs-orgmode@gnu.org" 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)