From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: Re: Using babel to generate a commit log Date: Wed, 30 Mar 2011 16:22:24 -0400 Message-ID: <7821.1301516544@alphaville.usa.hp.com> References: <20110329232804.45777e7a@bhishma.homelinux.net> <8080.1301490442@alphaville.dokosmarshall.org> <5188.1301503865@alphaville.usa.hp.com> <87d3l8s6qd.fsf@gmail.com> Reply-To: nicholas.dokos@hp.com Return-path: Received: from [140.186.70.92] (port=50218 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q51uQ-0008TL-6N for emacs-orgmode@gnu.org; Wed, 30 Mar 2011 16:22:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q51uM-0004XY-52 for emacs-orgmode@gnu.org; Wed, 30 Mar 2011 16:22:26 -0400 Received: from g5t0009.atlanta.hp.com ([15.192.0.46]:4007) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q51uM-0004XP-1s for emacs-orgmode@gnu.org; Wed, 30 Mar 2011 16:22:26 -0400 In-Reply-To: Message from "Eric Schulte" of "Wed, 30 Mar 2011 14:10:51 MDT." <87d3l8s6qd.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: nicholas.dokos@hp.com, emacs-orgmode@gnu.org, Luke Crook Eric Schulte wrote: > > Yes, this makes sense thanks. I'll create another thread asking how to retrieve > > the original buffer during the export process. > > > > It is true that export takes place in a fresh Org-mode buffer, however > the header arguments of Org-mode code blocks are guaranteed to be > evaluated in the original buffer, so a trick like the following can be > used to grab the original buffer. > > #+begin_src emacs-lisp :var buf=(buffer-file-name (current-buffer)) :exports both > (message "buffer %S!" buf) > #+end_src > ... and there was general rejoicing. Thanks! Nick > This issue should be given more prominence in the Org-mode manual, as it > is a common source of confusion. >