[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] source block coloring inconsistency

From: Rustom Mody
Subject: [O] source block coloring inconsistency
Date: Thu, 17 Apr 2014 13:52:07 +0530

Ive struggling with source code blocks for a few days.
After not managing inline source in some cases I tried to switch to
display blocks.  Here again after trying for a couple of days I
thought I was on an org bug.

Finally I find its not a bug. However the hinting given by the
coloring of code-blocks could perhaps be improved???

Heres the example file (heavily cut down)
#+TITLE: Unicode in Python
#+OPTIONS: toc:nil
* Introduction
Python has been making long strides in embracing unicode.
However it is arguably only half-way yet -- python programs can
/support/ unicode well however python program- /source/ is still
completely ASCII.

Well… Actually with python 3 (not 2) this is already possible
#+BEGIN_SRC python
>>> α, β, γ = 1,2,3
>>> (α, β, γ)
(1, 2, 3)
* Legend
** Math Space Advantage -- MSA

Below I will point such cases out with a 'MSA'. In some cases its
technically required to have spaces, in others its just more
aesthetic to have them.
#+BEGIN_SRC python
x in lst
#+END_SRC python
cannot be written as

#+BEGIN_SRC python
#+END_SRC python

Some blocks export (to html) correct; some dont.
Finally traced it to the end line:
#+END_SRC python
which should be

However emacs shows the end line in red as though it recognized it.

Could the fontlock highlighter and the exporter be consistent with
respect to syntax?

IOW for a block ending as follows:
#+BEGIN_SRC python

If it is wrong it should not be colored as a block

If it is right then export should work on it as a block


org version: 8.2.5e
emacs version 24.3.1

reply via email to

[Prev in Thread] Current Thread [Next in Thread]