From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id YKzlIfJJw2FYIgEAgWs5BA (envelope-from ) for ; Wed, 22 Dec 2021 16:53:22 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id GJ6uHfJJw2GRfgAAB5/wlQ (envelope-from ) for ; Wed, 22 Dec 2021 15:53:22 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 4054E87DC for ; Wed, 22 Dec 2021 16:53:22 +0100 (CET) Received: from localhost ([::1]:57926 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n03vd-0005wV-Bc for larch@yhetil.org; Wed, 22 Dec 2021 10:53:21 -0500 Received: from eggs.gnu.org ([209.51.188.92]:49746) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n03uz-0005tF-Sc for emacs-orgmode@gnu.org; Wed, 22 Dec 2021 10:52:41 -0500 Received: from [2a00:1450:4864:20::535] (port=43747 helo=mail-ed1-x535.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n03uy-0007Vr-A6 for emacs-orgmode@gnu.org; Wed, 22 Dec 2021 10:52:41 -0500 Received: by mail-ed1-x535.google.com with SMTP id o20so10306660eds.10 for ; Wed, 22 Dec 2021 07:52:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=8g9L8rpN0H/2o1JOP36eyMUjsPDu9+yoRxbokmAAihE=; b=kuiGsVBKUa71IScMIoQ26VNikE+7e7EJfoDdnu5t4RjYLKC7r6xOC3zfmubXpF+Mlh 6TuIcZeqqTFujbPilf5OdG5zX3wcJRz/4xFhhzDopw9qwjRz9JgFabvJh6wdjQKVRYC8 8qgazRlpr9PLH4OsVxN2hO8TgS+F6pfO8fM3KOqMxBld62LoFowaW26m/5GmWQahy9zQ EuFN+aoSRw6gdVcLgQZQhyYQCGi+8NEuwTcdR1496ehteg9A0SBPshtev3n3DIl6b8gw uIhIyYGxXWzIr9zRXZepd8y0D1tThvBPF5jqV/LoScXRYrhApQxU4CLYw6ILaVhmNIYE Ci0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=8g9L8rpN0H/2o1JOP36eyMUjsPDu9+yoRxbokmAAihE=; b=D6ViK7Loc0TEtQgMGalWhJktOkJO4zQ3ibKmvKxe4qpKguk2frBdEa8+EdhLPWxcaa X9UFqdhm8dBejyNTJiwvlkU1KuvPG5TUjpKPZVbOx7IybyO2fays5j+HMkvFjsy/iV0/ kE+/krqIesdPtKrLxbRZTGwWqd5PZwr3V0jPSrj/6qLLEZ1rC6rRzDZ9MdmdtBPDFFLY z2L6wl5kp4s/WbDWtCcdb5bNL4eeFuS03JFdf6337R+vEF23HQNZ1OkN7l9UqkknpEGG i04nIQbS+rVbXiwwFJ6myt7IwxzRLc6kk9H4ulRPlRNqhcy4IwQU49urfLWTHznDn+xm BIBw== X-Gm-Message-State: AOAM531TZyAYWAAV7SnYLfBM2mwoPl85jk/zyEbzV0BAVNe7XY9hF5i2 1pdLH9EVGAdH8+idSR5isqxr6KSEGL7SwCbUH9Y= X-Google-Smtp-Source: ABdhPJwKBKOs961qHUFVkngcrbVVVLQKtN9pE21bTuxzghZNUvf3Zdm1RsR+gRH2J6b4oSXf9rfwLoQmnkv74Yp1VYs= X-Received: by 2002:a05:6402:2789:: with SMTP id b9mr3396943ede.28.1640188358772; Wed, 22 Dec 2021 07:52:38 -0800 (PST) MIME-Version: 1.0 References: <87wnjwso7p.fsf@localhost> In-Reply-To: <87wnjwso7p.fsf@localhost> From: Yasushi SHOJI Date: Thu, 23 Dec 2021 00:52:27 +0900 Message-ID: Subject: Re: exporter: How to get :file property on a src block in an exporter To: Ihor Radchenko Content-Type: text/plain; charset="UTF-8" X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::535 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::535; envelope-from=yasushi.shoji@gmail.com; helo=mail-ed1-x535.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: emacs-org list Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1640188402; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=8g9L8rpN0H/2o1JOP36eyMUjsPDu9+yoRxbokmAAihE=; b=XV/lmqq34swvbU0wuJvTwN0KTODgpg6pVqk3n5u9qF6rp7h38W/1sdS8q3i3K1+8x2uuSH PKiV7WEiel2GFiBf6b/ZO9ZpXn2lVph14obIOyztG0YFsefKxay1kJ1kiVzaLZl0Qlm/nj wU3Q5YaQCCEXIjvijbb9lBQzc2WWJOajIM7XVIsfrdAbUodKfEGZgejZCrkWX6eogZXjdK Y9tkQFvm5SteLS1K7snL47klNZPQu83jvwLuShMSooz/uqwjAzjP41dV1gRKOfbyB2awD4 ZChqKOxM0k0K7WXAOXgySakrj7ZxoPXsjNJriDm4EUhu0rlLZCrMhNNxdktS3g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1640188402; a=rsa-sha256; cv=none; b=Us7G1TkT5d95Dd5II5vuxfYrdeioxb23zEeXYh3SYncZYbGZW1jn6vcuh+uNtxst+YoDYO AhZ3TfkkdXDJHEuAVnQkGIONJou6VaYnUHv+Jt6KUJyVMTcAlc5a/NJGdAkeG9FPCpKZZ6 wWLXX6YqdOUsGIjvZuiHgXtGoRZbUCMYX9D33VRSy14GgCmoukqWqKjvMDkRX7HR007bDW xvY2b2VSSStHxUJKGkhSqPHCGyL4gFV20BJq4wnGuhtBehl5HrWmOjsRVn7NNA5xPtAsVu tqYY/BPDrdg7l+O1/Po+2ARasJdXvUXP0dqUZ8vSHFnm5ySq2IiPRpLXeDIbew== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=kuiGsVBK; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -4.24 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=kuiGsVBK; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 4054E87DC X-Spam-Score: -4.24 X-Migadu-Scanner: scn0.migadu.com X-TUID: +KJgMbA76Uon Hi Ihor, On Wed, Dec 22, 2021 at 11:32 PM Ihor Radchenko wrote: > Yasushi SHOJI 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