From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bernt Hansen Subject: Re: usage of bgein_src in 'Literal examples' section Date: Wed, 04 Jun 2008 20:30:53 -0400 Message-ID: <87prqw67uq.fsf@gollum.intra.norang.ca> References: <87tzg8n8oe.fsf@pdrechsler.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K43Nm-0001YR-90 for emacs-orgmode@gnu.org; Wed, 04 Jun 2008 20:31:10 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K43Nl-0001XI-9T for emacs-orgmode@gnu.org; Wed, 04 Jun 2008 20:31:09 -0400 Received: from [199.232.76.173] (port=60439 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K43Nl-0001XC-6F for emacs-orgmode@gnu.org; Wed, 04 Jun 2008 20:31:09 -0400 Received: from mho-02-bos.mailhop.org ([63.208.196.179]:54846) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1K43Nl-0006EO-4u for emacs-orgmode@gnu.org; Wed, 04 Jun 2008 20:31:09 -0400 In-Reply-To: <87tzg8n8oe.fsf@pdrechsler.de> (Patrick Drechsler's message of "Thu\, 05 Jun 2008 00\:21\:05 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Patrick Drechsler Cc: emacs-orgmode@gnu.org Patrick Drechsler writes: > I like the new feature in "literal examples" using #+BEGIN_SRC ! > > But how do I find which mode Emacs is using for a certain file type? > > I could not figure out how to replace for simple C or CPP files. > > Here is a simple C file: > > --8<---------------cut here---------------start------------->8--- > int main(void) > { > return 0; > } > --8<---------------cut here---------------end--------------->8--- > > I have tried different results from `M-x describe-mode' as well as stuff > like: > > #+BEGIN_SRC c > #+BEGIN_SRC c/law > #+BEGIN_SRC cc > #+BEGIN_SRC c-mode > #+BEGIN_SRC cc-mode > > What is the correct to insert? > This works for me: * C Source Example #+BEGIN_SRC c int main(void) { return 0; } #+END_SRC And then C-c ' anywhere inside the block HTH -Bernt