emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nick Dokos <nicholas.dokos@hp.com>
Cc: Alan Schmitt <alan.schmitt@polytechnique.org>,
	nicholas.dokos@hp.com, Org Mode List <emacs-orgmode@gnu.org>
Subject: Re: Invalid read syntax "#"?
Date: Fri, 27 Jan 2012 10:37:37 -0500	[thread overview]
Message-ID: <29587.1327678657@alphaville> (raw)
In-Reply-To: Message from Nick Dokos <nicholas.dokos@hp.com> of "Fri, 27 Jan 2012 10:24:26 EST." <29294.1327677866@alphaville>

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

> Alan Schmitt <alan.schmitt@polytechnique.org> wrote:
> 
> > Hello,
> > 
> > I'm trying this example to export nicely formatted code in LaTeX:
> > http://orgmode.org/worg/org-tutorials/org-latex-export.html#sec-12-3
> > 
> > Unfortunately it fails with an error 'Invalid read syntax "#"'. If I
> > delete the second code block (the python one), it works.
> > 
> > Is there something wrong in the example or in my setup (org-mode from
> > yesterday's git, Aquamacs 3 from two days ago, Pygments easy-installed
> > today)?
> > 
> 
> I got the same thing, so it's probably not a setup problem. Here's
> a backtrace - looks like a babel problem.
> 

Uhh, maybe not: it looks as if something gets out of sync in the parsing and
babel is asked to evaluate the wrong part of the string (see the shortened
backtrace below). But I haven't looked at code, so these are guesses in the
wild.

Nick

> 
> Org-mode version 7.8.03 (release_7.8.03.241.g043d)
> GNU Emacs 24.0.92.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.4) of 2012-01-24
> 
> Debugger entered--Lisp error: (invalid-read-syntax "#")
  ...
>   org-babel-exp-results(("emacs-lisp" "#+end_src\n#+name: another-listing\n#+begin_src python :exports code" ((:cache . "no") (:colname-names) (:colnames . "no") (:comments . "") (:exports . "both") (:hlines . "yes") (:noweb . "no") (:padline . "") (:padnewline . "yes") (:result-params "silent") (:result-type . value) (:results . "silent") (:rowname-names) (:session . "none") (:shebang . "") (:tangle . "no")) "" "setup-minted" 0) block nil "2a39b675a6bec8c15b0ed8928d030e836ddd17d5")
>   org-babel-exp-src-block("" #("emacs-lisp" 0 10 (font-lock-fontified t fontified t)) #(":exports" 0 8 (font-lock-fontified t fontified t)) #("both" 0 4 (font-lock-fontified t fontified t)) #(":results" 0 8 (font-lock-fontified t fontified t)) #("silent" 0 6 (font-lock-fontified t fontified t)))
  ...
>   org-export-blocks-preprocess()
  ...
>   org-export-preprocess-string(#("#+LATEX_CLASS: article\n#+LaTeX_HEADER: \\usepackage{minted}\n#+LaTeX_HEADER: \\usemintedstyle{emacs}\n#+LaTeX_HEADER: \\newminted{common-lisp}{fontsize=\\footnotesize}\n\n#+name: setup-minted\n#+begin_src emacs-lisp :exports both :results silent\n     (setq org-export-latex-listings 'minted)\n     (setq org-export-latex-custom-lang-environments\n           '(\n            (emacs-lisp \"common-lispcode\")\n             ))\n     (setq org-export-latex-minted-options\n           '((\"frame\" \"lines\")\n             (\"fontsize\" \"\\\\scriptsize\")\n             (\"linenos\" \"\")))\n     (setq org-latex-to-pdf-process\n           '(\"pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f\"\n             \"pdflatex -shell-escape -interact
 ion nonstopmode -output-directory %o %f\"\n             \"pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f\"))\n#+end_src\n\n#+name: another-listing\n#+begin_src pytho
 n 
>  :exports code\n   x = str(y)\n#+end_src\n" 0 22 (fontified t font-lock-fontified t face org-meta-line) 22 23 (fontified t font-lock-fontified t face org-meta-line) 23 58 (fontified t font-lock-fontified t face org-meta-line) 58 59 (fontified t font-lock-fontified t face org-meta-line) 59 97 (fontified t font-lock-fontified t face org-meta-line) 97 98 (fontified t font-lock-fontified t face org-meta-line) 98 161 (fontified t font-lock-fontified t face org-meta-line) 161 162 (fontified t font-lock-fontified t face org-meta-line) 162 163 (fontified t :org-license-to-kill t) 163 183 (fontified t font-lock-fontified t face org-meta-line) 183 184 (fontified t font-lock-fontified t face org-meta-line) 184 236 (fontified t font-lock-fontified t face org-block-begin-line font-lock-multiline t) 2
 36 237 (fontified t font-lock-fontified t font-lock-multiline t face org-block-begin-line) 237 524 (fontified t font-lock-fontified t font-lock-multiline t face org-block :org-license-to-kil
 l 
>  t) 524 764 (fontified t font-lock-fontified t font-lock-multiline t face org-block :org-license-to-kill t) 764 852 (fontified t font-lock-fontified t font-lock-multiline t face org-block :org-license-to-kill t) 852 853 (fontified t font-lock-fontified t font-lock-multiline t face org-block :org-license-to-kill t) 853 862 (fontified t font-lock-fontified t face org-block-end-line font-lock-multiline t) 862 863 (fontified t font-lock-fontified t face org-block-end-line) 863 864 (fontified t :org-license-to-kill t) 864 887 (fontified t font-lock-fontified t face org-meta-line) 887 888 (fontified t font-lock-fontified t face org-meta-line) 888 920 (fontified t font-lock-fontified t face org-block-begin-line font-lock-multiline t) 920 921 (fontified t font-lock-fontified t font-lock-multilin
 e t face org-block-begin-line) 921 934 (fontified t font-lock-fontified t font-lock-multiline t face org-block :org-license-to-kill t) 934 935 (fontified t font-lock-fontified t font-lock-mu
 lt
>  iline t face org-block :org-license-to-kill t) 935 944 (fontified t font-lock-fontified t face org-block-end-line font-lock-multiline t) 944 945 (fontified t rear-nonsticky t face org-block-end-line)) :emph-multiline t :for-backend latex :comments nil :tags t :priority nil :footnotes t :drawers t :timestamps t :todo-keywords t :tasks t :add-text nil :skip-before-1st-heading nil :select-tags ("export") :exclude-tags ("noexport") :LaTeX-fragments nil)
...
>   org-export-as-latex(nil nil nil nil nil nil)
...

  reply	other threads:[~2012-01-27 15:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-27 13:07 Invalid read syntax "#"? Alan Schmitt
2012-01-27 15:24 ` Nick Dokos
2012-01-27 15:37   ` Nick Dokos [this message]
2012-01-28 15:55 ` Bastien
2012-01-30 13:15   ` Alan Schmitt

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=29587.1327678657@alphaville \
    --to=nicholas.dokos@hp.com \
    --cc=alan.schmitt@polytechnique.org \
    --cc=emacs-orgmode@gnu.org \
    /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).