From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ken Williams Subject: Re: Don't ask, don't run Date: Mon, 11 Jul 2011 15:19:38 +0000 (UTC) Message-ID: References: <87sjqg4jiq.fsf@ucl.ac.uk> <87r55yruyu.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([140.186.70.92]:36550) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QgIMF-0008Pv-Dj for emacs-orgmode@gnu.org; Mon, 11 Jul 2011 11:25:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QgIMD-0003vK-0a for emacs-orgmode@gnu.org; Mon, 11 Jul 2011 11:25:14 -0400 Received: from lo.gmane.org ([80.91.229.12]:35709) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QgIMC-0003vD-JS for emacs-orgmode@gnu.org; Mon, 11 Jul 2011 11:25:12 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1QgIM5-00056F-VC for emacs-orgmode@gnu.org; Mon, 11 Jul 2011 17:25:06 +0200 Received: from webproxy.westgroup.com ([163.231.6.65]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 11 Jul 2011 17:25:05 +0200 Received: from ken.williams by webproxy.westgroup.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 11 Jul 2011 17:25:05 +0200 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Eric Schulte gmail.com> writes: > There is no way to customize `org-confirm-evaluate' to achieve this > behavior, however it can be accomplished through creative use of the > :eval header argument, by using the `org-export-current-backend' > variable to inhibit evaluation during export. > > #+begin_src emacs-lisp :eval (if org-export-current-backend "never" > "yes") :exports results > (message "launch missles") > #+end_src I see, thanks. Since I'm new to this, can I confirm my understanding here? It tests whether the 'org-export-current-backend' variable is set, which means we're currently exporting, and if so, we set the :eval argument to "never". Otherwise we set it to "yes", which means evaluate it without asking. Assuming that understanding is correct, I have a couple of followup questions. 1) http://orgmode.org/manual/eval.html doesn't list the "yes" option, 2) Is there a similar variable I might test to check whether it's currently doing an explicit C-c C-c action? If there were, I might prefer something like :eval (if org-export-current-backend "never" (if org-doing-c-c-c-c "yes" "query")), so that I cover some other scenario besides export or C-c C-c. 3) Finally, is there a way to add this argument fanciness implicitly to *all* the source blocks in my file? Or will it have to go on all of them? Thanks much. -Ken