emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* ASCII art in org src mode triggers font lock glitch
@ 2013-07-17 11:45 Jisang Yoo
  2013-07-17 12:58 ` Bastien
  0 siblings, 1 reply; 3+ messages in thread
From: Jisang Yoo @ 2013-07-17 11:45 UTC (permalink / raw)
  To: emacs-orgmode

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: ASCII art in org src mode triggers font lock glitch
  2013-07-17 11:45 ASCII art in org src mode triggers font lock glitch Jisang Yoo
@ 2013-07-17 12:58 ` Bastien
  2013-07-18 23:00   ` Jisang Yoo
  0 siblings, 1 reply; 3+ messages in thread
From: Bastien @ 2013-07-17 12:58 UTC (permalink / raw)
  To: Jisang Yoo; +Cc: emacs-orgmode

Hi Jisang,

what version of Emacs and Org-mode are you using?

Thanks!

-- 
 Bastien

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: ASCII art in org src mode triggers font lock glitch
  2013-07-17 12:58 ` Bastien
@ 2013-07-18 23:00   ` Jisang Yoo
  0 siblings, 0 replies; 3+ messages in thread
From: Jisang Yoo @ 2013-07-18 23:00 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode

M-x version
GNU Emacs 24.3.1 (i386-mingw-nt6.1.7601) of 2013-03-18 on MARVIN

M-x org-version
Org-mode version 8.0.5 (8.0.5-6-g426917-elpa @
c:/Users/Alice/AppData/Roaming/.emacs.d/elpa/org-20130708/)

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-07-18 23:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-17 11:45 ASCII art in org src mode triggers font lock glitch Jisang Yoo
2013-07-17 12:58 ` Bastien
2013-07-18 23:00   ` Jisang Yoo

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).