[Top][All Lists]

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

preserving (zero-space) indenting in begin_src when exporting/publishing

From: Martin Steffen
Subject: preserving (zero-space) indenting in begin_src when exporting/publishing (to mark-down)
Date: Wed, 28 Oct 2020 13:54:38 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)


I have troubles to export (or publish) some orgfiles, which contain
``src'' snippets intended for markdown. The (for me) unwelcome behavior
is the same for org-export and org-publish, I guess, since it has the
same core reason.

The problem currently for me is for the markdown format. I have seen
similar behavior for other exports, though did not care since it for
those situations, it was/is ``good enough''. Now, however, I do some
export to md, to be used for Jekyll webpages, and it's no longer good

For concreteness sake: I got some section

#+begin_src markdown
layout: default
title: Some Title
description: Some information

which is exported to md literally, but with 4 leading spaces as
indentation, like

    layout: default
    title: Some Title
    description: Some information

That's insofar unwelcome, as Jekyll wants those pieces of information
without indentation.

Alright, that's the situation, and the question is:

          is there a way to get rid of that

(during org-exporting/publishing, of course, not just post-processing
the md file).

This is what I tried so far. There are some variables one can tweak

1) org-src--preserve-indentation 
2) org-src-preserve-indentation 
3) org-edit-src-content-indentation

I set the 1) and 2) to "t" (also locally to the file to export). For 3),
the docs state it's about

  "Indentation for the content of a source code block."

So that sounded like it had something to do with my issue. Actually, the
original value was 2, and I set it to 0. There was no effect, the
indentation, when doing export, is still 4, as it was before setting
that to 0.

Any ideas? Thanks, Martin

reply via email to

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