From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.help Subject: Re: org-mode source blocks Date: Tue, 21 Dec 2010 17:36:20 +0100 Message-ID: <87pqsvw0aj.fsf@member.fsf.org> References: <9c66c8c3-8fb6-40c5-b718-feaa319fe6ee@q18g2000vbk.googlegroups.com> <87hbe779hl.fsf@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1292949686 14392 80.91.229.12 (21 Dec 2010 16:41:26 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 21 Dec 2010 16:41:26 +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 17:41: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 1PV5H1-0005Pl-81 for geh-help-gnu-emacs@m.gmane.org; Tue, 21 Dec 2010 17:41:15 +0100 Original-Received: from localhost ([127.0.0.1]:33674 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PV5H0-0005Yy-IT for geh-help-gnu-emacs@m.gmane.org; Tue, 21 Dec 2010 11:41:14 -0500 Original-Received: from [140.186.70.92] (port=40189 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PV5GD-0005Rn-Hb for help-gnu-emacs@gnu.org; Tue, 21 Dec 2010 11:40:26 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PV5G9-0000Ei-Mj for help-gnu-emacs@gnu.org; Tue, 21 Dec 2010 11:40:25 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]:46783) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PV5G9-0000Dv-Fr for help-gnu-emacs@gnu.org; Tue, 21 Dec 2010 11:40:21 -0500 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1PV5Fu-0004Ja-Hc for help-gnu-emacs@gnu.org; Tue, 21 Dec 2010 17:40:06 +0100 Original-Received: from tsdh.uni-koblenz.de ([141.26.67.142]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 21 Dec 2010 17:40:06 +0100 Original-Received: from tassilo by tsdh.uni-koblenz.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 21 Dec 2010 17:40:06 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 37 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: tsdh.uni-koblenz.de User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:dkgjCH0tquVKHRqfKxX4U6jhmWs= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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:77742 Archived-At: 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