From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: Re: [bug] [exporter] Frame labels cause allowframebreaks option to fail Date: Tue, 15 Oct 2013 19:49:01 +0200 Message-ID: <87d2n62zn6.fsf@pank.iue.private> References: <87y55ueee0.fsf@pinto.chemeng.ucl.ac.uk> <87ppr630wp.fsf@pank.iue.private> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33744) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VW8kD-0001uu-Nf for emacs-orgmode@gnu.org; Tue, 15 Oct 2013 13:49:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VW8k7-0004AO-Iu for emacs-orgmode@gnu.org; Tue, 15 Oct 2013 13:49:21 -0400 Received: from plane.gmane.org ([80.91.229.3]:51523) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VW8k7-0004AG-Bl for emacs-orgmode@gnu.org; Tue, 15 Oct 2013 13:49:15 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1VW8k5-0000cX-28 for emacs-orgmode@gnu.org; Tue, 15 Oct 2013 19:49:13 +0200 Received: from ip-pool-136.iue.it ([192.167.90.136]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 15 Oct 2013 19:49:13 +0200 Received: from rasmus by ip-pool-136.iue.it with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 15 Oct 2013 19:49:13 +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 Rasmus writes: > #+begin_src emacs-lisp > (defun rasmus/condtionally-remove-label (headline backend info) > "condtionally remove label" > (if (and > (org-export-derived-backend-p backend 'beamer) > (string-match "[.*?allowframebreaks.*?]" headline)) > (replace-regexp-in-string ",? ?label=[-sec0-9]+" "" headline) > headline)) > > (add-to-list 'org-export-filter-headline-functions > 'rasmus/condtionally-remove-label) > #+end_src That's pretty unstable, it turns out. Headlines encompass more in ox-beamer than how I remember them from ox-latex. Here's a better one as long as you don't use newlines ("\n") in your headings. Are '\\' stil used for denoting subtitles in ox-beamer? * test :PROPERTIES: :BEAMER_opt: allowframebreaks :END: horses like allowframebreaks * on allowframebreaks cows #+begin_src emacs-lisp (defun rasmus/condtionally-remove-label (headline backend info) "condtionally remove label" (let* ((h (string-match "\n" headline)) (head (substring headline 0 h))) (if (and (org-export-derived-backend-p backend 'beamer) (string-match "\\[.*?allowframebreaks.*?\\].*?" head)) (concat (replace-regexp-in-string ",? ?label=[-sec0-9]+" "" head) "\n" (substring headline (1+ h))) headline))) (add-to-list 'org-export-filter-headline-functions 'rasmus/condtionally-remove-label) #+end_src –Rasmus -- The Kids call him Billy the Saint