emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Andreas Leha <andreas.leha@med.uni-goettingen.de>
To: emacs-orgmode@gnu.org
Subject: Re: export (to gfm) with file local variables
Date: Fri, 21 Aug 2015 21:30:03 +0100	[thread overview]
Message-ID: <olubne04c6s.fsf@med.uni-goettingen.de> (raw)
In-Reply-To: 8737zcz99j.fsf@alphaville.usersys.redhat.com

Hi Nick,

Nick Dokos <ndokos@gmail.com> writes:
> Andreas Leha <andreas.leha@med.uni-goettingen.de> writes:
>
>> Hi Nick,
>>
>> Nick Dokos <ndokos@gmail.com> writes:
>>> Andreas Leha <andreas.leha@med.uni-goettingen.de> writes:
>>>
>>>> I forgot...
>>>>
>>>> Andreas Leha <andreas.leha@med.uni-goettingen.de> 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: <!-- Some Comment -->
>>>>>
>>>>> * Test File
>>>>>
>>>>> With text.
>>>>>
>>>>>
>>>>> #+md: <!--
>>>>> #+md: Local Variables:
>>>>> #+md:  mode: gfm
>>>>> #+md:  markdown-command: "marked"
>>>>> #+md: End:
>>>>> #+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:
>
> <div id="table-of-contents">
> <h2>Table of Contents</h2>
> <div id="text-table-of-contents">
> <ul>
> <li><a href="#orgheadline1">1. Test File</a></li>
> </ul>
> </div>
> </div>
>
> <!-- Some Comment -->
>
> # Test File<a id="orgheadline1"></a>
>
> With text.
>
> <!--
>
> Local Variables:
>
> mode: gfm
>
> markdown-command: "marked"
>
> End:
>
> -->
>
> 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?
>

Thanks for following that up!  That is interesting.  How did you see
that file with the empty lines?  I do not get anything exported --
neither md nor gfm.

- Andreas

  reply	other threads:[~2015-08-21 20:30 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-21 10:50 export (to gfm) with file local variables Andreas Leha
2015-08-21 10:52 ` Andreas Leha
2015-08-21 14:39   ` Nick Dokos
2015-08-21 19:20     ` Andreas Leha
2015-08-21 20:17       ` Nick Dokos
2015-08-21 20:30         ` Andreas Leha [this message]
2015-08-21 21:36           ` Nick Dokos
2015-08-21 22:42             ` Andreas Leha
2015-08-21 20:36         ` Nicolas Goaziou
2015-08-21 22:43           ` Andreas Leha

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

  List information: https://www.orgmode.org/

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

  git send-email \
    --in-reply-to=olubne04c6s.fsf@med.uni-goettingen.de \
    --to=andreas.leha@med.uni-goettingen.de \
    --cc=emacs-orgmode@gnu.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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).