From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id Ur7+AEVqmV/aPwAA0tVLHw (envelope-from ) for ; Wed, 28 Oct 2020 12:55:33 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id tyPzN0RqmV9LLAAA1q6Kng (envelope-from ) for ; Wed, 28 Oct 2020 12:55:32 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 5BADC9400EF for ; Wed, 28 Oct 2020 12:55:32 +0000 (UTC) Received: from localhost ([::1]:59162 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kXkzD-0003De-6q for larch@yhetil.org; Wed, 28 Oct 2020 08:55:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38300) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kXkyY-0003DQ-5K for emacs-orgmode@gnu.org; Wed, 28 Oct 2020 08:54:50 -0400 Received: from mail-out02.uio.no ([2001:700:100:8210::71]:53651) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kXkyV-0000J8-9r for emacs-orgmode@gnu.org; Wed, 28 Oct 2020 08:54:49 -0400 Received: from mail-mx10.uio.no ([129.240.10.27]) by mail-out02.uio.no with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93.0.4) (envelope-from ) id 1kXkyQ-0008Cs-FQ for emacs-orgmode@gnu.org; Wed, 28 Oct 2020 13:54:42 +0100 Received: from cm-84.209.16.135.getinternet.no ([84.209.16.135] helo=sputnik.shmi.ifi.uio.no) by mail-mx10.uio.no with esmtpsa (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) user msteffen (Exim 4.93.0.4) (envelope-from ) id 1kXkyP-000BQ6-Rf; Wed, 28 Oct 2020 13:54:42 +0100 From: Martin Steffen To: emacs-orgmode@gnu.org Subject: preserving (zero-space) indenting in begin_src when exporting/publishing (to mark-down) Organization: IFI UiO Norway Date: Wed, 28 Oct 2020 13:54:38 +0100 Message-ID: <86a6w6fr3l.fsf@login.ifi.uio.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-UiO-SPF-Received: Received-SPF: neutral (mail-mx10.uio.no: 84.209.16.135 is neither permitted nor denied by domain of ifi.uio.no) client-ip=84.209.16.135; envelope-from=msteffen@ifi.uio.no; helo=sputnik.shmi.ifi.uio.no; X-UiO-Spam-info: not spam, SpamAssassin (score=-5.0, required=5.0, autolearn=disabled, AWL=0.013, UIO_MAIL_IS_INTERNAL=-5, uiobl=NO, uiouri=NO) X-UiO-Scanned: AE7368B97EBCE53A5975A7FD61F39A66A3131497 X-UiOonly: 4A901B64E68A2A749E6439D70EFD88993F8FD578 Received-SPF: pass client-ip=2001:700:100:8210::71; envelope-from=msteffen@ifi.uio.no; helo=mail-out02.uio.no X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Spam-Score: -1.01 X-TUID: eNF57/cokKbu Hi, 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 enough. For concreteness sake: I got some section #+begin_src markdown --- layout: default title: Some Title description: Some information --- #+end_src 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