Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Org-mode: Verbatim Environments

Tags:

emacs

org-mode

Say I would like to have some text in a verbatim environment in org-mode where table shortcuts are disabled.

For example, consider the following text:

|-- 05102013
|   |-- 1826
|   |-- 6500
|   |-- 6501
|   |-- 6502
|   |-- 6503
|   `-- readme

If I put it within an EXAMPLE literal folder:

#+BEGIN_EXAMPLE
|-- 05102013
|   |-- 1826
|   |-- 6500
|   |-- 6501
|   |-- 6502
|   |-- 6503
|   `-- readme
#+END_EXAMPLE

and I accidentally press <TAB> on any line in the text above. org-mode automatically re-organizes the text to make it look like a table:

|------------+---------|
|            | -- 1826 |
|            | -- 6500 |
|            | -- 6501 |
|            | -- 6502 |
|            | -- 6503 |
| `-- readme |         |

which I don't want. Does org-mode provide any environments or blocks in which the automatic table-creation mechanism is disabled?

like image 318
Amelio Vazquez-Reina Avatar asked Jun 10 '13 22:06

Amelio Vazquez-Reina


1 Answers

You can wrap your text in a source block like this:

#+begin_src text
  |-- 05102013
  |   |-- 1826
  |   |-- 6500
  |   |-- 6501
  |   |-- 502
  |   |-- 6503
  |   `-- readme
#+end_src

TAB inside the block will not reformat your text as a table, but will insert spaces to the next tab stop.

If this still annoys you, you may try c instead of text, where TAB will try (and fail) to auto indent instead of adding spaces.

like image 60
Juancho Avatar answered Nov 15 '22 20:11

Juancho