From mboxrd@z Thu Jan  1 00:00:00 1970
From: Nicholas Putnam <nputnam@gmail.com>
Subject: Re: org-babel-tangle-lang-exts must be initialized? how to get
 syntax coloring?
Date: Wed, 7 Jul 2010 23:44:04 -0500
Message-ID: <AANLkTikY0OJC7fpkRbZNEFaZ96frLxCNQ1w4M6rnA1jw@mail.gmail.com>
References: <AANLkTikB5b4j38wjf7PjIm9issLH5VN43t_Z2jTwwKr2@mail.gmail.com>
	<87oceify82.fsf@gmail.com>
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="===============0866596203=="
Return-path: <emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org>
Received: from [140.186.70.92] (port=45887 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1OWixy-0007G9-Mr
	for Emacs-orgmode@gnu.org; Thu, 08 Jul 2010 00:44:08 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69)
	(envelope-from <nputnam@gmail.com>) id 1OWixx-0006I7-4H
	for Emacs-orgmode@gnu.org; Thu, 08 Jul 2010 00:44:06 -0400
Received: from mail-vw0-f41.google.com ([209.85.212.41]:57369)
	by eggs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <nputnam@gmail.com>) id 1OWixw-0006Hy-Tt
	for Emacs-orgmode@gnu.org; Thu, 08 Jul 2010 00:44:05 -0400
Received: by vws1 with SMTP id 1so660056vws.0
	for <Emacs-orgmode@gnu.org>; Wed, 07 Jul 2010 21:44:04 -0700 (PDT)
In-Reply-To: <87oceify82.fsf@gmail.com>
List-Id: "General discussions about Org-mode." <emacs-orgmode.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/emacs-orgmode>,
	<mailto:emacs-orgmode-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/emacs-orgmode>
List-Post: <mailto:emacs-orgmode@gnu.org>
List-Help: <mailto:emacs-orgmode-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/emacs-orgmode>,
	<mailto:emacs-orgmode-request@gnu.org?subject=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 <schulte.eric@gmail.com>
Cc: Emacs-orgmode@gnu.org

--===============0866596203==
Content-Type: multipart/alternative; boundary=e0cb4e88781199d73f048ad8efaf

--e0cb4e88781199d73f048ad8efaf
Content-Type: text/plain; charset=ISO-8859-1

re: org-export-htmlize , "Symbol's value as variable is void"

Here's my .emacs file.  The line that sets org-babel-tangle-lang-exts is
commented out.  Further down, is the debugging output when emacs is
started.  Requiring ob-R doesn't generate an error, by either ob-ruby or
ob-python will, unless org-babel-tangle-lang-exts is set.  The call to
ob-ruby that generates the error, at the bottom of .emacs, is definitely
coming after 'org-install.

Thanks again,

Nik


(setq load-path
       (append (list nil
"/usr/local/share/emacs/site-lisp"
"/Users/nputnam/elisp/ruby-mode"
         )
load-path))

(require 'org-install)

(add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode))
(global-set-key "\C-cl" 'org-store-link)
(global-set-key "\C-ca" 'org-agenda)
(global-set-key "\C-cb" 'org-iswitchb)

(global-font-lock-mode 1)                     ; for all buffers
(add-hook 'org-mode-hook 'turn-on-font-lock)  ; Org buffers only
(transient-mark-mode 1)

;(setq org-babel-tangle-lang-exts '("fortran" . "f"))
;(setq org-babel-tangle-lang-exts '())

(setq org-babel-do-load-languages
 '((R . t)
         (ditaa . nil)
         (dot . nil)
         (emacs-lisp . t)
         (gnuplot . t)
         (haskell . nil)
         (ocaml . nil)
         (python . t)
         (ruby . t)
         (screen . nil)
         (sh . t)
         (sql . nil)
         (sqlite . nil)))



(require 'ob-R)
;(require 'ob-python)
(require 'ob-ruby)



Here is the emacs debugging output:
Debugger entered--Lisp error: (void-variable org-babel-tangle-lang-exts)
  add-to-list(org-babel-tangle-lang-exts ("ruby" . "rb"))

byte-code("\301\302!\210\301\303!\210\301\304!\210\301\305!\210\306\307\310\"\210\311^HB^P\312\311!\204$^@\313\311\314\"\210\314\207"
[current-load-list$
  require(ob-ruby)
  eval-buffer(#<buffer  *load*> nil "/Users/nputnam/.emacs" nil t)  ;
Reading at buffer position 958
  load-with-code-conversion("/Users/nputnam/.emacs" "/Users/nputnam/.emacs"
t t)
  load("~/.emacs" t t)
  #[nil "^H\205\276^@   \306=\203^Q^@\307^H\310Q\202A^@
\311=\2033^@\312\307\313\314#\203#^@\315\202A^@\312\307\313\316#\203/^@\317\202A^@\315\202A^@
\3$
  command-line()
  normal-top-level()





On Wed, Jul 7, 2010 at 10:29 PM, Eric Schulte <schulte.eric@gmail.com>wrote:

> Hi Nicholas,
>
> I'm happy that you're enjoying Org-mode.
>
> Nicholas Putnam <nputnam@gmail.com> writes:
>
> > I'm new to, but loving playing with org-mode.  Thanks for this excellent
> > code!
> >
> > I followed the directions for checking out the latest version with git,
> so
> > have been trying to catch up to the new configuration for babel, at the
> same
> > time that I'm learning the ropes of org-mode.
> >
> > I am finding that babel will not work unless org-babel-tangle-lang-exts
> is
> > set -- else I get the following error:
> >
> > "Symbol's value as variable is void: org-babel-tangle-lang-exts"
> >
> > Adding "(setq org-babel-tangle-lang-exts '("fortran" . "f"))" to my
> > .emacs file (even though I'm not using fortran for anything) fixes
> > this problem.
> >
>
> I'm having trouble reproducing this problem.  As far as I can tell
> `org-babel-tangle-lang-exts' is only called from language specific files
> which should be required after that variable has been defined.
>
> Is it possible that your configuration is loading language-specific
> files or touching org-babel-load-languages before you are calling
> (require 'org-install)?
>
> >
> > Also, I'm trying to get syntax highlighting of source code elements in
> > HTML export.  Export looks great, but the code snippets are being
> > exported inside <pre class="example"> tags, without any other markup.
> > Can anyone point me in the right direction?
> >
>
> Is the `org-export-htmlize' set to a non-nil value on your system?  If
> so then that could be the cause of the problem.  If it is set to a
> truthy value, and htmlize-region is defined in your Emacs, then I'm not
> sure what the problem could be.
>
> Best -- Eric
>
> >
> > Cheers,
> >
> > Nik Putnam
> > _______________________________________________
> > Emacs-orgmode mailing list
> > Please use `Reply All' to send replies to the list.
> > Emacs-orgmode@gnu.org
> > http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>

--e0cb4e88781199d73f048ad8efaf
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

re: org-export-htmlize , &quot;Symbol&#39;s value as variable is void&quot;=
<br><br>Here&#39;s my .emacs file.=A0 The line that sets org-babel-tangle-l=
ang-exts is commented out.=A0 Further down, is the debugging output when em=
acs is started.=A0 Requiring ob-R doesn&#39;t generate an error, by either =
ob-ruby or ob-python will, unless org-babel-tangle-lang-exts is set.=A0 The=
 call to ob-ruby that generates the error, at the bottom of .emacs, is defi=
nitely coming after &#39;org-install.<br>
<br>
Thanks again,<br>
<br>
Nik<br>
<br><br>(setq load-path<br>=A0=A0=A0=A0=A0=A0 (append (list nil<br>&quot;/u=
sr/local/share/emacs/site-lisp&quot;<br>&quot;/Users/nputnam/elisp/ruby-mod=
e&quot; <br>=A0=A0=A0=A0=A0=A0=A0=A0 )=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 <br=
>load-path))<br><br>(require &#39;org-install)<br>
<br>(add-to-list &#39;auto-mode-alist &#39;(&quot;\\.org\\&#39;&quot; . org=
-mode))<br>(global-set-key &quot;\C-cl&quot; &#39;org-store-link)<br>(globa=
l-set-key &quot;\C-ca&quot; &#39;org-agenda)<br>(global-set-key &quot;\C-cb=
&quot; &#39;org-iswitchb)<br>
<br>(global-font-lock-mode 1)=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0 ; for all buffers<br>(add-hook &#39;org-mode-hook &#39;turn=
-on-font-lock)=A0 ; Org buffers only<br>(transient-mark-mode 1)<br><br>;(se=
tq org-babel-tangle-lang-exts &#39;(&quot;fortran&quot; . &quot;f&quot;))<b=
r>
;(setq org-babel-tangle-lang-exts &#39;())<br><br>(setq org-babel-do-load-l=
anguages<br>=A0&#39;((R . t)<br>=A0=A0=A0=A0=A0=A0=A0=A0 (ditaa . nil)<br>=
=A0=A0=A0=A0=A0=A0=A0=A0 (dot . nil)<br>=A0=A0=A0=A0=A0=A0=A0=A0 (emacs-lis=
p . t)<br>=A0=A0=A0=A0=A0=A0=A0=A0 (gnuplot . t)<br>=A0=A0=A0=A0=A0=A0=A0=
=A0 (haskell . nil)<br>
=A0=A0=A0=A0=A0=A0=A0=A0 (ocaml . nil)<br>=A0=A0=A0=A0=A0=A0=A0=A0 (python =
. t)<br>=A0=A0=A0=A0=A0=A0=A0=A0 (ruby . t)<br>=A0=A0=A0=A0=A0=A0=A0=A0 (sc=
reen . nil)<br>=A0=A0=A0=A0=A0=A0=A0=A0 (sh . t)<br>=A0=A0=A0=A0=A0=A0=A0=
=A0 (sql . nil)<br>=A0=A0=A0=A0=A0=A0=A0=A0 (sqlite . nil)))<br><br><br><br=
>(require &#39;ob-R)<br>;(require &#39;ob-python)<br>
(require &#39;ob-ruby)<br><br><br><br>Here is the emacs debugging output:<b=
r>Debugger entered--Lisp error: (void-variable org-babel-tangle-lang-exts)<=
br>=A0 add-to-list(org-babel-tangle-lang-exts (&quot;ruby&quot; . &quot;rb&=
quot;))<br>
=A0 byte-code(&quot;\301\302!\210\301\303!\210\301\304!\210\301\305!\210\30=
6\307\310\&quot;\210\311^HB^P\312\311!\204$^@\313\311\314\&quot;\210\314\20=
7&quot; [current-load-list$<br>=A0 require(ob-ruby)<br>=A0 eval-buffer(#&lt=
;buffer=A0 *load*&gt; nil &quot;/Users/nputnam/.emacs&quot; nil t)=A0 ; Rea=
ding at buffer position 958<br>
=A0 load-with-code-conversion(&quot;/Users/nputnam/.emacs&quot; &quot;/User=
s/nputnam/.emacs&quot; t t)<br>=A0 load(&quot;~/.emacs&quot; t t)<br>=A0 #[=
nil &quot;^H\205\276^@=A0=A0 \306=3D\203^Q^@\307^H\310Q\202A^@ \311=3D\2033=
^@\312\307\313\314#\203#^@\315\202A^@\312\307\313\316#\203/^@\317\202A^@\31=
5\202A^@=A0=A0 \3$<br>
=A0 command-line()<br>=A0 normal-top-level()<br><br><br><br><br><br><div cl=
ass=3D"gmail_quote">On Wed, Jul 7, 2010 at 10:29 PM, Eric Schulte <span dir=
=3D"ltr">&lt;<a href=3D"mailto:schulte.eric@gmail.com">schulte.eric@gmail.c=
om</a>&gt;</span> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"border-left: 1px solid rgb(204, =
204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi Nicholas,<br>
<br>
I&#39;m happy that you&#39;re enjoying Org-mode.<br>
<div class=3D"im"><br>
Nicholas Putnam &lt;<a href=3D"mailto:nputnam@gmail.com">nputnam@gmail.com<=
/a>&gt; writes:<br>
<br>
&gt; I&#39;m new to, but loving playing with org-mode. =A0Thanks for this e=
xcellent<br>
&gt; code!<br>
&gt;<br>
&gt; I followed the directions for checking out the latest version with git=
, so<br>
&gt; have been trying to catch up to the new configuration for babel, at th=
e same<br>
&gt; time that I&#39;m learning the ropes of org-mode.<br>
&gt;<br>
&gt; I am finding that babel will not work unless org-babel-tangle-lang-ext=
s is<br>
&gt; set -- else I get the following error:<br>
&gt;<br>
&gt; &quot;Symbol&#39;s value as variable is void: org-babel-tangle-lang-ex=
ts&quot;<br>
&gt;<br>
&gt; Adding &quot;(setq org-babel-tangle-lang-exts &#39;(&quot;fortran&quot=
; . &quot;f&quot;))&quot; to my<br>
&gt; .emacs file (even though I&#39;m not using fortran for anything) fixes=
<br>
&gt; this problem.<br>
&gt;<br>
<br>
</div>I&#39;m having trouble reproducing this problem. =A0As far as I can t=
ell<br>
`org-babel-tangle-lang-exts&#39; is only called from language specific file=
s<br>
which should be required after that variable has been defined.<br>
<br>
Is it possible that your configuration is loading language-specific<br>
files or touching org-babel-load-languages before you are calling<br>
(require &#39;org-install)?<br>
<div class=3D"im"><br>
&gt;<br>
&gt; Also, I&#39;m trying to get syntax highlighting of source code element=
s in<br>
&gt; HTML export. =A0Export looks great, but the code snippets are being<br=
>
&gt; exported inside &lt;pre class=3D&quot;example&quot;&gt; tags, without =
any other markup.<br>
&gt; Can anyone point me in the right direction?<br>
&gt;<br>
<br>
</div>Is the `org-export-htmlize&#39; set to a non-nil value on your system=
? =A0If<br>
so then that could be the cause of the problem. =A0If it is set to a<br>
truthy value, and htmlize-region is defined in your Emacs, then I&#39;m not=
<br>
sure what the problem could be.<br>
<br>
Best -- Eric<br>
<br>
&gt;<br>
&gt; Cheers,<br>
&gt;<br>
&gt; Nik Putnam<br>
&gt; _______________________________________________<br>
&gt; Emacs-orgmode mailing list<br>
&gt; Please use `Reply All&#39; to send replies to the list.<br>
&gt; <a href=3D"mailto:Emacs-orgmode@gnu.org">Emacs-orgmode@gnu.org</a><br>
&gt; <a href=3D"http://lists.gnu.org/mailman/listinfo/emacs-orgmode" target=
=3D"_blank">http://lists.gnu.org/mailman/listinfo/emacs-orgmode</a><br>
</blockquote></div><br>

--e0cb4e88781199d73f048ad8efaf--


--===============0866596203==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

--===============0866596203==--