From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id ALOJO66qi2CKmwAAgWs5BA (envelope-from ) for ; Fri, 30 Apr 2021 08:58:54 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id 6BspN66qi2ABLAAAbx9fmQ (envelope-from ) for ; Fri, 30 Apr 2021 06:58:54 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 205A51CA6E for ; Fri, 30 Apr 2021 08:58:54 +0200 (CEST) Received: from localhost ([::1]:57170 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lcN6x-0003Qn-CA for larch@yhetil.org; Fri, 30 Apr 2021 02:58:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49628) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lcN6H-0003OR-0A for emacs-orgmode@gnu.org; Fri, 30 Apr 2021 02:58:09 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:58120) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lcN6G-0000LB-M5; Fri, 30 Apr 2021 02:58:08 -0400 Received: from [78.194.183.21] (port=35456 helo=guerry) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.82) (envelope-from ) id 1lcN6F-00045R-Up; Fri, 30 Apr 2021 02:58:08 -0400 Received: by guerry (Postfix, from userid 1000) id 2718C1A60EDE; Fri, 30 Apr 2021 08:58:06 +0200 (CEST) From: Bastien To: Nick Savage Subject: Re: [PATCH] ob-eval.el: Refactoring `org-babel-eval' to improve readability In-Reply-To: <87702cb1-0707-04c0-3a6d-138092787db9@nicksavage.ca> (Nick Savage's message of "Thu, 29 Apr 2021 16:45:10 -0400") Organization: GNU References: <87702cb1-0707-04c0-3a6d-138092787db9@nicksavage.ca> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) X-Woof-Patch: applied Date: Fri, 30 Apr 2021 08:58:06 +0200 Message-ID: <87wnskcl8h.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1619765934; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=i/TU8rN5XuSa296DO6NyDI+3Vy7J2LtG6RnemasgJfM=; b=U4Rg6AFs9PJ15cABgjsAdW1gFO4d/TYnz3tv6tZfVdw38Yaq4jA68goYpUJ3UbPSV0Rkpb uulgP84d8nSZ56UMmRz4Per/pt+sbMsyeq0sGyG2ypzBDixYwvdpcJaoCZ94zTccs2AaEn noLvVKcIwEZ804jBkhZwyWcMWVuMuZdHskeCEyxRCnKj0A3ngrhkVOrk4rQz1JWBL8qtfh 9df26uLnJQBOUJIxHgGsouoLIru0NLoJRMrAuG1FzO2W0xtG6xQ2Zvc4FcXj2q4tJskUsE k1SS4/zrD661T1jFOqgvRo8xNvRid9VM+C1RBJnZjnUjTupnJIJDVi7fjTSyLQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1619765934; a=rsa-sha256; cv=none; b=FIth11JwksKOm5mBoIKacjuonNSqEl/WSPo7nAJO6bWZ5YFeAsor5KyPQ86XewLNVsLv5a R6sE/w7wXNZo8IKDE1poiustProRKjaAcGsJqVYEaainGhCDinD9e4UL4dDGe39CGct1/x vFudMhuHPVBFodQTUucVwn9cE5LXfd2pklGDwmd3/D28funBfIQTxohqMmUY15f1nPjwvU YIOaalZSU91LnFDhBru748neYKB1IpsLdoUYwSeT9FVLCJTNaPVHMa1SwbTgM+fcGFQw2J qINaRqSJZ4wJrR/8BZLVqth1vxlGO9oOspLdAcM4WXzhVBCGoTUkDMJhdjhkCQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -1.46 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 205A51CA6E X-Spam-Score: -1.46 X-Migadu-Scanner: scn0.migadu.com X-TUID: PYbdt2RGll0k Hi Nick, Nick Savage 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