[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: New source block results option for attaching file to node

From: Ryan Scott
Subject: Re: New source block results option for attaching file to node
Date: Tue, 31 Aug 2021 12:43:22 -0700

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 <tecosaur@gmail.com> wrote:

Hi Ryan,

Thanks for submitting your first patch to Org! 🎉

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? Would you mind expanding on this use case? Oh, and org-attach-dir doesn’t show up a function or variable for me, I take it you meant something else?

Lastly, with your commit message, you’ve clearly looked at the requested commit message format 😊. There’s the odd typo (“theh”) and the line length is too long. It’s 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,

From: Ryan Scott
Subject: New source block results option for attaching file to node
To: emacs-orgmode@gnu.org
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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]