Re: babel default header args as functions

2020-12-21 Thread Matt Huszagh
Bastien, Any chance you've had the time to look at this? I know how much time you put into org-mode, so no rush if you need more time! Let me know if there's anything I can do on my end. Thanks! Matt

Re: babel default header args as functions

2020-10-14 Thread Matt Huszagh
rey-coyrehourcq writes: > I'm unfamilliar with patch by mail but i try to apply your patch to my melpa > local org 9.4 version used by doom emacs. > Patch hang on Hunk #3, i attach the .rej file. You might need to start from a different org commit. I believe 6a182b690f works. Otherwise, you

Re: babel default header args as functions

2020-10-14 Thread rey-coyrehourcq
Hi Matt, I'm unfamilliar with patch by mail but i try to apply your patch to my melpa local org 9.4 version used by doom emacs. Patch hang on Hunk #3, i attach the .rej file. patch -p1 < 0001-ob-core.el-Add-ability-to-use-closures-as-default-he.patch File to patch: ob-core.el patching file

Re: babel default header args as functions

2020-10-14 Thread Matt Huszagh
rey-coyrehourcq writes: > I'm interested by this functionality, do you know if it was merged or i need > to apply patch locally ? Hi SR, This hasn't been merged yet. I believe it's ready, but we're just waiting on a maintainer to apply it upstream. If you're able to apply the patch locally

Re: babel default header args as functions

2020-10-14 Thread rey-coyrehourcq
Hi there, I'm interested by this functionality, do you know if it was merged or i need to apply patch locally ? Thanks Matt for your work, Best SR Le mercredi 09 septembre 2020 à 12:33 -0700, Tom Gillespie a écrit : > Hi Matt, >Looking good here. Thanks! > Tom > > On Wed, Sep 9, 2020 at

Re: babel default header args as functions

2020-09-09 Thread Tom Gillespie
Hi Matt, Looking good here. Thanks! Tom On Wed, Sep 9, 2020 at 12:06 PM Matt Huszagh wrote: > > Tom Gillespie writes: > > > [...] I have a number of use > > cases that I can imagine would benefit greatly from being able to > > define a :header-args: :header (lambda () "yay!") property as a >

Re: babel default header args as functions

2020-09-09 Thread Matt Huszagh
Bastien writes: > Also, if we integrate the change, `eval-default-headers' would be > better named `org-babel-eval-default-headers'. I've changed the function name to `org-babel-eval-headers'. The reason for dropping "default" is that this function is now used as part of

Re: babel default header args as functions

2020-09-09 Thread Matt Huszagh
Tom Gillespie writes: > [...] I have a number of use > cases that I can imagine would benefit greatly from being able to > define a :header-args: :header (lambda () "yay!") property as a > closure (and actually I assumed that it would just work that way if I > tried to do it, clearly not

Re: babel default header args as functions

2020-09-06 Thread stardiviner
Bastien writes: > Hi Matt, > > Matt Huszagh writes: > >> Matt Huszagh writes: >> >>> I've generated a patch for this. Please let me know your thoughts. I >>> believe this adds valuable flexibility to default header >>> arguments. >> >> I've added an additional fix that makes this work during

Re: babel default header args as functions

2020-09-06 Thread Tom Gillespie
Hi Bastien, Here are some examples that I have in mind. One example would be to simplify my hacked solution to from https://lists.gnu.org/archive/html/emacs-orgmode/2020-09/msg00175.html. I could apply that to all the headings in a subtree by defining it once in the property drawer. Another

Re: babel default header args as functions

2020-09-05 Thread Bastien
Thanks for weighing in into this discussion. Tom Gillespie writes: > I have a number of use > cases that I can imagine would benefit greatly from being able to > define a :header-args: :header (lambda () "yay!") property as a > closure Can you give some examples? I would love to get a better

Re: babel default header args as functions

2020-09-05 Thread Huszaghmatt
mailto:tgb...@gmail.com)> writes: > If the default header closures are being evaluated before checking > whether they have been superseded by the headers on a block then that > is incorrect and they should not be evaluated until it is clear that

Re: babel default header args as functions

2020-09-05 Thread Tom Gillespie
I think making the behavior of default arguments consistent with regular arguments is probably a good thing. I have a number of use cases that I can imagine would benefit greatly from being able to define a :header-args: :header (lambda () "yay!") property as a closure (and actually I assumed that

Re: babel default header args as functions

2020-09-05 Thread Bastien
Hi Matt, Matt Huszagh writes: > Matt Huszagh writes: > >> I've generated a patch for this. Please let me know your thoughts. I >> believe this adds valuable flexibility to default header >> arguments. > > I've added an additional fix that makes this work during export too. I would like to

Re: babel default header args as functions

2020-09-02 Thread Matt Huszagh
Matt Huszagh writes: > I've generated a patch for this. Please let me know your thoughts. I > believe this adds valuable flexibility to default header > arguments. I've added an additional fix that makes this work during export too. >From aec4e905d5d72f9a124adfde877835a783bd637b Mon Sep 17

Re: babel default header args as functions

2020-08-28 Thread Matt Huszagh
Matt Huszagh writes: > I've added the ability in my own configuration to use lambda functions > that evaluate to a string as babel default header arguments, instead of > just the plain strings currently allowed. Would anyone else be > interested in this feature? Shall I prepare a patch? > >