Rasmus <ras...@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