From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Fontification for the inner bloc of two nested bloc Date: Tue, 10 Oct 2017 09:16:15 +0200 Message-ID: <87k203fp6o.fsf@nicolasgoaziou.fr> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36780) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e1om6-0005aE-1a for emacs-orgmode@gnu.org; Tue, 10 Oct 2017 03:16:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e1om5-0002sp-Aj for emacs-orgmode@gnu.org; Tue, 10 Oct 2017 03:16:22 -0400 Received: from relay2-d.mail.gandi.net ([2001:4b98:c:538::194]:56412) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1e1om5-0002rb-4P for emacs-orgmode@gnu.org; Tue, 10 Oct 2017 03:16:21 -0400 In-Reply-To: (=?utf-8?Q?=22Pierre-Andr=C3=A9?= Cornillon"'s message of "Sat, 7 Oct 2017 11:11:39 +0200") 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" To: =?utf-8?Q?Pierre-Andr=C3=A9?= Cornillon Cc: emacs-orgmode@gnu.org Hello, Pierre-Andr=C3=A9 Cornillon writes: > Dear orgmode users/gurus, > > I have a question about fontification of inner src bloc. > > I have two nested blocks: one special (outer bloc) and one src (inner > bloc) like this > > #+begin_bloc20171001122500 > #+begin_src R > blip <- runif(2) > test <- rnorm(2) > #+end_src > > #+end_bloc20171001122500 > > and I want to have the native fontification property for the inner one. > > I have already (setq org-src-fontify-natively t) in my .emacs and it > works like a charm for src blocks alone (not nested) but for nested > ones it breaks. > > Is nested blocks are allowed and if so, is that possible to have that > fontification property ? Nested blocks are allowed, but the fontification system has a few shortcomings, including this one. Ultimately, this part of Org needs to be rewritten using the parser. Anyway The bug probably lies in `org-fontify-meta-lines-and-blocks-1'. Do you want to investigate? Regards, --=20 Nicolas Goaziou