From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eric Schulte" Subject: [PATCH] non-numeric arg for body-only latex export Date: Thu, 08 Apr 2010 23:26:55 -0600 Message-ID: <87eiip9oww.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O06kA-0000XF-Tb for emacs-orgmode@gnu.org; Fri, 09 Apr 2010 01:27:03 -0400 Received: from [140.186.70.92] (port=56807 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O06k8-0000W1-D9 for emacs-orgmode@gnu.org; Fri, 09 Apr 2010 01:27:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O06k7-000511-4B for emacs-orgmode@gnu.org; Fri, 09 Apr 2010 01:27:00 -0400 Received: from mail-gw0-f41.google.com ([74.125.83.41]:47784) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O06k7-00050v-1k for emacs-orgmode@gnu.org; Fri, 09 Apr 2010 01:26:59 -0400 Received: by gwb15 with SMTP id 15so1930335gwb.0 for ; Thu, 08 Apr 2010 22:26:58 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Org Mode --=-=-= 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 --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=non-numeric-arg-for-body-only-latex-export.patch 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. --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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 --=-=-=--