emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Eric Schulte" <schulte.eric@gmail.com>
To: Carsten Dominik <dominik@uva.nl>
Cc: Paul R <paul.r.ml@gmail.com>, emacs-orgmode@gnu.org
Subject: ANN: org-eval-light.el was: Re: Embedded elisp formulas, was: Spreadsheet and weighted means
Date: Wed, 08 Oct 2008 16:12:29 -0700	[thread overview]
Message-ID: <87r65pvekk.fsf@gmail.com> (raw)
In-Reply-To: 83E74583-842D-472D-98BD-3F445ED64FA4@uva.nl

> Before starting to use org-eval.el, I'd like to make sure that
> everyone understands that loading org-eval.el turns any org-mode file
> into an executable.  That means that you have to start being careful
> with org-mode files you receive from others or download from the
> internet.  Just like you would run a program from the web only if you
> trust the source, you should then only load such files into Emacs if
> you trust the source.  I am not saying this to keep you from using
> org- 
> eval, I am am using it myself, but please be aware of this issue.
>
> One more remark:  a <lisp> tag is evaluated by jit-lock (i.e. by the
> font-lock mechanism), just before Emacs tries to make it visible.  The
> reason for this is that the original indent for this functionality was
> to produce and display dynamic content on a page.  In large files,
> font locking can be delayed until the segment in question comes into
> view in the Emacs window.
> To be sure to get this code evaluated immediately when visiting a
> file,  you might want to put the snippets close to the beginning of
> the file.
>
I've made some changes to org-eval and packaged them into a new
org-eval-light.el file.  While this reworked version loses some of the
automatic evaluation, and most all of the similarity to Emacs Muse that
the original org-eval tried to maintain, I believe that it represents
(for me at least) a safer and more use-able way of packaging and calling
source code from inside of org-files.
The changes include...
,----[org-eval-light.el]
| ;;; Changes: by Eric Schulte
| ;;
| ;; 1) forms are only executed manually, (allowing for the execution of
| ;;    an entire subtree of forms)
| ;; 2) use the org-mode style src blocks, rather than the muse style
| ;;    <code></code> blocks
| ;; 3) forms are not replaced by their outputs, but rather the output
| ;;    is placed in the buffer immediately following the src block
| ;;    commented by `org-eval-light-make-region-example' (when
| ;;    evaluated with a prefix argument no output is placed in the
| ;;    buffer)
| ;; 4) add defadvice to org-ctrl-c-ctrl-c so that when called inside of
| ;;    a source block it will call `org-eval-light-current-snippet'
`----
The amount of new code is minimal, but I think it provides a nice
alternative for source code evaluation, and hopefully takes org-mode one
step closer to being a first-class Experimentation and
Reproducible-Research tool.  Here is a link to the code
http://github.com/eschulte/org-contrib/tree/master/org-eval-light.el
As a side note, I feel that org-mode should be listed here
http://www.reproducibleresearch.org/tools_and_resources.html
Thanks -- Eric

  reply	other threads:[~2008-11-06  1:16 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-20  7:00 Spreadsheet and weighted means Nicolas Goaziou
2008-09-29  8:43 ` Carsten Dominik
2008-09-29  8:44   ` Carsten Dominik
2008-10-01 16:46   ` Nicolas Goaziou
2008-10-01 19:26     ` Carsten Dominik
2008-10-01 19:45       ` Embedded elisp formulas, was: " Eric Schulte
2008-10-01 20:29         ` Paul R
2008-10-02  0:03           ` Eric Schulte
2008-10-02 11:44             ` Carsten Dominik
2008-10-08 23:12               ` Eric Schulte [this message]
2008-11-06  1:19               ` ANN: org-eval-light.el was: " Eric Schulte
2008-11-09  7:02                 ` Carsten Dominik
2008-11-10 19:51                   ` Daniel Clemente
2008-10-04  8:49       ` Nicolas Goaziou

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

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r65pvekk.fsf@gmail.com \
    --to=schulte.eric@gmail.com \
    --cc=dominik@uva.nl \
    --cc=emacs-orgmode@gnu.org \
    --cc=paul.r.ml@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 public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).