[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] ob-eval.el: Refactoring `org-babel-eval' to improve readability
From: |
Nick Savage |
Subject: |
[PATCH] ob-eval.el: Refactoring `org-babel-eval' to improve readability |
Date: |
Thu, 29 Apr 2021 16:45:10 -0400 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.0 |
Hello everyone,
I have attached a patch to refactor `org-babel-eval' and
`org-babel--shell-command-on-region' to improve readability and to make
local variables more consistent between functions.
This also removes two parameters from
`org-babel--shell-command-on-region', START and END. The function was
created as a simplified `shell-command-on-region' that does only part of
what it does. Those two parameters were included. As far as I can tell,
`org-babel--shell-command-on-region' is only ever called by
`org-babel-eval', and there is never any uncertainty over the contents
of START and END as they are only ever (point-min) and (point-max).
Given how specialized this function is, I believe it highly unlikely
this is called anywhere else. I searched github too and didn't find
anywhere where where code is calling this so I felt it was safe. I'm
happy to change it back if necessary.
Please let me know what you think.
Thanks,
Nick
0001-ob-eval.el-Refactoring-org-babel-eval-to-improve-rea.patch
Description: Text Data
- [PATCH] ob-eval.el: Refactoring `org-babel-eval' to improve readability,
Nick Savage <=