2015-10-14 0:18 GMT+02:00 Nicolas Goaziou <[email protected]>:
> Fabrice Popineau <[email protected]> writes:
>
> > This is a pity. Things would be more straightforward.
>
> Straightforward for what? Use againframes? Or force label?
>
>
Force label. Having to explicitly state it twice :
* Frame 1
:PROPERTIES:
:CUSTOM_ID: foo
:BEAMER_opt: label=foo
:END:
is not exactly straightforward. The following (crude) patch would avoid it.
Anyway, the BEAMER_opt label= way of setting the label is not Org-y.
Regards,
Fabrice
diff --git a/vendor/org-mode/lisp/ox-beamer.el
b/vendor/org-mode/lisp/ox-beamer.el
index 24dcf19..cc8d241 100644
--- a/vendor/org-mode/lisp/ox-beamer.el
+++ b/vendor/org-mode/lisp/ox-beamer.el
@@ -333,11 +333,13 @@ INFO is a plist used as a communication channel.
The value is either the label specified in \"BEAMER_opt\"
property, or a fallback value built from headline's number. This
function assumes HEADLINE will be treated as a frame."
+ (if org-latex-prefer-user-labels
+ (org-element-property :CUSTOM_ID headline)
(let ((opt (org-element-property :BEAMER_OPT headline)))
(if (and (stringp opt)
(string-match "\\(?:^\\|,\\)label=\\(.*?\\)\\(?:$\\|,\\)"
opt))
(match-string 1 opt)
- (format "{sec:%s}" (org-export-get-reference headline info)))))
+ (format "{sec:%s}" (org-export-get-reference headline info))))))
(defun org-beamer--frame-level (headline info)
"Return frame level in subtree containing HEADLINE.