From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 8VarMYmvOmG5KgAAgWs5BA (envelope-from ) for ; Fri, 10 Sep 2021 03:06:17 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id sM+ULImvOmF6VQAAbx9fmQ (envelope-from ) for ; Fri, 10 Sep 2021 01:06:17 +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 EBBE31CAEF for ; Fri, 10 Sep 2021 03:06:16 +0200 (CEST) Received: from localhost ([::1]:40654 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mOUzf-0002p0-BD for larch@yhetil.org; Thu, 09 Sep 2021 21:06:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60870) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mOUxt-0002md-V8 for emacs-orgmode@gnu.org; Thu, 09 Sep 2021 21:04:25 -0400 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]:38436) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mOUxr-0007Rh-My for emacs-orgmode@gnu.org; Thu, 09 Sep 2021 21:04:25 -0400 Received: by mail-wr1-x436.google.com with SMTP id u16so228519wrn.5 for ; Thu, 09 Sep 2021 18:04:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vicarious-living-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ekIoBvC2awrlC6De0EvNgFjpKnADtvmhloZs/bzIDrU=; b=FtnwIOaaAdG4xwudrZLQyzHfec23G3Tc3ZUNo9udk+PVjM/vAK37XqZUzs3pC0RiI9 NGlk9PIjbJBXDwWEbQoQ5/DKl7gXIhogDmjQ0tKCxAQtjOJ395Tfbv+RAac+ossv5TeS mDWfdFxoH8vlDFRRmU/zkuw45lmLy3aJ2dTomnP7UvcaONLNTxzLnUAyO8cHwP1AaaP5 Xr4XY24APxpQcgfPxuhDwc5cUrBgS5hILrmb+5NRzPmDtvcx1U6a9FY294goYmplddKc 1qaQHu574LD9i44uqw/hQa40gbA1Zf5scOrr5Sw48pCPbT881BlurgHxTuGhfkvtHQ5a ik3Q== 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=ekIoBvC2awrlC6De0EvNgFjpKnADtvmhloZs/bzIDrU=; b=jS8P4Hnv9ljvI6K+/9ISaaUw0UxWUl94hrPDCNTRocQV3mVvnsTZ9XI85TII+rLJcd vq+9InygAlCG7dyeo7TNZsDR6WREROMiF6UZNaVjNxcZ+bNQA4lwa+93pFTl3pUgnBJw AwBNhlOsmIqrIwUdGDOd/0JL02MVq18OvFsgEvtw+JHVuYQBB8b4VAJKJohQLUoJ+Gvn MG7rO0xevDGiR9+najprGPMZvbznT7l6px2yNTdHsjZ8gr2fiD6BP1KsJvMWGK8MmfJ3 iBuTPg9aJrqkFX6niF03RdvWwVYT+hD6gQC6zTA363ff32IxWbZOlO0m84/lvODHEGJt BzsQ== X-Gm-Message-State: AOAM53196J17XCoKQTcsbEW5MUtpwZhvVnk4OGvPfs4pspoDJrMr7TmV 4kKVdpFlTcLDkhKpToYFba3KPe3pRhYLFpl07yIkTg== X-Google-Smtp-Source: ABdhPJziR6zgOukvu8GnlK2TQhIecSjY47RuivlAAFGIqz3UiusZrNkftOaBrrwiIH9QAs7AZm7a9R8Oi6sC11MlhTU= X-Received: by 2002:adf:a197:: with SMTP id u23mr6588995wru.253.1631235861438; Thu, 09 Sep 2021 18:04:21 -0700 (PDT) MIME-Version: 1.0 References: <981938.1630590273@apollo2.minshall.org> <87czpqjqvw.fsf@localhost> <877dfvw41u.fsf@localhost> In-Reply-To: From: Ryan Scott Date: Thu, 9 Sep 2021 18:04:10 -0700 Message-ID: Subject: Re: [PATCH] Re: New source block results option for attaching file to node To: Ihor Radchenko Content-Type: multipart/mixed; boundary="000000000000110bd105cb99b21b" Received-SPF: none client-ip=2a00:1450:4864:20::436; envelope-from=ryan@vicarious-living.com; helo=mail-wr1-x436.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Greg Minshall , emacs-orgmode@gnu.org, Timothy Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1631235977; 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=q09OVzlwdPC6dI0dAelMJdtIYGNrJn2KBibJSUVQ8m8=; b=QQMoiVsCtrwP7wtc9YGW41iUCpnPzLrzOvmOT/ke7qCvxpEjnEw5fB/WDD+bQj59Xi5dWF v2c9Ck2n6m7bebh//EEp3vyzgCXZAVw8n1+lL30VxyEQoSUd+qJinfRSd2lQ2XsI1VpS9X t10q05HxXGOGWMi7RyXB+biX6xdOmML3H6/70/WGV0ja+aoiAbRLDxKWo1iBTo2UoKN20A EhmW1bdVoZn8hzwuQoq9E3snDpyfyUG0iaOcp6gxR7+XgkV1riB/Vlpm4mXXyTjbUJQagI vcEv/RPyQp9IbiYZIrA/szd86BZSwl6/BJrCJNGMw8nuR2fj/68eHk4CpIFYfQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1631235977; a=rsa-sha256; cv=none; b=Qxvqhf46NKbkbu+TWkk2rZQIZ0dBDE6FnA58StgbD9KD8Wwo5HW1a1i6eKdcvKnk+rnJZO JLZhxRDSXneKrmADBjgZfU1KR4lXm5Hm0nHOg/8E2usT/L8IybA8TpRlKotROtedQt0owO XwobApPK6csT+Zyj5uPQqGYdEKIldBavNvwunXV1NCphsRBsIVpk7uC6FzaT9M+ey+rzjb bQArG/sZYM07TTe0rId8TaZDv7MndpC/lCkuwyVTYOVQ0tpruXhZhvKCE6q92utjlWcGTz jwVuqxo2e48VMVwfcozz0doMBvj4A2osBtGYBNVWgRF7J7p+ALbGAem6ftq1mg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=vicarious-living-com.20150623.gappssmtp.com header.s=20150623 header.b=FtnwIOaa; dmarc=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -1.41 Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=vicarious-living-com.20150623.gappssmtp.com header.s=20150623 header.b=FtnwIOaa; dmarc=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: EBBE31CAEF X-Spam-Score: -1.41 X-Migadu-Scanner: scn0.migadu.com X-TUID: 0G/TTCR9XIv4 --000000000000110bd105cb99b21b Content-Type: multipart/alternative; boundary="000000000000110bcf05cb99b219" --000000000000110bcf05cb99b219 Content-Type: text/plain; charset="UTF-8" Okay, Had some time to put into this. Much happier with this approach as it doesn't require any file moving and generally leaves src blocks to their own devices. The short version is that specifying ":dir 'attach" for a block uses the directory from (org-attach-dir) as its working directory and any generated path that is a descendant of that directory will be converted to an "attachment:" link. ob-core.el/babel: Special handling for attachment links in src blocks * ob-core.el (org-babel-execute-src-block): Specifying the symbol 'attach` as the value of the `:dir' header now functions as ":dir (org-attach-dir)" (org-babel-result-to-file): Optional `TYPE' argument accepts symbol 'attachment` to fixup up paths under `DEFAULT-DIRECTORY' and use the link type "attachment:" when that is detected. (org-babel-insert-result): Pass symbol `attachment' as `TYPE' to `org-babel-result-to-file' when header `:dir' is set to symbol `attach' (org-babel-load-in-session, org-babel-initiate-session) ":dir 'attach" sets `default-directory' with "(org-attach-dir t)" * org-attach.el (org-attach-dir): Added autoload header to simplify dependencies necessary to support this feature (called in `org-babel-execute-src-block'). On Sun, Sep 5, 2021 at 6:56 AM Ryan Scott wrote: > Yeah your second example is what I'm thinking. It makes this all a fairly > concise extension of that existing mechanism and does away with the file > move after execution. > > On Sun, Sep 5, 2021, 06:21 Ihor Radchenko wrote: > >> Ryan Scott writes: >> >> > It might make sense to fix up inserted "file:" links that are under the >> > attachment directory to be "attachment:" style links by default anyway, >> no? >> > Then just being able to set the working directory to the attachment >> > directory easily would get the rest of the way there. >> >> I am not sure. If the user explicitly states that :dir is the attachment >> dir, it would make sense. However, what if the :dir is set explicitly >> like below? >> >> * Headline >> :PROPERTIES: >> :DIR: /actual/literal/path/to/attachment/dir >> :END: >> >> #+begin_src emacs-lisp :dir /actual/literal/path/to/attachment/dir >> ... >> >> #+RESULTS: >> attachment:... >> >> The results will be indeed inside the attachment directory. However, the >> :DIR: property may be changed at some point and the existing attachment: >> link will not point to real file. >> >> > So I suppose that would then mean having the :dir header accept the >> symbol >> > `attach' or something like that? >> > I'll play around and see what that looks like. >> >> The above example should lead to more expected behaviour if the user >> explicitly states that :dir is the attachment dir (even if it is going >> to be changed in future): >> >> * Headline >> :PROPERTIES: >> :DIR: /actual/literal/path/to/attachment/dir >> :END: >> >> #+begin_src emacs-lisp :dir 'attach >> ... >> >> #+RESULTS: >> attachment:... >> >> Best, >> Ihor >> > --000000000000110bcf05cb99b219 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Okay, Had some time to put into this. Much happier wi= th this approach as it doesn't require any file moving and generally le= aves src blocks to their own devices.
The short version is that s= pecifying ":dir 'attach" for a block uses the directory from = (org-attach-dir) as its working directory and any generated path that is a = descendant of that directory will be converted to an "attachment:"= ; link.

ob-core.el/babel: Special handling for att= achment links in src blocks

* ob-core.el (org-= babel-execute-src-block): Specifying the symbol
'attach` as the valu= e of the `:dir' header now functions as
":dir (org-attach-dir)&= quot;
(org-babel-result-to-file): Optional `TYPE' argument accepts s= ymbol
'attachment` to fixup up paths under `DEFAULT-DIRECTORY' a= nd use the
link type "attachment:" when that is detected.
(= org-babel-insert-result): Pass symbol `attachment' as `TYPE' to
= `org-babel-result-to-file' when header `:dir' is set to symbol
`= attach'
(org-babel-load-in-session, org-babel-initiate-session) &quo= t;:dir 'attach"
sets `default-directory' with "(org-at= tach-dir t)"
* org-attach.el (org-attach-dir): Added autoload heade= r to simplify
dependencies necessary to support this feature (called in<= br>`org-babel-execute-src-block').

On Sun, Sep 5, 2021 at 6:56= AM Ryan Scott <ryan@vicari= ous-living.com> wrote:
Yeah your second example is what I'm th= inking. It makes this all a fairly concise extension of that existing mecha= nism and does away with the file move after execution.=C2=A0

On Sun, Sep 5, = 2021, 06:21 Ihor Radchenko <yantar92@gmail.com> wrote:
Ryan Scott <ryan@vicarious-living.c= om> writes:

> It might make sense to fix up inserted "file:" links that ar= e under the
> attachment directory to be "attachment:" style links by defa= ult anyway, no?
> Then just being able to set the working directory to the attachment > directory easily would get the rest of the way there.

I am not sure. If the user explicitly states that :dir is the attachment dir, it would make sense. However, what if the :dir is set explicitly
like below?

* Headline
:PROPERTIES:
:DIR: /actual/literal/path/to/attachment/dir
:END:

#+begin_src emacs-lisp :dir /actual/literal/path/to/attachment/dir
...

#+RESULTS:
attachment:...

The results will be indeed inside the attachment directory. However, the :DIR: property may be changed at some point and the existing attachment: link will not point to real file.

> So I suppose that would then mean having the :dir header accept the sy= mbol
> `attach' or something like that?
> I'll play around and see what that looks like.

The above example should lead to more expected behaviour if the user
explicitly states that :dir is the attachment dir (even if it is going
to be changed in future):

* Headline
:PROPERTIES:
:DIR: /actual/literal/path/to/attachment/dir
:END:

#+begin_src emacs-lisp :dir 'attach
...

#+RESULTS:
attachment:...

Best,
Ihor
--000000000000110bcf05cb99b219-- --000000000000110bd105cb99b21b Content-Type: application/octet-stream; name="0001-ob-core.el-babel-Special-handling-for-attachment-lin.patch" Content-Disposition: attachment; filename="0001-ob-core.el-babel-Special-handling-for-attachment-lin.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_ktdnpb920 RnJvbSA0ZDQ4OWRhNjZjZjZmNGQ0NGEzMjBlMmQzY2NiNzAyNWFhOGFkYTZkIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiAiUnlhbiBDLiBTY290dCIgPHJ5YW5ANXBtY2FzdWFsLmNvbT4K RGF0ZTogVGh1LCA5IFNlcCAyMDIxIDE3OjE5OjM0IC0wNzAwClN1YmplY3Q6IFtQQVRDSF0gb2It Y29yZS5lbC9iYWJlbDogU3BlY2lhbCBoYW5kbGluZyBmb3IgYXR0YWNobWVudCBsaW5rcyBpbgpz cmMgYmxvY2sKCiogb2ItY29yZS5lbCAob3JnLWJhYmVsLWV4ZWN1dGUtc3JjLWJsb2NrKTogU3Bl Y2lmeWluZyB0aGUgc3ltYm9sCidhdHRh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2F0dGFjaG1lbnQpKQorICAgICAgICAgICAoYXR0YWNoLWRpci1sZW4gKHdoZW4gcmVxdWVz dC1hdHRhY2htZW50IChsZW5ndGggZGVmYXVsdC1kaXJlY3RvcnkpKSkKKyAgICAgICAgICAgKGlu LWF0dGFjaC1kaXIgKHdoZW4gKGFuZCByZXF1ZXN0LWF0dGFjaG1lbnQgKD4gKGxlbmd0aCByZXN1 bHQtZmlsZS1uYW1lKSBhdHRhY2gtZGlyLWxlbikpCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgKHN0cmluZz0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHN1YnN0cmluZyByZXN1 bHQtZmlsZS1uYW1lIDAgYXR0YWNoLWRpci1sZW4pCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIGRlZmF1bHQtZGlyZWN0b3J5KSkpKQorICAgICAgKGZvcm1hdCAiW1slczolc10lc10iCisg ICAgICAgICAgICAgIChwY2FzZSB0eXBlCisgICAgICAgICAgICAgICAgKCdhdHRhY2htZW50ICJh dHRhY2htZW50IikKKyAgICAgICAgICAgICAgICAoXyAiZmlsZSIpKQorICAgICAgICAgICAgICAo aWYgKGFuZCByZXF1ZXN0LWF0dGFjaG1lbnQgaW4tYXR0YWNoLWRpcikKKyAgICAgICAgICAgICAg ICAgIChmaWxlLXJlbGF0aXZlLW5hbWUgcmVzdWx0LWZpbGUtbmFtZSkKKwkgICAgICAgIChpZiAo YW5kIGRlZmF1bHQtZGlyZWN0b3J5CisJCSAgICAgICAgIGJhc2UtZmlsZS1uYW1lIHNhbWUtZGly ZWN0b3J5PykKKwkJICAgIChpZiAoZXEgb3JnLWxpbmstZmlsZS1wYXRoLXR5cGUgJ2FkYXB0aXZl KQorCQkgICAgICAgIChmaWxlLXJlbGF0aXZlLW5hbWUKKwkJICAgICAgICAgcmVzdWx0LWZpbGUt bmFtZQorICAgICAgICAgICAgICAgICAgICAgICAgIChmaWxlLW5hbWUtZGlyZWN0b3J5CisJCQkg I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