From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: export (to gfm) with file local variables Date: Fri, 21 Aug 2015 16:17:28 -0400 Message-ID: <8737zcz99j.fsf@alphaville.usersys.redhat.com> References: <87mvxkvh84.fsf@alphaville.usersys.redhat.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57425) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZSskw-0006QC-8x for emacs-orgmode@gnu.org; Fri, 21 Aug 2015 16:17:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZSskr-0005r3-6m for emacs-orgmode@gnu.org; Fri, 21 Aug 2015 16:17:42 -0400 Received: from plane.gmane.org ([80.91.229.3]:38299) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZSskq-0005oh-Va for emacs-orgmode@gnu.org; Fri, 21 Aug 2015 16:17:37 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1ZSskp-0000rE-Uf for emacs-orgmode@gnu.org; Fri, 21 Aug 2015 22:17:36 +0200 Received: from nat-pool-bos-t.redhat.com ([66.187.233.206]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 21 Aug 2015 22:17:35 +0200 Received: from ndokos by nat-pool-bos-t.redhat.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 21 Aug 2015 22:17:35 +0200 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 Andreas Leha writes: > Hi Nick, > > Nick Dokos writes: >> Andreas Leha writes: >> >>> I forgot... >>> >>> Andreas Leha writes: >>>> Hi all, >>>> >>>> How can I make my toy sample file below export properly to github >>>> flavoured markdown (using ox-gfm)? >>>> >>>> (Of course including the file local variables in exported *.md file...) >>> >>> ... and without having them apply to the current *.org file. >>> >>>> >>>> If I try I get >>>> ,---- >>>> | hack-local-variables: Malformed local variable line: "" >>>> `---- >>>> >>>> Thanks, >>>> Andreas >>>> >>>> >>>> PS: the sample file >>>> >>>> #+md: >>>> >>>> * Test File >>>> >>>> With text. >>>> >>>> >>>> #+md: >>> >>> >> >> Add a noexport section with a control-L as contents at the end. >> Emacs only looks at the last "page" of the file for local variables >> so the control-L will stop it. >> > > Thanks! That is amazing! That solves my second problem. So, the > original *.org file is indeed opened in Org mode. Nice. > > > Now I still need to know how to export to github flavoured markdown > (gfm) with the file local variables set. This still fails with > ,---- > | hack-local-variables: Malformed local variable line: "" > `---- > > Any help with that? > That seems to be caused by the empty lines in the Local Variables: section of the md file: --8<---------------cut here---------------start------------->8---

Table of Contents

# Test File With text. --8<---------------cut here---------------end--------------->8--- If I get rid of them manually, I think it goes away (although I don't have gfm installed, so it complains about gfm-mode). That seems to be an ox-md (or perhaps ox-html) issue however and I'm not equipped to wade into those waters. Assuming this is correct, maybe you can add a filter to get rid of the empty lines? Nick