From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [bug, ox or ob?] something leaks tabs in src blocks Date: Mon, 26 Oct 2015 15:37:08 +0100 Message-ID: <87vb9ty9uz.fsf@nicolasgoaziou.fr> References: <878u6pzp2s.fsf@gmx.us> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46418) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zqirw-0000po-Pu for emacs-orgmode@gnu.org; Mon, 26 Oct 2015 10:35:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zqirs-0004zX-MZ for emacs-orgmode@gnu.org; Mon, 26 Oct 2015 10:35:28 -0400 Received: from relay4-d.mail.gandi.net ([2001:4b98:c:538::196]:52624) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zqirs-0004zN-G3 for emacs-orgmode@gnu.org; Mon, 26 Oct 2015 10:35:24 -0400 In-Reply-To: <878u6pzp2s.fsf@gmx.us> (rasmus@gmx.us's message of "Mon, 26 Oct 2015 15:23:07 +0100") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Rasmus Cc: emacs-orgmode@gnu.org Hello, Rasmus 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 . Regards, -- Nicolas Goaziou