From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Sebastien Vauban" Subject: Re: source block variable expansion Date: Thu, 12 Jan 2012 09:40:06 +0100 Message-ID: <80ty41nwk9.fsf@somewhere.org> References: <20120112001317.GA25637@BigDog.local> Mime-Version: 1.0 Content-Type: text/plain Return-path: 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-mXXj517/zsQ@public.gmane.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org To: emacs-orgmode-mXXj517/zsQ@public.gmane.org Hi Rick, Rick Frankel wrote: > Since org-mode v7.8, editing a code block in an indirect buffer causes > any referenced code blocks to be executed. While this behavior is > desired for viewing code in an indirect buffer (as the behavior has > always been) it is not for editing (esp. if the named block takes a > long time to run). > > Given a referenced source block: > > #+name: var > #+begin_src elisp > "you shouldn't see this in the mini-buffer" > #+end_src > > When editing the followiing code block (via =C-c '=), the above block > (=var=) will be executed. The message =executing Elisp code block > (var)...= will appear in the =*Message*= buffer and the message above > will appear in the mini-buffer. > > #+name: edit-test(var=var) > #+begin_src perl > $var; > #+end_src Just FYI, note that this variable assignment is/shoud be deprecated: you have to use: #+name: edit-test #+headers: :var var=var #+begin_src perl $var; #+end_src or #+name: edit-test #+begin_src perl :var var=var $var; #+end_src Best regards, Seb -- Sebastien Vauban