* export (to gfm) with file local variables
@ 2015-08-21 10:50 Andreas Leha
2015-08-21 10:52 ` Andreas Leha
0 siblings, 1 reply; 10+ messages in thread
From: Andreas Leha @ 2015-08-21 10:50 UTC (permalink / raw)
To: emacs-orgmode
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...)
If I try I get
,----
| hack-local-variables: Malformed local variable line: ""
`----
Thanks,
Andreas
PS: the sample file
--8<---------------cut here---------------start------------->8---
#+md: <!-- Some Comment -->
* Test File
With text.
#+md: <!--
#+md: Local Variables:
#+md: mode: gfm
#+md: markdown-command: "marked"
#+md: End:
#+md: -->
--8<---------------cut here---------------end--------------->8---
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: export (to gfm) with file local variables
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
0 siblings, 1 reply; 10+ messages in thread
From: Andreas Leha @ 2015-08-21 10:52 UTC (permalink / raw)
To: emacs-orgmode
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: -->
Thanks,
Andreas
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: export (to gfm) with file local variables
2015-08-21 10:52 ` Andreas Leha
@ 2015-08-21 14:39 ` Nick Dokos
2015-08-21 19:20 ` Andreas Leha
0 siblings, 1 reply; 10+ messages in thread
From: Nick Dokos @ 2015-08-21 14:39 UTC (permalink / raw)
To: emacs-orgmode
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.
Nick
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: export (to gfm) with file local variables
2015-08-21 14:39 ` Nick Dokos
@ 2015-08-21 19:20 ` Andreas Leha
2015-08-21 20:17 ` Nick Dokos
0 siblings, 1 reply; 10+ messages in thread
From: Andreas Leha @ 2015-08-21 19:20 UTC (permalink / raw)
To: emacs-orgmode
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?
For reference, here is my test org file again:
--8<---------------cut here---------------start------------->8---
#+md: <!-- Some Comment -->
* Test File
With text.
#+md: <!--
#+md: Local Variables:
#+md: mode: gfm
#+md: markdown-command: "marked"
#+md: End:
#+md: -->
--8<---------------cut here---------------end--------------->8---
Thanks,
Andreas
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: export (to gfm) with file local variables
2015-08-21 19:20 ` Andreas Leha
@ 2015-08-21 20:17 ` Nick Dokos
2015-08-21 20:30 ` Andreas Leha
2015-08-21 20:36 ` Nicolas Goaziou
0 siblings, 2 replies; 10+ messages in thread
From: Nick Dokos @ 2015-08-21 20:17 UTC (permalink / raw)
To: emacs-orgmode
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:
--8<---------------cut here---------------start------------->8---
<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:
-->
--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
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: export (to gfm) with file local variables
2015-08-21 20:17 ` Nick Dokos
@ 2015-08-21 20:30 ` Andreas Leha
2015-08-21 21:36 ` Nick Dokos
2015-08-21 20:36 ` Nicolas Goaziou
1 sibling, 1 reply; 10+ messages in thread
From: Andreas Leha @ 2015-08-21 20:30 UTC (permalink / raw)
To: emacs-orgmode
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
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: export (to gfm) with file local variables
2015-08-21 20:17 ` Nick Dokos
2015-08-21 20:30 ` Andreas Leha
@ 2015-08-21 20:36 ` Nicolas Goaziou
2015-08-21 22:43 ` Andreas Leha
1 sibling, 1 reply; 10+ messages in thread
From: Nicolas Goaziou @ 2015-08-21 20:36 UTC (permalink / raw)
To: Nick Dokos; +Cc: emacs-orgmode
Hello,
Nick Dokos <ndokos@gmail.com> writes:
> 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?
AFAIR, Markdown requires a blank line between elements (e.g.,
paragraphs). I haven't followed the thread, but can't you use
#+begin_markdown
...
#+end_markdown
instead?
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: export (to gfm) with file local variables
2015-08-21 20:30 ` Andreas Leha
@ 2015-08-21 21:36 ` Nick Dokos
2015-08-21 22:42 ` Andreas Leha
0 siblings, 1 reply; 10+ messages in thread
From: Nick Dokos @ 2015-08-21 21:36 UTC (permalink / raw)
To: emacs-orgmode
Andreas Leha <andreas.leha@med.uni-goettingen.de> writes:
>
> 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.
>
I looked in the " *temp*" buffer (which is normally hidden - note the
initial space), saved it as foo.md and tried to open it: I got the local
variables error.
Nick
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: export (to gfm) with file local variables
2015-08-21 21:36 ` Nick Dokos
@ 2015-08-21 22:42 ` Andreas Leha
0 siblings, 0 replies; 10+ messages in thread
From: Andreas Leha @ 2015-08-21 22:42 UTC (permalink / raw)
To: emacs-orgmode
Nick Dokos <ndokos@gmail.com> writes:
> Andreas Leha <andreas.leha@med.uni-goettingen.de> writes:
>
>>
>> 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.
>>
>
> I looked in the " *temp*" buffer (which is normally hidden - note the
> initial space), saved it as foo.md and tried to open it: I got the local
> variables error.
>
Thanks a lot. Something new to learn every day! That is really useful
to know.
Regards,
Andreas
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: export (to gfm) with file local variables
2015-08-21 20:36 ` Nicolas Goaziou
@ 2015-08-21 22:43 ` Andreas Leha
0 siblings, 0 replies; 10+ messages in thread
From: Andreas Leha @ 2015-08-21 22:43 UTC (permalink / raw)
To: emacs-orgmode
Hi Nicolas,
Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
> Hello,
>
> Nick Dokos <ndokos@gmail.com> writes:
>
>> 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?
>
> AFAIR, Markdown requires a blank line between elements (e.g.,
> paragraphs). I haven't followed the thread, but can't you use
>
> #+begin_markdown
> ...
> #+end_markdown
>
> instead?
>
I can. Thanks a lot. That works as expected.
Regards,
Andreas
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2015-08-21 22:45 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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
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).