From: Tassilo Horn <tsdh@gnu.org>
To: Eric Schulte <schulte.eric@gmail.com>
Cc: emacs-orgmode@gnu.org, Nicolas Goaziou <n.goaziou@gmail.com>
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 [thread overview]
Message-ID: <8738slp2zr.fsf@thinkpad.tsdh.de> (raw)
In-Reply-To: <87obbadoqj.fsf@gmail.com> (Eric Schulte's message of "Thu, 13 Jun 2013 07:06:20 -0600")
Eric Schulte <schulte.eric@gmail.com> 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---
#+BEGIN<sub>SRC</sub> clojure
(+ 1 2 3) ;=> 6
#+END<sub>SRC</sub>
--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 "<code class=\"src src-%s\">%s</code>" org-lang code)))
--8<---------------cut here---------------end--------------->8---
where `code' becomes the inline code with its markup.
Bye,
Tassilo
prev parent reply other threads:[~2013-06-14 7:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-13 6:24 Bug: Exporter omits inline code blocks [8.0.3 (release_8.0.3-238-g172061 @ /home/horn/Repos/el/org-mode/lisp/)] Tassilo Horn
2013-06-13 8:50 ` Nicolas Goaziou
2013-06-13 10:02 ` Tassilo Horn
2013-06-13 13:06 ` Eric Schulte
2013-06-14 7:26 ` Tassilo Horn [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8738slp2zr.fsf@thinkpad.tsdh.de \
--to=tsdh@gnu.org \
--cc=emacs-orgmode@gnu.org \
--cc=n.goaziou@gmail.com \
--cc=schulte.eric@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.