emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Jan Moringen <jan.moringen@uni-bielefeld.de>
To: emacs-orgmode@gnu.org
Subject: Bug: [Patch] Beamer export default options [6.35i]
Date: Sat, 29 May 2010 04:44:04 +0200	[thread overview]
Message-ID: <19464_1275101045_ZZh00514Zmr7l.00_1275101044.3678.13.camel@localhost.localdomain> (raw)

[-- Attachment #1: Type: text/plain, Size: 324 bytes --]

Hi,

when playing with the beamer export, I found a small error in the :tag
of the org-beamer-themes customization option. Attached is a fix and a
related slight improvement.

Kind regards,
Jan

Emacs  : GNU Emacs 24.0.50.1 (i686-pc-linux-gnu, GTK+ Version 2.21.0)
 of 2010-05-28 on gunhead
Package: Org-mode version 6.35i


[-- Attachment #2: org-beamer-defaults.diff --]
[-- Type: text/x-patch, Size: 2233 bytes --]

--- emacs-bzr/lisp/org/org-beamer.el~	2010-05-28 23:22:15.000000000 +0200
+++ emacs-bzr/lisp/org/org-beamer.el	2010-05-29 04:40:16.505865809 +0200
@@ -64,7 +64,9 @@
   "%45ITEM %10BEAMER_env(Env) %10BEAMER_envargs(Env Args) %4BEAMER_col(Col) %8BEAMER_extra(Extra)"
   "Default column view format that should be used to fill the template."
   :group 'org-beamer
-  :type '(string :tag "Beamer column view format"))
+  :type '(choice
+	  (const  :tag "Do not insert Beamer column view format" nil)
+	  (string :tag "Beamer column view format")))
 
 (defcustom org-beamer-themes
   "\\usetheme{default}\\usecolortheme{default}"
@@ -72,7 +74,9 @@
 When a beamer template is filled, this will be the default for
 BEAMER_HEADER_EXTRA, which will be inserted just before \\begin{document}."
   :group 'org-beamer
-  :type '(string :tag "Beamer column view format"))
+  :type '(choice
+	  (const  :tag "Do not insert Beamer themes" nil)
+	  (string :tag "Beamer themes")))
 
 (defconst org-beamer-column-widths
   "0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 0.0 :ETC"
@@ -587,14 +591,18 @@
 	(org-entry-put nil "EXPORT_FILE_NAME" "presentation.pdf")
 	(org-entry-put nil "BEAMER_FRAME_LEVEL" (number-to-string
 						 org-beamer-frame-level))
-	(org-entry-put nil "BEAMER_HEADER_EXTRA" org-beamer-themes)
-	(org-entry-put nil "COLUMNS" org-beamer-column-view-format)
+	(when org-beamer-themes
+	  (org-entry-put nil "BEAMER_HEADER_EXTRA" org-beamer-themes))
+	(when org-beamer-column-view-format
+	  (org-entry-put nil "COLUMNS" org-beamer-column-view-format))
 	(org-entry-put nil "BEAMER_col_ALL" "0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 :ETC"))
     (insert "#+LaTeX_CLASS: beamer\n")
     (insert "#+LaTeX_CLASS_OPTIONS: [presentation]\n")
     (insert (format "#+BEAMER_FRAME_LEVEL: %d\n" org-beamer-frame-level) "\n")
-    (insert "#+BEAMER_HEADER_EXTRA: " org-beamer-themes "\n")
-    (insert "#+COLUMNS: " org-beamer-column-view-format "\n")
+    (when org-beamer-themes
+      (insert "#+BEAMER_HEADER_EXTRA: " org-beamer-themes "\n"))
+    (when org-beamer-column-view-format
+      (insert "#+COLUMNS: " org-beamer-column-view-format "\n"))
     (insert "#+PROPERTY: BEAMER_col_ALL 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 :ETC\n")))
 
 

[-- Attachment #3: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

             reply	other threads:[~2010-05-29 15:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-29  2:44 Jan Moringen [this message]
2010-05-30 20:18 ` Bug: [Patch] Beamer export default options [6.35i] Carsten Dominik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=19464_1275101045_ZZh00514Zmr7l.00_1275101044.3678.13.camel@localhost.localdomain \
    --to=jan.moringen@uni-bielefeld.de \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).