From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: ANN: org-eval-light.el was: Re: Embedded elisp formulas, was: Spreadsheet and weighted means Date: Sun, 9 Nov 2008 08:02:08 +0100 Message-ID: <1E15E842-04B1-460F-8320-61889E2C9334@uva.nl> References: <87wsh7w589.fsf@selenimh.orion.org> <9136F031-BBCD-4A80-A117-6047C5D3F777@uva.nl> <87y718nu0l.fsf@selenimh.orion.org> <871vz0t7z5.fsf_-_@gmail.com> <87prmk5ab6.fsf@gmail.com> <87y717uamj.fsf@gmail.com> <83E74583-842D-472D-98BD-3F445ED64FA4@uva.nl> <87iqr1vefr.fsf@gmail.com> Mime-Version: 1.0 (Apple Message framework v929.2) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kz4JJ-0005oW-Rh for emacs-orgmode@gnu.org; Sun, 09 Nov 2008 02:02:13 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kz4JI-0005o6-VA for emacs-orgmode@gnu.org; Sun, 09 Nov 2008 02:02:13 -0500 Received: from [199.232.76.173] (port=37505 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kz4JI-0005o3-Rj for emacs-orgmode@gnu.org; Sun, 09 Nov 2008 02:02:12 -0500 Received: from nf-out-0910.google.com ([64.233.182.189]:43739) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Kz4JI-0004Nw-6f for emacs-orgmode@gnu.org; Sun, 09 Nov 2008 02:02:12 -0500 Received: by nf-out-0910.google.com with SMTP id c7so1060466nfi.26 for ; Sat, 08 Nov 2008 23:02:11 -0800 (PST) In-Reply-To: <87iqr1vefr.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: Paul R , emacs-orgmode@gnu.org Any votes for including this into the contrib directory? - Carsten On Nov 6, 2008, at 2:19 AM, Eric Schulte wrote: > Carsten Dominik writes: > >> 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 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 > | ;; 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. The code is available here > http://github.com/eschulte/org-contrib/tree/master%2Forg-eval-light.el?raw=true > > As a side note, I feel that org-mode should be listed here > http://www.reproducibleresearch.org/tools_and_resources.html > > Thanks -- Eric