From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tassilo Horn Subject: Re: Bug: Exporter omits inline code blocks [8.0.3 (release_8.0.3-238-g172061 @ /home/horn/Repos/el/org-mode/lisp/)] Date: Fri, 14 Jun 2013 09:26:16 +0200 Message-ID: <8738slp2zr.fsf@thinkpad.tsdh.de> References: <87d2rq4jfq.fsf@thinkpad.tsdh.de> <87obba1jj9.fsf@gmail.com> <87sj0mib0w.fsf@thinkpad.tsdh.de> <87obbadoqj.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36607) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UnOOp-0006D8-UG for emacs-orgmode@gnu.org; Fri, 14 Jun 2013 03:26:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UnOOo-0003of-OI for emacs-orgmode@gnu.org; Fri, 14 Jun 2013 03:26:19 -0400 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:53347) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UnOOo-0003oa-H1 for emacs-orgmode@gnu.org; Fri, 14 Jun 2013 03:26:18 -0400 In-Reply-To: <87obbadoqj.fsf@gmail.com> (Eric Schulte's message of "Thu, 13 Jun 2013 07:06:20 -0600") 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: Eric Schulte Cc: emacs-orgmode@gnu.org, Nicolas Goaziou Eric Schulte writes: Hi Eric, >> Aha. I've used source blocks only for the markup especially when >> exporting until now. And the manual states that inline code blocks >> are not different to normal code blocks, just being inline. So >> that's at least unexpected behavior, and the manual should be updated >> accordingly. > > They are treated just like code blocks, however they have different > default header arguments. > > ,----[org-babel-default-inline-header-args] > | org-babel-default-inline-header-args is a variable defined in `ob-core.el'. > | Its value is ((:session . "none") > | (:results . "replace") > | (:exports . "results")) > | > | > | Documentation: > | Default arguments to use when evaluating an inline source block. > `---- Ah, thanks. > If you'd like to propose a patch to the manual which makes this clear, > I'm happy to apply it. First, I have to understand this a bit better. Now I've set (setq org-babel-default-inline-header-args '((:session . "none") (:results . "replace") (:exports . "code"))) in order to export the code. But the result is that in the exported html (org-reveal) document I get --8<---------------cut here---------------start------------->8--- #+BEGINSRC clojure (+ 1 2 3) ;=> 6 #+ENDSRC --8<---------------cut here---------------end--------------->8--- And the corresponding export function which would do the intended thing still isn't called. --8<---------------cut here---------------start------------->8--- (org-export-define-derived-backend 'reveal 'html ;... :translate-alist '(;... (inline-src-block . org-reveal-inline-src-block) ;...) :export-block "REVEAL" ) (defun org-reveal-inline-src-block (inline-src-block contents info) "Transcode an INLINE-SRC-BLOCK element from Org to HTML. CONTENTS holds the contents of the item. INFO is a plist holding contextual information." (let* ((org-lang (org-element-property :language inline-src-block)) (code (org-element-property :value inline-src-block))) (format "%s" org-lang code))) --8<---------------cut here---------------end--------------->8--- where `code' becomes the inline code with its markup. Bye, Tassilo