emacs-orgmode
[Top][All Lists]
Advanced

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

[O] ASCII art in org src mode triggers font lock glitch


From: Jisang Yoo
Subject: [O] ASCII art in org src mode triggers font lock glitch
Date: Wed, 17 Jul 2013 20:45:38 +0900

Short description:

Invoking C-c ' (org-edit-special) on an org src block containing an
ascii diagram causes table recognition and font lock glitch if the
diagram has a rectangle in it.




Long description:

Invoke C-c ' on any of the following three src blocks

#+BEGIN_SRC artist
  +---------+
  |         |
  |  box1   |
  |         |
  +---------+
#+END_SRC

#+BEGIN_EXAMPLE
  +---------+
  |         |
  |  box2   |
  |         |
  +---------+
#+END_EXAMPLE

#+BEGIN_ASCII
  +---------+
  |         |
  |  box3   |
  |         |
  +---------+
#+END_ASCII

and org src mode will trigger table recognition (message "Recognizing
tables...done" in echo area) and leave some font lock glitch such as
blue background inside the rectangle. Another glitch is that if the
user uses variable-pitch for text outside source blocks and
fixed-pitch for text inside them, the org-src-mode buffer will be in
variable-pitch font after table recognition is triggered.

This bug sometimes disappear on second invoke of org-edit-special of
the same block.




Workarounds for now:

1. Prefixing the diagram (with dots in this case):

#+BEGIN_EXAMPLE
  . +---------+
  . |         |
  . |   box   |
  . |         |
  . +---------+
#+END_EXAMPLE

2. Using a colon block which does not have the benefit of being foldable:

: +---------+
: |         |
: |   box   |
: |         |
: +---------+

3. Not using + in rectangle corners:

#+BEGIN_EXAMPLE
   ---------
  |         |
  |   box   |
  |         |
   ---------
#+END_EXAMPLE



reply via email to

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