From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id yOxdFfujw2EtlAAAgWs5BA (envelope-from ) for ; Wed, 22 Dec 2021 23:17:31 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id GNTzEPujw2HydgAAbx9fmQ (envelope-from ) for ; Wed, 22 Dec 2021 22:17:31 +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 1C1F1D42C for ; Wed, 22 Dec 2021 23:17:31 +0100 (CET) Received: from localhost ([::1]:41658 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n09vO-0006Gb-1W for larch@yhetil.org; Wed, 22 Dec 2021 17:17:30 -0500 Received: from eggs.gnu.org ([209.51.188.92]:59458) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n09uc-0006CO-2j for emacs-orgmode@gnu.org; Wed, 22 Dec 2021 17:16:42 -0500 Received: from [2a00:1450:4864:20::535] (port=45708 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 1n09ua-0005Kv-LA for emacs-orgmode@gnu.org; Wed, 22 Dec 2021 17:16:41 -0500 Received: by mail-ed1-x535.google.com with SMTP id j6so13837867edw.12 for ; Wed, 22 Dec 2021 14:16:38 -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=7xQ0faVMrFPStb9P0+AxWSg4VsU5Z91fAJNTR92Ja0U=; b=G3uG4vLH6EvDDGrI81oQ3uN2HifIvn0jiAd7pwLBTBHlnuwUbk/LrIok3+m+LAs1cE aLDseCA2qKD+z34K9ZvS7kV1ZIvp93NPqiFyajY80JJmaGGLvGh/RGPMialp7I+Jy9+b W2tn3oo7PPxyz/k/+vbVFiADqlEpZyMvmp1aweNFbhiLbrk0EMU7lrCN3u3ZBsnxiS/I oknZNbv6cAzV06TQPEt1U46XGDfy3rjBNcX9G7oD9ZS0RmAb01w2lXz2DsaHB1OfaE/o +zjLg38jnbktCj+pJ1gT/vcO03/+6g2V+sa6ymA3mbDt5ZHN7M+YrDiXoMIfx2ClUAQu dx5A== 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=7xQ0faVMrFPStb9P0+AxWSg4VsU5Z91fAJNTR92Ja0U=; b=udGZnUBP7OXYG0pK1diHIF9agRmyP+lIoTL9QjPEINhSsFuvcz+65c8hyDf5sEiL5f CiFC7MpTXexOokiuC4TKuPCESfWI1UPP1heHB/rCiQWPNyJYULqNk+V0xQ5ytXe2/7YA r6qm5dkRHVIpR4OrH6UoWqEIllPsFkQCGdQhgOrU/U1GZ9d1/P8CQR7VJO1ESVCwDsca R+4dYDYwVD67E2fS9RmHH7SSoYNVc0lC538viRcVDV7+OQPbtS6dJPGUWOobmG/wRWTE EOtjlP+EPZUqVc1vSjyuVJb1fVnxbDpG/G2TjXezYIKe2k6h3DxFXK+IXjzJjelN0+mG 60XA== X-Gm-Message-State: AOAM5313Q7lqX6JwxqrH9p/X/p5qAs/MPOmbEi8o2L5fiLgYJtMrZOC9 EXofTmxyCcUnGkIaGjCfahTtC6+5HkYnyr+bXCvD1+Sd X-Google-Smtp-Source: ABdhPJw9MWtP/9HjNfeuFIm6FSiDgWovkjAtHRqkzDgeXulStW3i2xy9WQcJTb0ihyWhompflMHdGNtoVQE/sAR6H5M= X-Received: by 2002:a17:906:3456:: with SMTP id d22mr3995276ejb.655.1640211397285; Wed, 22 Dec 2021 14:16:37 -0800 (PST) MIME-Version: 1.0 References: <87wnjwso7p.fsf@localhost> In-Reply-To: From: Yasushi SHOJI Date: Thu, 23 Dec 2021 07:16:26 +0900 Message-ID: Subject: Re: exporter: How to get :file property on a src block in an exporter To: "Berry, Charles" 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=1640211451; 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=7xQ0faVMrFPStb9P0+AxWSg4VsU5Z91fAJNTR92Ja0U=; b=APXfeYvLq5G+a+0eu6EoeeflC218JoApnNLIGhlv4agPkDIICuaUxZ8U3SHzy/EAfQw+92 oLZD7UXhLMtTQJuKHyGEZIMM+5l89se/Iv5e+zydIcM72O9WuyqztxGj5hZkKIbf9UVZLZ zO8QJYbDeSuJlyzobkI1oJk9bYJ1BRZqQKbxyCw/zn9HUPdCHMX0alburJhS5qViC9g2bo lDuerP7aBt2WsPT0silvU2cLzYoRHxdkAUYqGFOpkoDBnaLYLmR+nTniNj72sqfZRiOGMI tOYCVttydpV73dqk1XITmf2D4VLhgF8wcornExyeK2sqZhIvNOl2PUlz397k4g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1640211451; a=rsa-sha256; cv=none; b=RZVFVQxPNVXIwg6IK0KVhlyegXJPM9fTgSvwOFLbEkG/JuQbc4OKRoj0ZG8DQWcPz8H6ds Pba90CDLfGuuxgzRd2QdbfNDasZ16bBBU1U83GNbJMlvsrNIcP+4mdRR1iCBGYo0Iwrra5 AiQkQi95a4HGVY3aI8EAelF0rLCik2ciuxFIYFlHjcDSb3NUTchuFkx7ybvOl+MIzcmgLG /7SQ0KJgPco2+t8EfhzS8B1y2qgZBUgcBSlo1d9+6dW48o5c1ptvYNFN0WbPjfy0W5JHiJ BHbqjZJTj4sHyuz34cOJ59jL1VsjnDbgKJbmm1DgGPitVauGFFFk1Pbi9p9FaA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=G3uG4vLH; 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=G3uG4vLH; 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: 1C1F1D42C X-Spam-Score: -4.24 X-Migadu-Scanner: scn0.migadu.com X-TUID: UYRnWrrIJk6X Hi, On Thu, Dec 23, 2021 at 3:22 AM Berry, Charles wrote: > > On Dec 22, 2021, at 8:07 AM, Yasushi SHOJI wrote: > > On Thu, Dec 23, 2021 at 12:52 AM Yasushi SHOJI wrote: > >> Then, why don't I have :file in the info? > > > > The :exports must be "file" to have the file name in the info. I used > > to have "code" because > > I wanted to export code with the file name as an attribute. > > I don't see that here: > > #+begin_src emacs-lisp :exports code :file abc > (assq :file (caddr (org-babel-get-src-block-info 'light))) > #+end_src > > #+RESULTS: > : (:file . abc) Indeed, this one works. But I don't see :file, or the whole :parameters in the info arg passed to my function. > `org-export-as' runs `org-babel-exp-process-buffer' *before* it parses the buffer and the header args get stripped from the copy buffer at that time. Would you mind telling me where the stripping part is in the code, and the reason why it strips? > So you need to find a way to get the :file header arg whilst babel runs and hang onto it for later use. I'm still learning but :parameters, which holds :file, are already gone from the info arg when org-myexporter-src-block is called. Thanks, -- yashi