From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: rusi Newsgroups: gmane.emacs.help Subject: Re: sh mode for region only ? Date: Sat, 12 May 2012 20:26:14 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1337034018 12954 80.91.229.3 (14 May 2012 22:20:18 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 14 May 2012 22:20:18 +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 May 15 00:20:15 2012 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SU3cj-0001qt-Fh for geh-help-gnu-emacs@m.gmane.org; Tue, 15 May 2012 00:20:13 +0200 Original-Received: from localhost ([::1]:46966 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SU3ci-0003mo-LQ for geh-help-gnu-emacs@m.gmane.org; Mon, 14 May 2012 18:20:12 -0400 Original-Path: usenet.stanford.edu!news.glorb.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!ns1g2000pbc.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 19 Original-NNTP-Posting-Host: 116.74.131.101 Original-X-Trace: posting.google.com 1336879676 19894 127.0.0.1 (13 May 2012 03:27:56 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Sun, 13 May 2012 03:27:56 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: ns1g2000pbc.googlegroups.com; posting-host=116.74.131.101; posting-account=mBpa7woAAAAGLEWUUKpmbxm-Quu5D8ui User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; Linux i686; rv:10.0.2) Gecko/20100101 Firefox/10.0.2,gzip(gfe) Original-Xref: usenet.stanford.edu gnu.emacs.help:192417 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:84822 Archived-At: On May 10, 8:44=A0am, XeCycle wrote: > Alexandre Oberlin writes: > > Thanks for your suggestion. > > > I tried to check if one of those solutions would work at least > > while editing but none does. Actually in the narrowed region or > > cloned buffer the syntax highlighting seems to take into account > > the unseen text to set the highlighting. I need to copy the sh > > region to a new file to get the correct syntax highlighting. > > Apart from multiple modes, you can try working with Org mode, > which gives a nice way of embedding source code in documents. Yes orgmode, specifically babel, is probably the most stable and sophisticated solution http://orgmode.org/worg/org-contrib/babel/intro.html More lightweight is eepitch http://angg.twu.net/eev-current/eepitch.el.html If you dont mind hackish and not heavily documented