From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Cook, Malcolm" Subject: Re: Switch for exported file types when evaluating code blocks Date: Fri, 19 Jul 2013 15:19:25 +0000 Message-ID: References: <20130718020206.GB24529@kuru.dyndns-at-home.com> <8761w8ecsb.fsf@gmail.com> <87zjtjcqfi.fsf@gmail.com>, <20130719102315.GB9369@kuru.dyndns-at-home.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57577) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V0CT0-0001vg-Qw for emacs-orgmode@gnu.org; Fri, 19 Jul 2013 11:19:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V0CSv-0008Fh-SH for emacs-orgmode@gnu.org; Fri, 19 Jul 2013 11:19:34 -0400 Received: from smtp01.stowers.org ([12.201.176.61]:59377) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V0CSv-0008FJ-IR for emacs-orgmode@gnu.org; Fri, 19 Jul 2013 11:19:29 -0400 In-Reply-To: <20130719102315.GB9369@kuru.dyndns-at-home.com> Content-Language: en-US List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Suvayu Ali , "emacs-orgmode@gnu.org" Suvayu,=0A= =0A= This is splendid news! I will try it immediately upon return from "gone fi= shin" in a week...=0A= =0A= (erhm, that is, right after I figure out haw to migrate my orgmode SETUPFI= LE to comport with new export backend I just upgraded to.... my fancy TOC a= nd org-export-html-table-tag javascript have "gone missin")=0A= =0A= Future is looking bright!,=0A= =0A= ~ malcolm_cook@stowers.org=0A= =0A= ________________________________________=0A= From: emacs-orgmode-bounces+mec=3Dstowers.org@gnu.org [emacs-orgmode-bounce= s+mec=3Dstowers.org@gnu.org] on behalf of Suvayu Ali [fatkasuvayu+linux@gma= il.com]=0A= Sent: Friday, July 19, 2013 5:23 AM=0A= To: emacs-orgmode@gnu.org=0A= Subject: Re: [O] Switch for exported file types when evaluating code blocks= =0A= =0A= On Thu, Jul 18, 2013 at 09:02:41PM -0400, Nick Dokos wrote:=0A= >=0A= > #+BEGIN_LaTeX=0A= > \includesvg{foo}=0A= > #+END_LaTeX=0A= =0A= I believe even this can be integrated with Org using a filter. How=0A= about something like this:=0A= =0A= (defun my-svg-graphics (contents backend info)=0A= (when (eq backend 'latex)=0A= (replace-regexp-in-string "\\`\\\\includegraphics.+\\({.+\.svg}\\)"=0A= "\\\\includesvg\1" contents)))=0A= =0A= (add-to-list 'org-export-filter-link-functions 'my-svg-graphics)=0A= =0A= Of course the above ignores the options since I do not know if=0A= \includesvg takes the same options. But that is a detail that can be=0A= fixed by changing the regexp.=0A= =0A= What do you think?=0A= =0A= =0A= --=0A= Suvayu=0A= =0A= Open source is the future. It sets us free.=0A= =0A=