emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Yasushi SHOJI <yasushi.shoji@gmail.com>
To: Ihor Radchenko <yantar92@gmail.com>
Cc: emacs-org list <emacs-orgmode@gnu.org>
Subject: Re: exporter: How to get :file property on a src block in an exporter
Date: Thu, 23 Dec 2021 00:52:27 +0900	[thread overview]
Message-ID: <CAELBRWKgqPrT5CFcSv6QxRmWR5Ntd=Ej6qSkX5L3buta5Lu5Ow@mail.gmail.com> (raw)
In-Reply-To: <87wnjwso7p.fsf@localhost>

Hi Ihor,

On Wed, Dec 22, 2021 at 11:32 PM Ihor Radchenko <yantar92@gmail.com> wrote:
> Yasushi SHOJI <yasushi.shoji@gmail.com> writes:
> > I'm writing an exporter and I'd like to get :file property on a src block.
> > Let's say I have the following src block in an org file.
> > ...
> > How can I get "images/hello-world.png" in org-myexporter-src-block?
>
> See org-babel-get-src-block-info. It can accept the parsed src-block element.

This is what I got from (org-bable-get-src-block-info nil src-block)

("ditaa" "+--------------+\n| Hello World! |\n+--------------+"
 ((:colname-names)
  (:rowname-names)
  (:result-params "replace")
  (:result-type . value)
  (:results . "replace")
  (:exports . "code")
  (:tangle . "no")
  (:hlines . "no")
  (:noweb . "no")
  (:cache . "no")
  (:session . "none"))
 "" nil 41 "(ref:%s)")

I don't see :file in it.  What am I missing?

I've been reading org-element-src-block-parser, but I'm not sure it's
parsing `:file` as ob does.
How does org-bable-execute:ditaa gets params, which I can get :file from?
I seems to me org-babel-exp-src-block -> org-babel-get-src-block-info ->
org-bable-exp-do-export -> ....
Then, why don't I have :file in the info?

Thank you for your time.
-- 
             yashi


  reply	other threads:[~2021-12-22 15:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-21 21:26 exporter: How to get :file property on a src block in an exporter Yasushi SHOJI
2021-12-22 14:34 ` Ihor Radchenko
2021-12-22 15:52   ` Yasushi SHOJI [this message]
2021-12-22 16:07     ` Yasushi SHOJI
2021-12-22 18:22       ` Berry, Charles
2021-12-22 22:16         ` Yasushi SHOJI
2021-12-23  2:28           ` Berry, Charles

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

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAELBRWKgqPrT5CFcSv6QxRmWR5Ntd=Ej6qSkX5L3buta5Lu5Ow@mail.gmail.com' \
    --to=yasushi.shoji@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=yantar92@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 public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).