emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Rasmus <rasmus@gmx.us>
To: emacs-orgmode@gnu.org
Subject: Re: [bug] [exporter] Frame labels cause allowframebreaks option to fail
Date: Tue, 15 Oct 2013 19:49:01 +0200	[thread overview]
Message-ID: <87d2n62zn6.fsf@pank.iue.private> (raw)
In-Reply-To: 87ppr630wp.fsf@pank.iue.private

Rasmus <rasmus@gmx.us> 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

  reply	other threads:[~2013-10-15 17:49 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-15 15:35 [bug] [exporter] Frame labels cause allowframebreaks option to fail Eric S Fraga
2013-10-15 16:51 ` Eric S Fraga
2013-10-15 17:24   ` Rasmus
2013-10-15 17:21 ` Rasmus
2013-10-15 17:49   ` Rasmus [this message]
2013-10-16  7:15   ` Eric S Fraga
2013-10-16 10:25     ` Eric S Fraga
2013-10-16 11:04       ` Carsten Dominik
2013-10-16 11:13         ` Rasmus
2013-10-16 12:07           ` Andreas Leha
2013-10-16 13:08             ` Eric S Fraga
2013-10-16 13:13         ` Eric S Fraga
2013-10-16 19:14           ` Nicolas Goaziou
2013-10-16 11:47       ` Carsten Dominik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87d2n62zn6.fsf@pank.iue.private \
    --to=rasmus@gmx.us \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).