From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eric Schulte" Subject: Re: [PATCH] non-numeric arg for body-only latex export Date: Fri, 09 Apr 2010 09:15:23 -0600 Message-ID: <87wrwg7j3o.fsf@gmail.com> References: <87eiip9oww.fsf@gmail.com> <74CBF936-1D04-40AC-9BCB-6FD6DCE21786@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O0Fvk-0002yl-Jt for emacs-orgmode@gnu.org; Fri, 09 Apr 2010 11:15:36 -0400 Received: from [140.186.70.92] (port=39984 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O0Fvi-0002xc-CF for emacs-orgmode@gnu.org; Fri, 09 Apr 2010 11:15:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O0Fvf-0006or-N7 for emacs-orgmode@gnu.org; Fri, 09 Apr 2010 11:15:34 -0400 Received: from mail-pz0-f198.google.com ([209.85.222.198]:33451) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O0Fve-0006oT-G6 for emacs-orgmode@gnu.org; Fri, 09 Apr 2010 11:15:31 -0400 Received: by pzk36 with SMTP id 36so2710828pzk.24 for ; Fri, 09 Apr 2010 08:15:29 -0700 (PDT) In-Reply-To: <74CBF936-1D04-40AC-9BCB-6FD6DCE21786@gmail.com> (Carsten Dominik's message of "Fri, 9 Apr 2010 13:44:37 +0200") 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: Carsten Dominik Cc: Org Mode Carsten Dominik writes: > Hi Eric, no objections, please go ahead. > Applied. > > Do you know about `org-replace-region-by-latex'. > I was not aware of that function. That sounds very convenient, I'm looking forward to working it into my latex editing. Thanks -- Eric > > - Carsten > > On Apr 9, 2010, at 7:26 AM, Eric Schulte wrote: > >> 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. >> _______________________________________________ >> 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 > > - Carsten