[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: org-mode source blocks
From: |
Tassilo Horn |
Subject: |
Re: org-mode source blocks |
Date: |
Tue, 21 Dec 2010 17:36:20 +0100 |
User-agent: |
Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux) |
marcowahl@gmail.com (Marco (m) Wahl) writes:
>> #+ 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++".
And I'm pretty sure that the code between the #+begin_src/end_src
markers should be put as-is, i.e., without leading :.
Bye,
Tassilo