From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Sebastien Vauban" Subject: Re: problem with code blocks Date: Mon, 08 Aug 2011 09:47:27 +0200 Message-ID: <80oc00e44w.fsf@somewhere.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: 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-mXXj517/zsQ@public.gmane.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org To: emacs-orgmode-mXXj517/zsQ@public.gmane.org Hi LanX, LanX wrote: > Thanks for the suggestion, but the problem persists! You see it's easier with an ECM... > Only replacing the "0" with an "a" helps. I don't have that problem. I guess it must have been fixed recently. It clearly is related to [0] being interpreted as a footnote reference... It should not, when in code. Please update your Org-mode version. > ---------------------------------------------- > #+LaTeX_CLASS: beamer > #+startup: beamer > > * Lanx > ** title > > #+BEGIN_Example perl > grep { $_ ->[a] } # <- 0 fails > X{1,2,3} X{1,2,3} X{1,2,3}; > #+END_Example > > ---------------------------------------------- > > type C-c C-e d (or C-c C-e L) BTW, putting the language name after `begin_example' is useless. There is no such concept. You should use the `begin_src' environments, where the language is accepted as parameter: #+begin_src perl grep { $_ ->[0] } # <- 0 does not fail X{1,2,3} X{1,2,3} X{1,2,3}; #+end_src Doing so, instead of: #+begin_src latex \begin{verbatim} grep { $_ ->[0] } # <- 0 does not fail X{1,2,3} X{1,2,3} X{1,2,3}; \end{verbatim} #+end_src you'll get: #+begin_src latex \lstset{language=Perl} \begin{lstlisting} grep { $_ ->[0] } # <- 0 does not fail X{1,2,3} X{1,2,3} X{1,2,3}; \end{lstlisting} #+end_src Best regards, Seb -- Sebastien Vauban