From: Nick Dokos <nicholas.dokos@hp.com>
To: Eric Schulte <schulte.eric@gmail.com>
Cc: emacs-orgmode@gnu.org, nicholas.dokos@hp.com,
Paul Sexton <psexton@xnet.co.nz>
Subject: Re: [babel] By default, code blocks should not be evaluated during export
Date: Fri, 08 Apr 2011 11:28:58 -0400 [thread overview]
Message-ID: <3806.1302276538@alphaville.usa.hp.com> (raw)
In-Reply-To: Message from "Eric Schulte" <schulte.eric@gmail.com> of "Fri, 08 Apr 2011 07:50:04 MDT." <87k4f4ygl3.fsf@gmail.com>
Eric Schulte <schulte.eric@gmail.com> wrote:
> Paul Sexton <psexton@xnet.co.nz> 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
prev parent reply other threads:[~2011-04-08 15:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-08 4:23 [babel] By default, code blocks should not be evaluated during export Paul Sexton
2011-04-08 6:56 ` Rainer M Krug
2011-04-08 13:50 ` Eric Schulte
2011-04-08 15:28 ` Nick Dokos [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3806.1302276538@alphaville.usa.hp.com \
--to=nicholas.dokos@hp.com \
--cc=emacs-orgmode@gnu.org \
--cc=psexton@xnet.co.nz \
--cc=schulte.eric@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.