From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: Re: What's wrong with org-export-html-final-hook in 8.x Date: Tue, 14 May 2013 17:31:15 +0200 Message-ID: <87r4h9mvcs.fsf@pank.eu> References: <87ip2lode9.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:52186) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UcHCL-0001MF-I3 for emacs-orgmode@gnu.org; Tue, 14 May 2013 11:31:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UcHCK-0005Fg-CN for emacs-orgmode@gnu.org; Tue, 14 May 2013 11:31:29 -0400 Received: from plane.gmane.org ([80.91.229.3]:50289) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UcHCK-0005Fa-60 for emacs-orgmode@gnu.org; Tue, 14 May 2013 11:31:28 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UcHCI-00033l-94 for emacs-orgmode@gnu.org; Tue, 14 May 2013 17:31:26 +0200 Received: from ip-pool-142.iue.it ([192.167.90.142]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 14 May 2013 17:31:26 +0200 Received: from rasmus by ip-pool-142.iue.it with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 14 May 2013 17:31:26 +0200 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Hi Visayafan, > Recently I upgrade my Org Mode from 7.8.11 to the latest 8.0.2 and find > org-export-html-final-hook doesn't work. This variable no longer exists, since quite I while I think (check the git log if interested). You could switch to filters. Here's an ugly hack for removing titles on my web-site (the title is already inserted in a shared preamble). #+BEGIN_SRC emacs-lisp (defun rasmus/org-html-ignore-title-if-present (string backend info) "Strip title if it's already there. Ignore BACKEND and INFO." (when (and (org-export-derived-backend-p backend 'html) (string-match "h1 class=\"mytitle\"" string)) (replace-regexp-in-string "

.*?

" "" string))) (add-to-list 'org-export-filter-final-output-functions 'rasmus/org-html-ignore-title-if-present) #+END_SRC Hope it helps, Rasmus -- Summon the Mothership!