emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Problem with exporting TAB key


From: Vladimir Lomov
Subject: Re: [O] Problem with exporting TAB key
Date: Fri, 6 Apr 2012 10:34:03 +0900
User-agent: Mutt/1.5.21 (2010-09-15)

Hello,
** Nick Dokos [2012-04-05 00:13:10 -0400]:

> Vladimir Lomov <address@hidden> wrote:

>> #+TITLE: Problem with exporting TAB key
>> #+AUTHOR: Vladimir Lomov

>> * How to make TAB key to be exported from ORG document?

>> Consider the following example:
>> #+name: ex1
>> #+BEGIN_SRC sh :exports code
>> sort -t "    " -k 3 -o file2 file1
>> sort -t "    " -k 3 -o file3 file
>> #+END_SRC

>> How I inserting the TAB key in example: for first line I use =C-q
>> C-I=, for second line I use =C-q TAB=, but in tangled file and in
>> exported HTML document it is NOT a TAB just spaces.

>> How to force export and tangle functions not to convert TAB to spaces?


> You can't: org-export-preprocess-string (in lisp/org-exp.el) contains a
> call to untabify:

>       (untabify (point-min) (point-max))

> which converts tabs to spaces, no questions asked. I don't know why that
> is, so maybe Bastien or Carsten can tell us the reason.

> If you are feeling adventurous, you might want to try commenting out
> that call and see what, if anything, breaks.

Just tried, I commented that line in org-exp.el, run Emacs open ORG file
export it to HTML and tangle it. HTML document has spaces instead of TAB
as well as shell file.

If there is no other way to preserve TAB in tangled file (I only concern
with tanlged file) I will use another symbol to separate fields.

>> * COMMENT

>> #+BEGIN_SRC sh :tangle ex.sh :shebang "#!/bin/bash" :noweb yes
>> <<ex1>>
>> #+END_SRC

---
WBR, Vladimir Lomov

-- 
College:
        The fountains of knowledge, where everyone goes to drink.



reply via email to

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