emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] non-numeric arg for body-only latex export
@ 2010-04-09  5:26 Eric Schulte
  2010-04-09 11:44 ` Carsten Dominik
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Schulte @ 2010-04-09  5:26 UTC (permalink / raw)
  To: Org Mode

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

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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: non-numeric-arg-for-body-only-latex-export.patch --]
[-- Type: text/x-diff, Size: 515 bytes --]

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.

[-- 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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-04-09 15:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-09  5:26 [PATCH] non-numeric arg for body-only latex export Eric Schulte
2010-04-09 11:44 ` Carsten Dominik
2010-04-09 15:15   ` Eric Schulte

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).