summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2018-05-01 23:27:37 +0200
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2018-05-01 23:27:37 +0200
commitcac45d5469db6e9e31d5b1bdedb051ec11f5c368 (patch)
treeffe8e7dd498793807a0f13f75a523a49ed86e1c6
parent8efcb62dc415ad8dcd61b7f6aa7806cbefbf2f4f (diff)
downloadorg-mode-cac45d5469db6e9e31d5b1bdedb051ec11f5c368.tar.gz
ox-beamer: Fix `org-beamer-select-environment'
* lisp/ox-beamer.el (org-beamer-select-environment): Fix thinko. The error prevents the function to complete: only the tag is added, not the property.
-rw-r--r--lisp/ox-beamer.el9
1 files changed, 6 insertions, 3 deletions
diff --git a/lisp/ox-beamer.el b/lisp/ox-beamer.el
index 1d2e338..a6a7eba 100644
--- a/lisp/ox-beamer.el
+++ b/lisp/ox-beamer.el
@@ -1096,9 +1096,12 @@ aid, but the tag does not have any semantic meaning."
(read-string "Frame reference (*Title, #custom-id, id:...): "))
(org-set-property "BEAMER_act"
(read-string "Overlay specification: "))))
- ((let ((tags-re (concat "B_" (regexp-opt (mapcar #'car envs) t))))
- (cl-some (lambda (tag) (string-match tags-re tag)) tags))
- (org-entry-put nil "BEAMER_env" (match-string 1 tags)))
+ ((let* ((tags-re (concat "B_" (regexp-opt (mapcar #'car envs) t)))
+ (env (cl-some (lambda (tag)
+ (and (string-match tags-re tag)
+ (match-string 1 tag)))
+ tags)))
+ (and env (progn (org-entry-put nil "BEAMER_env" env) t))))
(t (org-entry-delete nil "BEAMER_env"))))))
;;;###autoload