emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Eric Schulte <schulte.eric@gmail.com>
To: nicholas.dokos@hp.com
Cc: Bernd Weiss <bernd.weiss@uni-koeln.de>, emacs-orgmode@gnu.org
Subject: Re: [bug] Symbol's function definition is void: when-let
Date: Thu, 19 May 2011 11:06:53 -0600	[thread overview]
Message-ID: <87mxiipqky.fsf@gmail.com> (raw)
In-Reply-To: <10788.1305822840@alphaville.dokosmarshall.org> (Nick Dokos's message of "Thu, 19 May 2011 12:34:00 -0400")

Oh!

My fault, `when-let' is defined locally on my Emacs, but apparently is
not an official Emacs function, careless committing on my part.

I've just pushed up a fix.

Thanks -- Eric

Nick Dokos <nicholas.dokos@hp.com> writes:

> Bernd Weiss <bernd.weiss@uni-koeln.de> 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 <schulte.eric@gmail.com>
> | 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.
> `----
>

-- 
Eric Schulte
http://cs.unm.edu/~eschulte/

  reply	other threads:[~2011-05-19 17:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-19 16:16 [bug] Symbol's function definition is void: when-let Bernd Weiss
2011-05-19 16:34 ` Nick Dokos
2011-05-19 17:06   ` Eric Schulte [this message]
2011-05-19 17:11     ` Bernd Weiss

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=87mxiipqky.fsf@gmail.com \
    --to=schulte.eric@gmail.com \
    --cc=bernd.weiss@uni-koeln.de \
    --cc=emacs-orgmode@gnu.org \
    --cc=nicholas.dokos@hp.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).