emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Bastien <bzg@gnu.org>
To: Nick Savage <nick@nicksavage.ca>
Cc: emacs-orgmode@gnu.org
Subject: Re: [PATCH] ob-eval.el: Refactoring `org-babel-eval' to improve readability
Date: Fri, 30 Apr 2021 08:58:06 +0200	[thread overview]
Message-ID: <87wnskcl8h.fsf@gnu.org> (raw)
In-Reply-To: <87702cb1-0707-04c0-3a6d-138092787db9@nicksavage.ca> (Nick Savage's message of "Thu, 29 Apr 2021 16:45:10 -0400")

Hi Nick,

Nick Savage <nick@nicksavage.ca> writes:

> 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.

That's useful, thanks a lot.

> 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.

Agreed - thanks for taking the time to check on the web whether this
would break anything.

Applied in master as commit c212b7dae.

Thanks,

-- 
 Bastien


      reply	other threads:[~2021-04-30  6:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-29 20:45 [PATCH] ob-eval.el: Refactoring `org-babel-eval' to improve readability Nick Savage
2021-04-30  6:58 ` Bastien [this message]

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=87wnskcl8h.fsf@gnu.org \
    --to=bzg@gnu.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=nick@nicksavage.ca \
    /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).