Function: org-beamer-select-environment
org-beamer-select-environment is an autoloaded, interactive and
byte-compiled function defined in ox-beamer.el.gz.
Signature
(org-beamer-select-environment)
Documentation
Select the environment to be used by beamer for this entry.
While this uses (for convenience) a tag selection interface, the result of this command will be that the BEAMER_env *property* of the entry is set.
In addition to this, the command will also set a tag as a visual aid, but the tag does not have any semantic meaning.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/org/ox-beamer.el.gz
;;;###autoload
(defun org-beamer-select-environment ()
"Select the environment to be used by beamer for this entry.
While this uses (for convenience) a tag selection interface, the
result of this command will be that the BEAMER_env *property* of
the entry is set.
In addition to this, the command will also set a tag as a visual
aid, but the tag does not have any semantic meaning."
(interactive)
;; Make sure `org-beamer-environments-special' has a higher
;; priority than `org-beamer-environments-extra'.
(let* ((envs (append org-beamer-environments-special
org-beamer-environments-extra
org-beamer-environments-default))
(org-current-tag-alist
(append '((:startgroup))
(mapcar (lambda (e) (cons (concat "B_" (car e))
(string-to-char (nth 1 e))))
envs)
'((:endgroup))
'(("BMCOL" . ?|))))
(org-tag-persistent-alist nil)
(org-use-fast-tag-selection t)
(org-fast-tag-selection-single-key t))
(org-set-tags-command)
(let ((tags (org-get-tags nil t)))
(cond
;; For a column, automatically ask for its width.
((eq org-last-tag-selection-key ?|)
(if (member "BMCOL" tags)
(org-set-property "BEAMER_col" (read-string "Column width: "))
(org-delete-property "BEAMER_col")))
;; For an "againframe" section, automatically ask for reference
;; to resumed frame and overlay specifications.
((eq org-last-tag-selection-key ?A)
(if (equal (org-entry-get nil "BEAMER_env") "againframe")
(progn (org-entry-delete nil "BEAMER_env")
(org-entry-delete nil "BEAMER_ref")
(org-entry-delete nil "BEAMER_act"))
(org-entry-put nil "BEAMER_env" "againframe")
(org-set-property
"BEAMER_ref"
(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)))
(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"))))))