From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id Q9WHANDMNGEKGQEAgWs5BA (envelope-from ) for ; Sun, 05 Sep 2021 15:57:36 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id uEVNN8/MNGHWdAAAbx9fmQ (envelope-from ) for ; Sun, 05 Sep 2021 13:57:35 +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 21B201867 for ; Sun, 5 Sep 2021 15:57:35 +0200 (CEST) Received: from localhost ([::1]:53312 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mMseM-0005we-Aq for larch@yhetil.org; Sun, 05 Sep 2021 09:57:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43758) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mMsdY-0005wS-LY for emacs-orgmode@gnu.org; Sun, 05 Sep 2021 09:56:44 -0400 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]:35473) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mMsdW-0004g7-W0 for emacs-orgmode@gnu.org; Sun, 05 Sep 2021 09:56:44 -0400 Received: by mail-wm1-x330.google.com with SMTP id z9-20020a7bc149000000b002e8861aff59so3067243wmi.0 for ; Sun, 05 Sep 2021 06:56:41 -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=50V6LW7bLU+FMLMapofilHWCVaLZg4jFCR20Y1yCNZI=; b=X+DTtDnThcUf8mz8pkl9A0BRQsnTNnhZMJjjq+Anybruv/cGyOeDG84YFUeaAgOWwl DiHz/5SmraMiIMOffiHy07Kb5dbatYIoTqmg1SsCvDbjvkv7Agpgf8G/Y0CDtTv7Chvf pGTEKllG8tmZ6p+MnVON3UZ63CXnSU6jXMUjbexAL5Iy/w4nM2qgml8vojJuxYO5QHgZ 6qY7cyFiHdaj9a2Zoz99O8XAiqeAYvu9MEGN6173TaRlljn2vvJKiPibc4EELOhatPhv JWkko/dD8UxYgn4uE9WjYz0hriYJv3TUmU++l8yneE1QQFUSp0nQWim0i0uA0MjRGvCI urtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=50V6LW7bLU+FMLMapofilHWCVaLZg4jFCR20Y1yCNZI=; b=ebyFbKi57w3IR3t5PArGk02map1NitOeIYN3AzuD2kWY6uh7QbPDlEfXEOZD5i2I1k wYly9VA9RX6rsL2Gsp7pKdHVX2DXyIDjetyXiBWMi2G9mcis6gAPAb7VSWppVkgI/SAB i5S39KLy3OoCyHUDbww97PGQ01RZgyCvomOgb5ypwdyokqSSeMV0PT9eTrfvkOvJvZ3E gGRoiNfIs1+xkBNLQI1xRtGGZrEYwi2AMW0TWC7N/rtX4qpZ2DxDr2UgZRKeLQ5LSCYy RQhyZGiV9wqgERRu8OIHf2vl/+BRyjz0teZYeOKfDd/B39PYPtn1Fvgl3tLplbNLKbcz O6IQ== X-Gm-Message-State: AOAM53104ddxsK3Tis54K2ev2tn03vjVsaErk6mSmptD39hS1oeiwiAh gUzPZmFQIP38V3P5s0AZ6ikZrbOEPzFksvT50G73tA== X-Google-Smtp-Source: ABdhPJxul3LLzbpy0Arkc4VGRmlgFEtKP3FV58GtgaENoy6aGvuECopxqf7tAfYtBMDbCvlLORYymkGg7oIyOV6+rsU= X-Received: by 2002:a05:600c:4999:: with SMTP id h25mr7126286wmp.175.1630850200501; Sun, 05 Sep 2021 06:56:40 -0700 (PDT) MIME-Version: 1.0 References: <981938.1630590273@apollo2.minshall.org> <87czpqjqvw.fsf@localhost> <877dfvw41u.fsf@localhost> In-Reply-To: <877dfvw41u.fsf@localhost> From: Ryan Scott Date: Sun, 5 Sep 2021 06:56:30 -0700 Message-ID: Subject: Re: [PATCH] Re: New source block results option for attaching file to node To: Ihor Radchenko Content-Type: multipart/alternative; boundary="000000000000e2167c05cb3fe60e" Received-SPF: none client-ip=2a00:1450:4864:20::330; envelope-from=ryan@vicarious-living.com; helo=mail-wm1-x330.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=1630850255; 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=50V6LW7bLU+FMLMapofilHWCVaLZg4jFCR20Y1yCNZI=; b=JfgrlCGSFyoTgXYk1WbiP17MoikOcrIV9eGJX98hzvr+v9ij61Y1lBAKI1G4pfvgKhFWx7 UrrIBEM79C0FmXnu1SIvpmUieJyL0W+hw1GnLFDmbzIf+6DvL+r5Tv7yclX9R+chTamDy9 4VnvrGq1A9wt7NDQVPY0xT4b04oDfMNRBjM3bNp0znkmIMk0s3nTxExwbwDnxjW0+iGFym 8KhyMdMziwZo/xCLpou1osB29GCpM+u3YgWgty0efCHxQ5kInqOXMEDhDt9adkqekBCV8X ZO/2l6nuoTqJPdlNvuG4Pcsy6Z7sQ0JvAthXZYnCTimqvHQQ+BxWho+kYyT9EA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1630850255; a=rsa-sha256; cv=none; b=fvNCrfQwK3SW0d1T2Z8n1oYO/i7ff3b8LIw7AKurheDT33erf764KEvRJHlPJziz78gnR8 i1GE7K6QAkcaFzDrvqCkKsdE8z9qbPB2rutORiTPfEBAHBkFrsgYGdsnoljXKFkPbXU9X6 Fqx+xJ0knA7cVIz736Fn7uFmReJmkL187NYoS0k7UfPRP1VYiEKnCo+hFcWu3n0Do25hrR U4yhYOBtbzxWhwyQvUSxF/ApMY512Xtf2RwQ54OndNdXYgMiOvA1sSsL1tifFJRdtqK65Z bApV9Pl/j4KK6S0vYoz81nj3CrgCwTUK1QKADdMcU3bS2zICe75ep8tpk4iARA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=vicarious-living-com.20150623.gappssmtp.com header.s=20150623 header.b=X+DTtDnT; 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: -2.61 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=vicarious-living-com.20150623.gappssmtp.com header.s=20150623 header.b=X+DTtDnT; 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: 21B201867 X-Spam-Score: -2.61 X-Migadu-Scanner: scn1.migadu.com X-TUID: fep0a/NkD6HL --000000000000e2167c05cb3fe60e Content-Type: text/plain; charset="UTF-8" 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 > --000000000000e2167c05cb3fe60e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Yeah your second example is what I'm thinking. It mak= es this all a fairly concise extension of that existing mechanism and does = away with the file move after execution.=C2=A0

On Sun, Sep 5, 2021, 06:21 Ih= or Radchenko <yantar92@gmail.com> wrote:
Ryan Scott <ryan@vicarious-living.com> 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
--000000000000e2167c05cb3fe60e--