From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: [babel] By default, code blocks should not be evaluated during export Date: Fri, 08 Apr 2011 11:28:58 -0400 Message-ID: <3806.1302276538@alphaville.usa.hp.com> References: <87k4f4ygl3.fsf@gmail.com> Reply-To: nicholas.dokos@hp.com Return-path: Received: from [140.186.70.92] (port=57989 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q8DcM-0003yD-AI for emacs-orgmode@gnu.org; Fri, 08 Apr 2011 11:29:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q8DcK-0000Fp-ED for emacs-orgmode@gnu.org; Fri, 08 Apr 2011 11:29:02 -0400 Received: from g5t0008.atlanta.hp.com ([15.192.0.45]:44763) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q8DcK-0000FP-Ak for emacs-orgmode@gnu.org; Fri, 08 Apr 2011 11:29:00 -0400 In-Reply-To: Message from "Eric Schulte" of "Fri, 08 Apr 2011 07:50:04 MDT." <87k4f4ygl3.fsf@gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Eric Schulte Cc: emacs-orgmode@gnu.org, nicholas.dokos@hp.com, Paul Sexton Eric Schulte wrote: > Paul Sexton writes: > > > > > Having just crashed my Emacs session 5 times in a row trying to get > > a file containing a BEGIN_SRC emacs-lisp ... END_SRC *code example* > > to export to HTML... > > > > I strongly feel it should default to nil. > > > > I can understand your frustration, however while the above does not > default to nil, the default babel header argument do not evaluate code > on export. See C-h v `org-babel-default-header-args' > > > > I also feel that "executable code block" and "quoted code example that I would > > like to display/export with pretty syntax highlighting" are two very different > > concepts, and should have different block names. > > > > eg #+BEGIN_EXEC for the executable blocks? > > or allow an argument to example blocks, eg "#+BEGIN_EXAMPLE python" ? > > > > I very strongly disagree with this suggestion. As I see it code blocks > hold code. The use of the code is secondary to the content of the > block, and a header argument is an appropriate place to hold such usage > information. Also, it is common to switch between exporting results and > exporting code, and it would be onerous to change the code-block name. > Finally, this would complicate all of the current code block handling > code, having two separate blocks for a single semantic entity. > FWIW, I agree with Eric (modulo any bugs that might exist of course) - otherwise babel loses much of its appeal for literate programming. There are a couple of questions that need to be answered however: o why is the code block evaluated during export in Paul's case? That may be a result of Paul's config or a bug in babel - in either case, that should be easy to fix and Eric addressed that. o why did Paul's emacs session crash? That might be an emacs bug that will need to be addressed. Even if Paul's elisp code is completely broken, *it should not crash emacs*. Paul, can you post the code? Actually, the whole org file if that's possible, as well as emacs and org version? Thanks, Nick