help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: org-mode source blocks


From: Marco (m) Wahl
Subject: Re: org-mode source blocks
Date: Tue, 21 Dec 2010 10:36:54 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

Hill <zhubicen@gmail.com> writes:

> I would like use the Source Code Blocks feature within org-mode. But I
> found org-mode can't launch the language mode to edit the Source code.
> 1. Emacs -Q
> 2. M-x org-mode, then the emacs buffer entered the org-mode.
> 3. entering following test:
> #+ srcname trait_demo.cpp
> #+ begin_src c++
> : using namespace std;
> : int main( void )
> : {
> :   string tmp;
> :   while(cin >> tmp)
> :     {
> :       cout << "from pipe: " << tmp << endl;
> :     }
> :
> :
> :   return 0;
> : }
> #+ end_src
>
> 4. C-c ' ;;then emacs lauch a buffer to edit the source code.
> 5. But the mode is "Picture" not c++ mode. Why?
>
> I tried other language like python, it also launch a Picture-mode.
> I would like to know. what's wrong?  My emacs version is 23.2.1 on
> windows xp.
>
> Any body can help? thanks!

Hi Hill,

just remove the space after the "#+" in the lines starting with "#+".
E.g. use "#+begin_src c++" instead of "#+ begin_src c++".

Ciao
-- 
m


reply via email to

[Prev in Thread] Current Thread [Next in Thread]