From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ken Mankoff Subject: Re: Babel eval w/ C-c C-c but not (org-babel-execute-buffer) Date: Fri, 11 Oct 2019 06:25:04 +0200 Message-ID: <87o8yn3o4f.fsf@gmail.com> References: <87o8yyj2oe.fsf@gmail.com> <877e5d3zmu.fsf@gmail.com> <87eezk45cb.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:33327) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iImUH-0005Va-Bw for emacs-orgmode@gnu.org; Fri, 11 Oct 2019 00:25:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iImUG-00086B-4l for emacs-orgmode@gnu.org; Fri, 11 Oct 2019 00:25:09 -0400 Received: from mail-lj1-x22e.google.com ([2a00:1450:4864:20::22e]:42523) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iImUF-00084c-Ri for emacs-orgmode@gnu.org; Fri, 11 Oct 2019 00:25:08 -0400 Received: by mail-lj1-x22e.google.com with SMTP id y23so8368867lje.9 for ; Thu, 10 Oct 2019 21:25:07 -0700 (PDT) In-reply-to: <87eezk45cb.fsf@gmail.com> 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: Tim Cross Cc: emacs-orgmode@gnu.org On 2019-10-11 at 00:13 +02, Tim Cross wrote... > My concern with this suggestion is that I think it my result in > 'surprising' or unexpected results for users. I hope nobody would be surprised if they C-u C-u C-c C-c'd ! :) Just as they shouldn't be surprised if the :cache is ignored, if run with prefix-arg. But I do understand your concern and agree with it. > Perhaps an additional recognised configuration value for :export and > :tangle, such as 'manual', which might mean something like 'onl[y] > evaluate/tangle this block when requested with block level commands, > not buffer level. Yes, I agree this is preferred. The only reason I implemented the first version using prefix-arg is because I could see how to do that easily. I started down the path you describe above and ran into my own lisp and org limitations. I'm open to implementation suggestions. My plan is to modify (org-babel-check-confirm-evaluate) and use introspection and see if (org-ctrl-c-ctrl-c) is in the call stack, and if so, return t. Does this make sense? Is there some better way to determine how org-babel-check-confirm-evaluate was reached? Or some better place to add the feature? Also, I'd use ":eval only-manual" unless someone suggests another value ("only-on-cc"?) Thanks, -k.