From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Charles C. Berry" Subject: Re: Code block eval scope - subtree only option ignored Date: Fri, 24 Feb 2017 13:50:51 -0800 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54680) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1chNlT-0003Ad-CZ for emacs-orgmode@gnu.org; Fri, 24 Feb 2017 16:51:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1chNlQ-0000rP-7R for emacs-orgmode@gnu.org; Fri, 24 Feb 2017 16:50:59 -0500 Received: from iport-acv4-out.ucsd.edu ([132.239.0.7]:12908) by eggs.gnu.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.71) (envelope-from ) id 1chNlP-0000oB-QR for emacs-orgmode@gnu.org; Fri, 24 Feb 2017 16:50:56 -0500 In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Jay Iyer Cc: emacs-orgmode@gnu.org On Fri, 24 Feb 2017, Jay Iyer wrote: > Hi, evaluating a simple elisp code block in a subtree, called with C-c C-v > C-s or just C-c C-C, evaluates the entire Org buffer. Is this expected > behavior? Not at all. C-c C-v C-s on the headline evaluates just the subtree via the command org-babel-execute-subtree. (Org 9.0.5 and many prior versions.) C-c C-c on the headline prompts for tags. In a src block, it evaluates the code. Of course, if you wrote a Babel block that executes other Babel blocks, all bets are off. > How can I force the eval on the visible portion (with narrowing) of the > tree only? Narrow, Then M-x org-babel-execute-buffer RET HTH, Chuck