My small patch worked only for labels with colon.
diff --git a/vendor/org-mode/lisp/ox-beamer.el b/vendor/org-mode/lisp/ox-beamer.el
index 73d8a76..ee4f0d7 100644
--- a/vendor/org-mode/lisp/ox-beamer.el
+++ b/vendor/org-mode/lisp/ox-beamer.el
@@ -335,11 +335,11 @@ property, or a fallback value built from headline's number. This
function assumes HEADLINE will be treated as a frame."
(let ((opt (org-element-property :BEAMER_OPT headline)))
(if (and (stringp opt)
- (string-match "\\(?:^\\|,\\)label=\\(.*?\\)\\(?:$\\|,\\)" opt))
+ (string-match "\\(?:^\\|,\\)label={?\\(.*?\\)}?\\(?:$\\|,\\)" opt))
(match-string 1 opt)
(or (and (plist-get info :latex-prefer-user-labels)
(org-element-property :CUSTOM_ID headline))
- (format "{sec:%s}"
+ (format "sec:%s"
(org-export-get-reference headline info))))))
(defun org-beamer--frame-level (headline info)
@@ -444,8 +444,9 @@ used as a communication channel."
(or (string-match "\\(^\\|,\\)label=" beamer-opt)
(string-match "allowframebreaks" beamer-opt)))
(list
- (format "label=%s"
- (org-beamer--get-label headline info)))))))
+ (let* ((label (org-beamer--get-label headline info))
+ (fmt (if (string-match ":" label) "label={%s}" "label=%s")))
+ (format fmt label)))))))
;; Change options list into a string.
(org-beamer--normalize-argument
(mapconcat
This way, the org-beamer--get-label function always returns a label without braces.
Check especially the regexp. I hope I haven't introduce bad matches.
When the frame with the label is written, braces are added if needed.