all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Linus Arver <linusarver@gmail.com>
To: emacs-orgmode@gnu.org
Cc: hniksic@xemacs.org
Subject: Re: including files and org-src-preserve-indentation
Date: Fri, 20 Feb 2015 21:10:31 -0800	[thread overview]
Message-ID: <20150221051030.GA24130@k0> (raw)
In-Reply-To: <20150221032716.GA12319@k0>

[-- Attachment #1: Type: text/plain, Size: 1951 bytes --]

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 <linusarver@gmail.com> 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/

[-- Attachment #2: minimal-org.el --]
[-- Type: text/plain, Size: 668 bytes --]

;; 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 "<link rel=\"stylesheet\"
                href=\"css/style.css\"
                type=\"text/css\"/>"
		)
	)
)

[-- Attachment #3: foo.org --]
[-- Type: application/vnd.lotus-organizer, Size: 34 bytes --]

[-- Attachment #4: bar.hs --]
[-- Type: text/x-haskell, Size: 48 bytes --]

main :: IO ()
main = do
	putStrLn "hello world"

  reply	other threads:[~2015-02-21  5:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-22  0:34 including files and org-src-preserve-indentation Linus Arver
2015-02-08  5:32 ` Linus Arver
2015-02-15 17:36   ` Nicolas Goaziou
2015-02-21  3:27     ` Linus Arver
2015-02-21  5:10       ` Linus Arver [this message]
2015-03-10  8:35       ` Nicolas Goaziou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150221051030.GA24130@k0 \
    --to=linusarver@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=hniksic@xemacs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.