* including files and org-src-preserve-indentation
@ 2015-01-22 0:34 Linus Arver
2015-02-08 5:32 ` Linus Arver
0 siblings, 1 reply; 6+ messages in thread
From: Linus Arver @ 2015-01-22 0:34 UTC (permalink / raw)
To: emacs-orgmode
Hello list,
I have line like this in my .org file:
#+include: "src/frankenB.hs" :src haskell -n
That file has literal TAB characters in it. I also have
(setq org-src-preserve-indentation t)
in my .emacs.
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'm using orgmode 8.2.10 with emacs 24.4.
Thanks,
-L
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: including files and org-src-preserve-indentation
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
0 siblings, 1 reply; 6+ messages in thread
From: Linus Arver @ 2015-02-08 5:32 UTC (permalink / raw)
To: emacs-orgmode
My more detailed configuration is below.
Emacs : GNU Emacs 24.4.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.14.7)
of 2015-01-17 on bisson
Package: Org-mode version 8.2.10 (release_8.2.10 @ /usr/share/emacs/24.4/lisp/org/)
current state:
==============
(setq
org-tab-first-hook '(org-hide-block-toggle-maybe org-src-native-tab-command-maybe org-babel-hide-result-toggle-maybe
org-babel-header-arg-expand)
org-speed-command-hook '(org-speed-command-default-hook org-babel-speed-command-hook)
org-occur-hook '(org-first-headline-recenter)
org-metaup-hook '(org-babel-load-in-session-maybe)
org-html-format-drawer-function '(lambda (name contents) contents)
org-latex-format-inlinetask-function 'ignore
org-confirm-shell-link-function 'yes-or-no-p
org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default
org-latex-format-headline-function 'org-latex-format-headline-default-function
org-after-todo-state-change-hook '(org-clock-out-if-current)
org-latex-format-drawer-function '(lambda (name contents) contents)
org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer)
org-agenda-before-write-hook '(org-agenda-add-entry-text)
org-babel-pre-tangle-hook '(save-buffer)
org-mode-hook '(#[nil "\300\301\302\303\304$\207" [org-add-hook change-major-mode-hook org-show-block-all append local] 5]
#[nil "\300\301\302\303\304$\207" [org-add-hook change-major-mode-hook org-babel-show-result-all append local] 5]
org-babel-result-hide-spec org-babel-hide-all-hashes)
org-ascii-format-drawer-function '(lambda (name contents width) contents)
org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point org-babel-execute-safely-maybe)
org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers org-cycle-hide-inline-tasks org-cycle-show-empty-lines
org-optimize-window-after-visibility-change)
org-confirm-elisp-link-function 'yes-or-no-p
org-metadown-hook '(org-babel-pop-to-session-maybe)
org-html-format-headline-function 'ignore
org-src-preserve-indentation t
org-html-format-inlinetask-function 'ignore
org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
org-publish-project-alist '(("eh" :base-directory "~/prog/elementary-haskell/" :publishing-directory
"~/prog/elementary-haskell/public_html" :publishing-function org-html-publish-to-html :section-numbers t
:with-toc t :html-preamble t :html-head
"<link rel=\"stylesheet\"\n href=\"css/style.css\"\n type=\"text/css\"/>")
)
)
Thanks,
-L
On Wed, Jan 21, 2015 at 04:34:50PM -0800, Linus Arver wrote:
> Hello list,
>
> I have line like this in my .org file:
>
> #+include: "src/frankenB.hs" :src haskell -n
>
> That file has literal TAB characters in it. I also have
>
> (setq org-src-preserve-indentation t)
>
> in my .emacs.
>
> 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'm using orgmode 8.2.10 with emacs 24.4.
>
> Thanks,
> -L
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: including files and org-src-preserve-indentation
2015-02-08 5:32 ` Linus Arver
@ 2015-02-15 17:36 ` Nicolas Goaziou
2015-02-21 3:27 ` Linus Arver
0 siblings, 1 reply; 6+ messages in thread
From: Nicolas Goaziou @ 2015-02-15 17:36 UTC (permalink / raw)
To: Linus Arver; +Cc: emacs-orgmode
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? Also, what happens if
you do a regular export (no publishing)?
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: including files and org-src-preserve-indentation
2015-02-15 17:36 ` Nicolas Goaziou
@ 2015-02-21 3:27 ` Linus Arver
2015-02-21 5:10 ` Linus Arver
2015-03-10 8:35 ` Nicolas Goaziou
0 siblings, 2 replies; 6+ messages in thread
From: Linus Arver @ 2015-02-21 3:27 UTC (permalink / raw)
To: emacs-orgmode; +Cc: hniksic
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/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: including files and org-src-preserve-indentation
2015-02-21 3:27 ` Linus Arver
@ 2015-02-21 5:10 ` Linus Arver
2015-03-10 8:35 ` Nicolas Goaziou
1 sibling, 0 replies; 6+ messages in thread
From: Linus Arver @ 2015-02-21 5:10 UTC (permalink / raw)
To: emacs-orgmode; +Cc: hniksic
[-- 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"
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: including files and org-src-preserve-indentation
2015-02-21 3:27 ` Linus Arver
2015-02-21 5:10 ` Linus Arver
@ 2015-03-10 8:35 ` Nicolas Goaziou
1 sibling, 0 replies; 6+ messages in thread
From: Nicolas Goaziou @ 2015-03-10 8:35 UTC (permalink / raw)
To: Linus Arver; +Cc: hniksic, emacs-orgmode
Hello,
Linus Arver <linusarver@gmail.com> writes:
> 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]?
Would you want to provide a patch for that?
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-03-10 8:34 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2015-03-10 8:35 ` Nicolas Goaziou
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.