From mboxrd@z Thu Jan 1 00:00:00 1970 From: Giacomo M Subject: Re: org-export-latex-final-hook not working Date: Fri, 24 Jun 2016 13:02:59 +0200 Message-ID: <48764c2a-de70-caed-32e6-69d68040b9b3@gmail.com> References: <87ziqbhryk.fsf@gmx.us> <240d9e6b-415a-6c36-d84d-55fd3cdee874@gmail.com> <87h9cj7wxy.fsf@saiph.selenimh> 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]:46070) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bGOt7-0001Mu-UI for emacs-orgmode@gnu.org; Fri, 24 Jun 2016 07:03:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bGOt4-0004RD-AE for emacs-orgmode@gnu.org; Fri, 24 Jun 2016 07:03:04 -0400 Received: from mail-wm0-x235.google.com ([2a00:1450:400c:c09::235]:35299) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bGOt4-0004R7-4A for emacs-orgmode@gnu.org; Fri, 24 Jun 2016 07:03:02 -0400 Received: by mail-wm0-x235.google.com with SMTP id v199so18009666wmv.0 for ; Fri, 24 Jun 2016 04:03:01 -0700 (PDT) Received: from [127.0.0.1] ([212.189.161.135]) by smtp.gmail.com with ESMTPSA id a4sm4587658wjq.40.2016.06.24.04.02.59 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 Jun 2016 04:03:00 -0700 (PDT) In-Reply-To: <87h9cj7wxy.fsf@saiph.selenimh> 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 Il 24/06/2016 11:33, Nicolas Goaziou ha scritto: > Giacomo M writes: > >> I found an example for html by Rasmus on the mailing list. Just adapting >> it to my case works. >> >> #+BEGIN_SRC emacs-lisp >> (defun jackjackk/org-latex-remove-section-labels (string backend info) >> "Remove section labels generated by org-mode" >> (when (and (org-export-derived-backend-p backend 'latex) >> (string-match "\\\\label{sec:.*}" string)) >> (replace-regexp-in-string "\\\\label{sec:.*}" "" string))) > FWIW, I suggest > > (when (org-export-derived-backend-p backend 'latex) > (replace-regexp-in-string "\\\\label{sec:.*?}" "" string))) > > A greedy regexp may give you surprises. > > Regards, Thanks, always learning something! Giacomo