emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ryan Scott <ryan@vicarious-living.com>
To: Timothy <tecosaur@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: New source block results option for attaching file to node
Date: Tue, 31 Aug 2021 12:43:22 -0700	[thread overview]
Message-ID: <CAHBUXNzMthWng_U69jmPXK9FCWH7_nR5_-ntd4m2c8xj=3ccWA@mail.gmail.com> (raw)
In-Reply-To: <878s0hq2kc.fsf@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2521 bytes --]

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,
> *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
>
>

[-- Attachment #2: Type: text/html, Size: 5289 bytes --]

  reply	other threads:[~2021-08-31 19:44 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-26  8:48 New source block results option for attaching file to node Ryan Scott
2021-08-31 11:15 ` Timothy
2021-08-31 19:43   ` Ryan Scott [this message]
2021-09-01 14:45     ` Ihor Radchenko
2021-09-01 20:01       ` Ryan Scott
2021-09-02  7:40         ` [PATCH] " Ryan Scott
2021-09-02 13:44           ` Greg Minshall
2021-09-03  3:10             ` Ihor Radchenko
2021-09-03  3:28               ` Ryan Scott
2021-09-05 13:22                 ` Ihor Radchenko
2021-09-05 13:56                   ` Ryan Scott
2021-09-10  1:04                     ` Ryan Scott
2021-09-10  6:26                       ` Timothy
2021-10-02  8:32                       ` Ihor Radchenko
2021-10-02  9:39                         ` Ryan Scott
2021-10-05  0:04               ` Christopher M. Miles
2021-10-05  1:05                 ` Ryan Scott
2021-10-08  1:22                   ` Christopher M. Miles
2021-11-05  7:16                   ` Ryan Scott
2022-04-21 12:47                     ` Ihor Radchenko
2022-04-21 17:29                       ` Ryan Scott
2022-04-22  6:02                         ` Ihor Radchenko
2022-04-22  6:19                           ` Ryan Scott
2022-06-10  8:06                             ` Ryan Scott
2022-06-11  4:32                               ` Ihor Radchenko
2022-06-11  7:47                                 ` Ryan Scott
2022-06-11 12:49                                   ` Ihor Radchenko
2022-06-12  0:47                                     ` Ryan Scott
2022-06-14  4:11                                       ` Ihor Radchenko
2022-06-14  5:55                                         ` Ryan Scott
2022-06-14  9:04                                           ` Ryan Scott
2022-06-14 13:48                                             ` Ihor Radchenko
2022-06-14 18:23                                               ` Ryan Scott
2022-06-11 12:51                                   ` Ihor Radchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAHBUXNzMthWng_U69jmPXK9FCWH7_nR5_-ntd4m2c8xj=3ccWA@mail.gmail.com' \
    --to=ryan@vicarious-living.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=tecosaur@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).