From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: marcowahl@gmail.com (Marco (m) Wahl) Newsgroups: gmane.emacs.help Subject: Re: org-mode source blocks Date: Tue, 21 Dec 2010 10:36:54 +0100 Organization: Aioe.org NNTP Server Message-ID: <87hbe779hl.fsf@gmail.com> References: <9c66c8c3-8fb6-40c5-b718-feaa319fe6ee@q18g2000vbk.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1292941228 2802 80.91.229.12 (21 Dec 2010 14:20:28 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 21 Dec 2010 14:20:28 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Dec 21 15:20:21 2010 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PV34e-0001xQ-BL for geh-help-gnu-emacs@m.gmane.org; Tue, 21 Dec 2010 15:20:21 +0100 Original-Received: from localhost ([127.0.0.1]:47712 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PV34c-0006SK-TG for geh-help-gnu-emacs@m.gmane.org; Tue, 21 Dec 2010 09:20:18 -0500 Original-Path: usenet.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsgate.cistron.nl!newsgate.news.xs4all.nl!194.109.133.84.MISMATCH!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!feeder.news-service.com!94.75.214.39.MISMATCH!aioe.org!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 40 Original-NNTP-Posting-Host: Znts+l9za1cbYUa8kVmytQ.user.speranza.aioe.org Original-X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.8.2 Cancel-Lock: sha1:tl9V+ofGMbpMphmGkdtwHNoWw/Y= User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) Original-Xref: usenet.stanford.edu gnu.emacs.help:183474 X-Mailman-Approved-At: Tue, 21 Dec 2010 09:13:28 -0500 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:77730 Archived-At: Hill 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