emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] [bug, ox or ob?] something leaks tabs in src blocks


From: Nicolas Goaziou
Subject: Re: [O] [bug, ox or ob?] something leaks tabs in src blocks
Date: Mon, 26 Oct 2015 15:37:08 +0100

Hello,

Rasmus <address@hidden> writes:

> Consider the following example
>
> * test
> #+BEGIN_SRC R
>   test <- function(index, funs, ...){
>       if (missing(funs)) {
>               funs <- list(
>                   "a" = funa,
>                   "b" = funb)}
>
>       col <- vapply(funs, function(FUN) {
>           do.call(FUN, list(index, ...))}, 1.0)
>       col}
> #+END_SRC
>
> It includes no tabs.  When exported with ox-latex or ox-ascii, but not
> ox-html, it has become something along the following, which at least at
> the time of posting contains tabs.  When exporting via xelatex, tabs in
> verbatim shows up as "^^I".
>
> \begin{verbatim}
> test <- function(index, funs, ...){
>     if (missing(funs)) {
>           funs <- list(
>               "a" = funa, # not really
>               "b" = funb,
>               "c" = func)}
>
>     col <- vapply(funs, function(FUN) {
>       do.call(FUN, list(index, ...))}, 1.0)
>     col <- pretty_num(col, rounding = TRUE)
>     names(col) <- names(funs)
>     col}
> \end{verbatim}
>
> Does anyone know WHERE tabs are introduced so I can try to fix this?  It
> seems by the time the src element reaches at least
> org-export-format-code-default it already contains tabs.

This is to be expected if `org-src-preserve-indentation' is nil (since
you didn't use the i flag) and `indent-tabs-mode' is non-nil.

See also <http://permalink.gmane.org/gmane.emacs.orgmode/101768>.

Regards,

-- 
Nicolas Goaziou



reply via email to

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