emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Orgmode] [PATCH] non-numeric arg for body-only latex export


From: Eric Schulte
Subject: [Orgmode] [PATCH] non-numeric arg for body-only latex export
Date: Thu, 08 Apr 2010 23:26:55 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Hi,

This small patch changes the behavior of `org-export-as-latex' so that
when a simple (non-numeric) prefix arg is provided the body-only option
is set to true.

I find this very useful as I often only want to export a small active
region (often a table) to latex for pasting into an existing latex
buffer.  This patch makes that use case very easy.

Thanks -- Eric

diff --git a/lisp/org-latex.el b/lisp/org-latex.el
index ff4ae62..bbee957 100644
--- a/lisp/org-latex.el
+++ b/lisp/org-latex.el
@@ -584,6 +584,7 @@ simply return the content of 
\begin{document}...\end{document},
 without even the \begin{document} and \end{document} commands.
 when PUB-DIR is set, use this as the publishing directory."
   (interactive "P")
+  (when (and (not body-only) (listp arg)) (setq body-only t))
   (run-hooks 'org-export-first-hook)
 
   ;; Make sure we have a file name when we need it.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]