[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Add light argument to org-babel-lob-get-info
From: |
Ferdinand Pieper |
Subject: |
Re: [PATCH] Add light argument to org-babel-lob-get-info |
Date: |
Tue, 18 Oct 2022 18:15:31 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
Ihor Radchenko <yantar92@posteo.net> writes:
> I'd prefer to change LIGHT to NO-EVAL, including in
> org-babel-get-src-block-info. Changing argument name in function does
> not affect its caller in any way. Just need to update the function body
> and docstring carefully.
>
> NO-EVAL is already used by org-babel-parse-header-arguments and
> org-babel-params-from-properties.
I also prefer the NO-EVAL naming. I updated the patch to use no-eval and also
added a second patch to rename the light argument of
org-babel-get-src-block-info and all its occurrences (I changed the 'light to
'no-eval in all its calls only for consistency and future proofing reasons,
altough it is unnecessary right now). Feel free to squash them into one commit.
I was not sure wether one or two commits would be preferred.
> May I know if you are proposing this for a specific purpose?
Thanks for asking. I use it in a function that creates quasi unique names
similar to org-babel-temp-file. But instead of random names it uses the source
block content and header info to create a unique hash. This makes it very easy
to create unique but from call to call consistent filenames in header
arguments, when you don't want to worry about the filename, but also don't want
to clutter your result directory (especially if its not /tmp) or care about
constant filenames, e.g. for linking. Without the no-eval/light argument the
hash generation gets stuck in a recursive loop. I attached the functions for
reference.
If there is wider interest in this, these could be added to org either as a
variant of org-babel-temp-file or as an extension.
0001-org-babel-lob-get-info-Add-no-eval-argument.patch
Description: Text Data
0002-org-babel-get-src-block-info-Rename-light-argument.patch
Description: Text Data
org-babel-src-block-temp-file.el
Description: application/emacs-lisp
- [PATCH] Add light argument to org-babel-lob-get-info, Ferdinand Pieper, 2022/10/16
- Re: [PATCH] Add light argument to org-babel-lob-get-info, Ihor Radchenko, 2022/10/17
- Re: [PATCH] Add light argument to org-babel-lob-get-info,
Ferdinand Pieper <=
- Re: [PATCH] Add light argument to org-babel-lob-get-info, Ihor Radchenko, 2022/10/19
- Possible bugs in org-babel-temp-stable-file (was: [PATCH] Add light argument to org-babel-lob-get-info), Ferdinand Pieper, 2022/10/22
- Re: Possible bugs in org-babel-temp-stable-file (was: [PATCH] Add light argument to org-babel-lob-get-info), Ihor Radchenko, 2022/10/23
- Re: Possible bugs in org-babel-temp-stable-file, Ferdinand Pieper, 2022/10/23
- Re: Possible bugs in org-babel-temp-stable-file, Ihor Radchenko, 2022/10/24
- Re: Possible bugs in org-babel-temp-stable-file, Ferdinand Pieper, 2022/10/24
- Re: Possible bugs in org-babel-temp-stable-file, Ihor Radchenko, 2022/10/24