From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id UIIeI5aGLmFkOgAAgWs5BA (envelope-from ) for ; Tue, 31 Aug 2021 21:44:22 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id 8CehHpaGLmFuYwAAB5/wlQ (envelope-from ) for ; Tue, 31 Aug 2021 19:44: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 9AB2F28502 for ; Tue, 31 Aug 2021 21:44:21 +0200 (CEST) Received: from localhost ([::1]:60578 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mL9gC-000082-KG for larch@yhetil.org; Tue, 31 Aug 2021 15:44:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50846) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mL9fV-00007t-59 for emacs-orgmode@gnu.org; Tue, 31 Aug 2021 15:43:37 -0400 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]:54946) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mL9fS-0003Xw-Vu for emacs-orgmode@gnu.org; Tue, 31 Aug 2021 15:43:36 -0400 Received: by mail-wm1-x330.google.com with SMTP id g138so176668wmg.4 for ; Tue, 31 Aug 2021 12:43:33 -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=eKjdqz3e7AoE12k6WXlf27CRyQkotWJZ2EEi7WbDgNA=; b=pLqAXY2WTJPkoXpf9ZZZXjcVW/uY88TlWj7ed919QoZy0rkUGL2qLu8i5dBJMLnN4U AGPn5FCYCdkO1mNHMBfIlx63xfiRDVuN3J4HZ6PRjyXgCcDdCqmaKOEGxemV4PiDQpNk KnKNgrvW1n/e0bb2nEEgzwFoAGgg4Ft3sQYWtYV27DuqJQ/9WAxfwl0JXIKExycHKjUa s+ObSnSM53t46JwfYH7yY+kjfLLSfT5zoO4FGBWA6mPkpKMDtzXAXYhEHdwlpIwI32HV 7uwnzmQ0ktpvu0LsNA2ipS09oqIDn2xPjPpK6D6AUA+q630SD4dufFbYtePd+XS3TDOf /ENw== 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=eKjdqz3e7AoE12k6WXlf27CRyQkotWJZ2EEi7WbDgNA=; b=mRyi0Dak+z0ARf3r7t8uRJqq0uHZTQei2fYmJayzcHdIPtAwpY5m5UPjxdo2GSxrO7 qcXXKRnhd22OMy7pwQsg5T3FUR6SnniWlhjhVdnsObvdblgEQvs9fLWNWDEvoJbW5uK3 NmJK42nW4bKeRbAeWHwMIYNBUlSWBcsiMjWyWp08SWC7FcJ4kjvelvppCraVyC4s6M+8 ZfZVyQ1RmugXkpYMw8EseDLtmGiddUxpOMKGUdKPSA5xYkvyWQW7gIuboRABt8vstoto TxyTjKg5+7qdMzkSBEoXpqGw/DWT8vjH4XX/9srBqcOqK1Z1xDKJptI6dsLEQPNEc6x9 y1jw== X-Gm-Message-State: AOAM531D67ka/+BBzY+YmJ+lMcFxwF+2dk4Ye3FBUMXfjoqRux7SMOqG sKwV5nMMfFkotaVjy8+CUwws8KY/b8ifimWQMBEtsg== X-Google-Smtp-Source: ABdhPJxxlepYIyuaN/ny1jZKgGCip9jYJokNvE1yI7Iza3ZA4ozSQm3sdKmzt3oHfHuYIUqHaMpHUzl2TSlUuTaVY0w= X-Received: by 2002:a7b:c4d2:: with SMTP id g18mr5863427wmk.135.1630439012787; Tue, 31 Aug 2021 12:43:32 -0700 (PDT) MIME-Version: 1.0 References: <878s0hq2kc.fsf@gmail.com> In-Reply-To: <878s0hq2kc.fsf@gmail.com> From: Ryan Scott Date: Tue, 31 Aug 2021 12:43:22 -0700 Message-ID: Subject: Re: New source block results option for attaching file to node To: Timothy Content-Type: multipart/alternative; boundary="0000000000002f789705cae02a3f" 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: emacs-orgmode@gnu.org 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=1630439061; 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=eKjdqz3e7AoE12k6WXlf27CRyQkotWJZ2EEi7WbDgNA=; b=DPchxZSKL68jZFPmW7kT1/iIvM7vapHW7kl424+F71EJqTngm4MB7qwcFCgJDB9JHXF4Rd S4ceBQe/EjiQCJ/A2ErLNgHsadnV25lPmbOYnATOwrrevBa8rGPq3+ZDSjznLyqdDp/NT+ honSL0sVLW6JB4dN6RiQu+hHS3QH06LL727lk1WbArh9DM2PPWzfTF1FM+2UnRPueVrFhy 8+QFRnco769rdyRGhLfX7KT/4kFCY7Y0UCtsfKkFH9OUaqXAUm+55qnzLAx2Kf5Y4ll7Tr PgS/HElnEdBckZ+WLFbfzHo4CatOx4qr8d7BACgBktxI/4Cubmehp5p9JONjZw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1630439061; a=rsa-sha256; cv=none; b=I+vFRDRRsByf2r4et3u9n8lqeMxSQ9tKvroZdqEQiw4nvKFR660JMY1c+aSpBdpOCx8VX2 S4g3vRgNLvOMRGI6gmdu1Z4vC1A8Nqw5m0zaRJuOfGiOuLyd13BWo4TWWj0dCKK61ScgWj DBdSx1QikCm3YCS8fx8UKNhtra0ZNJCy/u0qGc+pq8fGPobnvMgB/JGUlne5Ss2TOI3+fk Q2bToTA3Itau7f1uX5/gP2eGRXNxWWtu/1sM9kj7ooM9xeAI2zbXYR5WkKVHxPP9D45N4Z 4Yobe8642LsYA3YLiZU3GW/D1cc/2QPhqw21XaAOIYIrM0n1asHWSnvAIxpoGg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=vicarious-living-com.20150623.gappssmtp.com header.s=20150623 header.b=pLqAXY2W; 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.62 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=vicarious-living-com.20150623.gappssmtp.com header.s=20150623 header.b=pLqAXY2W; 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: 9AB2F28502 X-Spam-Score: -2.62 X-Migadu-Scanner: scn0.migadu.com X-TUID: N7FDMSNVEL9K --0000000000002f789705cae02a3f Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Great. Yeah I tried to adhere to the commit format the best I could. org-attach-dir is a function for me (latest org pulled using straight.el) org/lisp/org-attach.el:327. The primary use case is src blocks that generate files, in my case usually gnuplot or graphviz, and return a file path. With a collection of org files in a directory, organization can get messy, and creating an organizational scheme essentially recreates the attachment directory design. Another approach would be to instead only modify org to have hooks (or any other callback mechanism really) that are run on link insertion and have access to the result-params for the block. The rest of this could then be a separate package easily enough. Would that be a better approach as it would allow the org core to not be so tightly coupled to org-attach? I'm using magit; I just don't normally restrain myself to the line length. I'll make sure to do that for submitted patches here. In terms of this mailing list and overall contribution process, how best to remedy things for the patch? Just modify it and reply with the modified patch as an attachment? On Tue, Aug 31, 2021 at 4:24 AM Timothy wrote: > Hi Ryan, > > Thanks for submitting your first patch to Org! =F0=9F=8E=89 > > Regarding the purpose of the patch, I take it this is useful with source > blocks that return a file patch and should be added as an attachment? Wou= ld > you mind expanding on this use case? Oh, and org-attach-dir doesn=E2=80= =99t show > up a function or variable for me, I take it you meant something else? > > Lastly, with your commit message, you=E2=80=99ve clearly looked at the re= quested > commit message format =F0=9F=98=8A. There=E2=80=99s the odd typo (=E2=80= =9Ctheh=E2=80=9D) and the line length > is too long. It=E2=80=99s good if you hard line-wrap to 72 characters (if= you use > Magit, this should happen automatically FYI). Other than that it looks > good to me. > > All the best, > *Timothy* > > * From*: Ryan Scott <%22Ryan+Scott%22+%3Cryan@vicarious-living.com%3E> > * Subject*: New source block results option for attaching file to node > * To*: emacs-orgmode@gnu.org > <%22emacs-orgmode@gnu.org%22+%3Cemacs-orgmode@gnu.org%3E> > * Date*: Thu, 26 Aug 2021 16:48:50 +0800 > An additional option for use with ":results file" that moves the returned > path to the node attachment directory (as returned by org-attach-dir), > creating it if necessary. > > First time submitting a patch. Any feedback is appreciated. > > -ryan > > --0000000000002f789705cae02a3f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Great. Yeah I tried to adhere to the commit format th= e best I could.
org-attach-dir is a function for me (latest org p= ulled using straight.el) org/lisp/org-attach.el:327.

The primary use case is src blocks that generate files, in my case usual= ly gnuplot or graphviz, and return a file path. With a collection of org fi= les in a directory, organization can get messy, and creating an organizatio= nal scheme essentially recreates the attachment directory design.
=

Another approach would be to instead only modify org to= have hooks (or any other callback mechanism really) that are run on link i= nsertion and have access to the result-params for the block. The rest of th= is could then be a separate package easily enough. Would that be a better a= pproach as it would allow the org core to not be so tightly coupled to org-= attach?

I'm using magit; I just don't = normally restrain myself to the line length. I'll make sure to do that = for submitted patches here.

In terms of this maili= ng list and overall contribution process, how best to remedy things for the= patch? Just modify it and reply with the modified patch as an attachment?<= br>

On Tue, Aug 31, 2021 at 4:24 AM Timothy <tecosaur@gmail.com> wrote:

Hi Ryan,

Thanks for submitting your first patch to Org! =F0=9F=8E=89

Regarding the purpose of the patch, I take it this is useful with source bl= ocks that return a file patch and should be added as an attachment? Would you mi= nd expanding on this use case? Oh, and org-attach-dir doesn=E2=80=99t show up a function or variable for me, I take it you meant something else?

Lastly, with your commit message, you=E2=80=99ve clearly looked at the requ= ested commit message format =F0=9F=98=8A. There=E2=80=99s the odd typo (=E2=80=9Ctheh=E2= =80=9D) and the line length is too long. It=E2=80=99s good if you hard line-wrap to 72 characters (if you use = Magit, this should happen automatically FYI). Other than that it looks goo= d to me.

All the best,
Timothy<= /b>

An additional option for use with ":results file= " that moves the returned path to the node attachment directory (as re= turned by org-attach-dir), creating it if necessary.

First time submitting a patch. Any feedback is appreciated.
-ryan

--0000000000002f789705cae02a3f--