From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Lundin Subject: Re: multiple modes in single buffer? Date: Fri, 20 May 2011 19:12:38 -0400 Message-ID: <87fwo955ll.fsf@fastmail.fm> References: <4DD6E93E.4060604@therogoffs.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:57651) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QNYs8-0008G0-RN for emacs-orgmode@gnu.org; Fri, 20 May 2011 19:12:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QNYs7-0006uk-P1 for emacs-orgmode@gnu.org; Fri, 20 May 2011 19:12:44 -0400 Received: from out5.smtp.messagingengine.com ([66.111.4.29]:41688) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QNYs7-0006uZ-Ms for emacs-orgmode@gnu.org; Fri, 20 May 2011 19:12:43 -0400 In-Reply-To: <4DD6E93E.4060604@therogoffs.com> (David Rogoff's message of "Fri, 20 May 2011 15:20:46 -0700") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: David Rogoff Cc: emacs-orgmode@gnu.org David Rogoff writes: > I have a feeling I know the answer, but it's worth bringing up. I'd > like to have multiple modes for different regions of a file. I'm > using the "-*- mode: org -*-" as the first line of my org files. > However, many of my org files contains bits of c and Verilog code. > I'd like these regions to be formatted and use the faces for those > modes. > > Is this possible? Yes. Source blocks and org-babel provide all sorts of ways to include bits of code (and their results/output) in an org file. (info "(org) Working With Source Code") The variables org-src-fontify-natively and org-src-tab-acts-natively might be of particular interest. Best, Matt