emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* problem with code blocks
@ 2011-08-07 23:45 LanX
  2011-08-07 23:48 ` LanX
  2011-08-07 23:57 ` Thomas S. Dye
  0 siblings, 2 replies; 5+ messages in thread
From: LanX @ 2011-08-07 23:45 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 640 bytes --]

Hi

hier a ECM which fails

-----------------------
#+LaTeX_CLASS: beamer
#+startup: beamer

* title

#+BEGIN_Example: perl
 grep { $_ ->[0] }
  X{1,2,3} X{1,2,3} X{1,2,3};
#+END_Example:
---------------------------

originally I tried Begin_src but I wanted to be sure that it has not to do
with highlighting.

I get the message "if: Wrong type argument: stringp, nil"

But deleting the [0] solves the problem

-----------------------------
#+BEGIN_Example: perl
 grep { $_ -> }
  X{1,2,3} X{1,2,3} X{1,2,3};
#+END_Example:
---------------------------

Does org try to find footnotes in code blocks?

Any help appreciated!!!

Cheers
 Rolf

[-- Attachment #2: Type: text/html, Size: 779 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: problem with code blocks
  2011-08-07 23:45 problem with code blocks LanX
@ 2011-08-07 23:48 ` LanX
  2011-08-07 23:57 ` Thomas S. Dye
  1 sibling, 0 replies; 5+ messages in thread
From: LanX @ 2011-08-07 23:48 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 813 bytes --]

Sorry forgot to mention that I tried to export it to pdf or latex!

2011/8/8 LanX <lanx.perl@googlemail.com>

> Hi
>
> hier a ECM which fails
>
> -----------------------
> #+LaTeX_CLASS: beamer
> #+startup: beamer
>
> * title
>
> #+BEGIN_Example: perl
>  grep { $_ ->[0] }
>   X{1,2,3} X{1,2,3} X{1,2,3};
> #+END_Example:
> ---------------------------
>
> originally I tried Begin_src but I wanted to be sure that it has not to do
> with highlighting.
>
> I get the message "if: Wrong type argument: stringp, nil"
>
> But deleting the [0] solves the problem
>
> -----------------------------
> #+BEGIN_Example: perl
>  grep { $_ -> }
>   X{1,2,3} X{1,2,3} X{1,2,3};
> #+END_Example:
> ---------------------------
>
> Does org try to find footnotes in code blocks?
>
> Any help appreciated!!!
>
> Cheers
>  Rolf
>

[-- Attachment #2: Type: text/html, Size: 1157 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: problem with code blocks
  2011-08-07 23:45 problem with code blocks LanX
  2011-08-07 23:48 ` LanX
@ 2011-08-07 23:57 ` Thomas S. Dye
  2011-08-08  6:58   ` LanX
  1 sibling, 1 reply; 5+ messages in thread
From: Thomas S. Dye @ 2011-08-07 23:57 UTC (permalink / raw)
  To: LanX; +Cc: emacs-orgmode

LanX <lanx.perl@googlemail.com> writes:

> Hi
>
> hier a ECM which fails
>
> -----------------------
> #+LaTeX_CLASS: beamer
> #+startup: beamer
>
> * title
>
> #+BEGIN_Example: perl
>  grep { $_ ->[0] }
>   X{1,2,3} X{1,2,3} X{1,2,3};
> #+END_Example:
> ---------------------------
>
> originally I tried Begin_src but I wanted to be sure that it has not to do
> with highlighting.
>
> I get the message "if: Wrong type argument: stringp, nil"
>
> But deleting the [0] solves the problem
>
> -----------------------------
> #+BEGIN_Example: perl
>  grep { $_ -> }
>   X{1,2,3} X{1,2,3} X{1,2,3};
> #+END_Example:
> ---------------------------
>
> Does org try to find footnotes in code blocks?
>
> Any help appreciated!!!
>
> Cheers
>  Rolf
Aloha Rolf,

Try removing the colons after Example.  The following exports fine here:

* Lanx
#+LaTeX_CLASS: beamer
#+startup: beamer

** title

#+BEGIN_Example perl
 grep { $_ ->[0] }
 X{1,2,3} X{1,2,3} X{1,2,3};
#+END_Example

hth,
Tom

> Hihier a ECM which fails-----------------------#+LaTeX_CLASS: beamer#+startup: beamer* title#+BEGIN_Example: perl grep { $_ ->[0] }   X{1,2,3} X{1,2,3} X{1,2,3};#+END_Example:
> ---------------------------originally I tried Begin_src but I wanted to be sure that it has not to do with highlighting.I get the message "if: Wrong type argument: stringp, nil"But deleting the [0] solves the problem
> -----------------------------#+BEGIN_Example: perl
>  grep { $_ -> } 
>   X{1,2,3} X{1,2,3} X{1,2,3};
> #+END_Example:
> ---------------------------
> Does org try to find footnotes in code blocks?Any help appreciated!!!Cheers Rolf

-- 
Thomas S. Dye
http://www.tsdye.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: problem with code blocks
  2011-08-07 23:57 ` Thomas S. Dye
@ 2011-08-08  6:58   ` LanX
  2011-08-08  7:47     ` Sebastien Vauban
  0 siblings, 1 reply; 5+ messages in thread
From: LanX @ 2011-08-08  6:58 UTC (permalink / raw)
  To: Thomas S. Dye; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 400 bytes --]

Aloha Thomas,

Thanks for the suggestion, but the problem persists!

Only replacing the "0" with an "a" helps.



----------------------------------------------
#+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)

[-- Attachment #2: Type: text/html, Size: 502 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: problem with code blocks
  2011-08-08  6:58   ` LanX
@ 2011-08-08  7:47     ` Sebastien Vauban
  0 siblings, 0 replies; 5+ messages in thread
From: Sebastien Vauban @ 2011-08-08  7:47 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-08-08  7:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-07 23:45 problem with code blocks LanX
2011-08-07 23:48 ` LanX
2011-08-07 23:57 ` Thomas S. Dye
2011-08-08  6:58   ` LanX
2011-08-08  7:47     ` Sebastien Vauban

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).