From mboxrd@z Thu Jan 1 00:00:00 1970 From: Erik Iverson Subject: Re: [Babel] How to find out export format in a babel plugin Date: Thu, 24 Mar 2011 23:17:10 -0500 Message-ID: <4D8C1746.1040601@ccbr.umn.edu> References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from [140.186.70.92] (port=44555 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q2yRK-0006Di-5v for emacs-orgmode@gnu.org; Fri, 25 Mar 2011 00:16:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q2yQx-0000Te-0C for emacs-orgmode@gnu.org; Fri, 25 Mar 2011 00:15:36 -0400 Received: from pegasus.biostat.wisc.edu ([144.92.73.35]:54416) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q2yQw-0000TI-Rj for emacs-orgmode@gnu.org; Fri, 25 Mar 2011 00:15:34 -0400 In-Reply-To: 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: Jianing Yang Cc: emacs-orgmode@gnu.org On 03/24/2011 10:09 PM, Jianing Yang wrote: > Hi, all > > I've recently written a babel plugin which does syntax highlighting > using pygment. > However, I have to specify a '-f html' option every time I use it. It looks like > > > #+begin_src pygment :cmdline -l bash -O linenos -f html > exec 3<&0 # copies STDIN, it prevents 'read' stealing STDIN from '$command' > while read FN; do > test -e "$FN" || rm -iv "$FN"<&3 > done< <(find . $level -type l) > #+end_src > > Therefore, my question is that is there a way that a babel plugin can > be aware about the export > format? If there is, not only I can omit the '-f html' but it could > also support for other export format, > like latex, transparently. In git pulls from within the last few weeks, see the variable: org-export-current-backend Does your pygment idea have any overlap with: http://comments.gmane.org/gmane.emacs.orgmode/28420