From mboxrd@z Thu Jan 1 00:00:00 1970 From: Linus Arver Subject: Re: including files and org-src-preserve-indentation Date: Fri, 20 Feb 2015 21:10:31 -0800 Message-ID: <20150221051030.GA24130@k0> References: <20150122003449.GA28336@k0> <20150208053240.GA18082@k0> <87oaovjcv6.fsf@nicolasgoaziou.fr> <20150221032716.GA12319@k0> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="h31gzZEtNLTqOjlF" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55951) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YP2Kv-0006HA-Hh for emacs-orgmode@gnu.org; Sat, 21 Feb 2015 00:10:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YP2Kq-00039g-LF for emacs-orgmode@gnu.org; Sat, 21 Feb 2015 00:10:41 -0500 Received: from mail-pa0-x22c.google.com ([2607:f8b0:400e:c03::22c]:42706) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YP2Kq-00039X-AR for emacs-orgmode@gnu.org; Sat, 21 Feb 2015 00:10:36 -0500 Received: by padhz1 with SMTP id hz1so13104961pad.9 for ; Fri, 20 Feb 2015 21:10:35 -0800 (PST) Content-Disposition: inline In-Reply-To: <20150221032716.GA12319@k0> 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: emacs-orgmode@gnu.org Cc: hniksic@xemacs.org --h31gzZEtNLTqOjlF Content-Type: text/plain; charset=us-ascii Content-Disposition: inline For the record, attached are the files for the ECM I used to test. -L On Fri, Feb 20, 2015 at 07:27:18PM -0800, Linus Arver wrote: > On Sun, Feb 15, 2015 at 06:36:29PM +0100, Nicolas Goaziou wrote: > > Hello, > > > > Linus Arver writes: > > > > >> When I call org-publish-current-project, the included file's TAB > > >> characters automatically become converted into spaces. Is there an > > >> orgmode way of preventing this auto-conversion? > > > > I cannot reproduce it. Could you provide an ECM? > > So, after I created a minimal complete example (ECM), I loaded in the > latest org-mode (Git HEAD) and realized that the problem does not exist > in Org. It is with the `htmlize` [1] package. That is, if I simply > uninstall that package from my MELPA folder, the tabs stay as tabs, > regardless of what version of Org (latest Git HEAD or 8.2.10) I use. > > > Also, what happens if > > you do a regular export (no publishing)? > > If I call `org-html-export-to-html`, I get the same behavior. I.e., if I > have `htmlize` installed, the tabs get converted into spaces. If I > remove `htmlize`, the tabs are preserved nicely. > > I would file a bug report upstream, but it appears that `htmlize` does > not have a website. It looks like the official version of `htmlize` [2] > has "untabify" (grep it) hardcoded into the program, so a quick fix may > not be in order any time soon. > > Meanwhile from the Org side, perhaps we can have a way to let the user > select which program to use for syntax highlighting? Maybe something > external like Pygments [3]? > > It would be helpful if Org could tell the user that it found (or did not > find) the `htmlize` package and that it was used (or not used) when > calling either `org-publish-current-project` or > `org-html-export-to-html`. > > -L > > [1]: http://melpa.org/#/htmlize > [2]: http://fly.srk.fer.hr/~hniksic/emacs/htmlize.el.cgi > [3]: http://pygments.org/ --h31gzZEtNLTqOjlF Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="minimal-org.el" ;; activate debugging (setq debug-on-error t debug-on-signal nil debug-on-quit nil) ;; add latest org-mode to load path (add-to-list 'load-path (expand-file-name "~/syscfg/emacs/elpa/htmlize-20130207.120")) (setq org-src-preserve-indentation t) (setq org-publish-project-alist '( ("foobar" :base-directory "~/foobar" :base-extension "org" :publishing-directory "~/foobar/public_html" :publishing-function org-html-publish-to-html :section-numbers t :with-toc t :html-preamble t :html-head "" ) ) ) --h31gzZEtNLTqOjlF Content-Type: application/vnd.lotus-organizer Content-Disposition: attachment; filename="foo.org" Content-Transfer-Encoding: quoted-printable #+include: "bar.hs" :src haskell=0A --h31gzZEtNLTqOjlF Content-Type: text/x-haskell; charset=us-ascii Content-Disposition: attachment; filename="bar.hs" main :: IO () main = do putStrLn "hello world" --h31gzZEtNLTqOjlF--