From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: [bug] Symbol's function definition is void: when-let Date: Thu, 19 May 2011 12:34:00 -0400 Message-ID: <10788.1305822840@alphaville.dokosmarshall.org> References: <4DD54270.10305@uni-koeln.de> Reply-To: nicholas.dokos@hp.com Return-path: Received: from eggs.gnu.org ([140.186.70.92]:36979) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QN6B5-0005Qd-PV for emacs-orgmode@gnu.org; Thu, 19 May 2011 12:34:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QN6B4-00070j-Jq for emacs-orgmode@gnu.org; Thu, 19 May 2011 12:34:23 -0400 Received: from vms173003pub.verizon.net ([206.46.173.3]:37233) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QN6B4-00070b-Gk for emacs-orgmode@gnu.org; Thu, 19 May 2011 12:34:22 -0400 Received: from alphaville.dokosmarshall.org ([unknown] [173.76.32.106]) by vms173003.mailsrvcs.net (Sun Java(tm) System Messaging Server 7u2-7.02 32bit (built Apr 16 2009)) with ESMTPA id <0LLG00D0UBCODW20@vms173003.mailsrvcs.net> for emacs-orgmode@gnu.org; Thu, 19 May 2011 11:34:01 -0500 (CDT) In-reply-to: Your message of "Thu, 19 May 2011 12:16:48 EDT." <4DD54270.10305@uni-koeln.de> 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@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Bernd Weiss Cc: nicholas.dokos@hp.com, emacs-orgmode@gnu.org Bernd Weiss wrote: > export to LaTeX/PDF. It stops with "Symbol's function definition is > void: when-let", i.e. > > Fontifying org-src-fontification:emacs-lisp-mode... > (regexps...............) > Symbol's function definition is void: when-let > Yup: Eric S.'s commit (tip when I pulled a few minutes ago) uses when-let, which is not defined in my emacs either. It's either a typo or an Eric S. special. Nick ,---- | commit 72c154e38e526b5f8bb5f200fb31bc6fec145ba6 | Author: Eric Schulte | Date: Thu May 19 07:37:33 2011 -0600 | | expand noweb refs when ":noweb yes" during export | | * lisp/ob-exp.el (org-babel-exp-do-export): Use `org-babel-exp-code' | to generate code block output. | (org-babel-exp-code): Re-create the code block body for exporting | source code. | | diff --git a/lisp/ob-exp.el b/lisp/ob-exp.el | index d700f6d..ce04f13 100644 | --- a/lisp/ob-exp.el | +++ b/lisp/ob-exp.el | @@ -238,9 +238,17 @@ The function respects the value of the :exports header argument." | (clean () (unless (eq type 'inline) (org-babel-remove-result info)))) | (case (intern (or (cdr (assoc :exports (nth 2 info))) "code")) | ('none (silently) (clean) "") | - ('code (silently) (clean) nil) | + ('code (silently) (clean) (org-babel-exp-code info)) | ('results (org-babel-exp-results info type nil hash) "") | - ('both (org-babel-exp-results info type nil hash) nil)))) | + ('both (org-babel-exp-results info type nil hash) | + (org-babel-exp-code info))))) | + | +(defun org-babel-exp-code (info) | + "Return the original code block formatted for export." | + (org-fill-template "#+BEGIN_SRC %lang%flags\n%body\n#+END_SRC\n" | + `(("lang" . ,(nth 0 info)) | + ("flags" . ,(when-let (f (nth 3 info)) (concat " " f))) | + ("body" . ,(nth 1 info))))) | | (defun org-babel-exp-results (info type &optional silent hash) | "Evaluate and return the results of the current code block for export. `----