[O] export (to gfm) with file local variables
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---
Re: [O] export (to gfm) with file local variables
I forgot... Andreas Leha andreas.l...@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
Re: [O] export (to gfm) with file local variables
Andreas Leha andreas.l...@med.uni-goettingen.de writes: I forgot... Andreas Leha andreas.l...@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
Re: [O] export (to gfm) with file local variables
Hi Nick, Nick Dokos ndo...@gmail.com writes: Andreas Leha andreas.l...@med.uni-goettingen.de writes: I forgot... Andreas Leha andreas.l...@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
Re: [O] export (to gfm) with file local variables
Hi Nick, Nick Dokos ndo...@gmail.com writes: Andreas Leha andreas.l...@med.uni-goettingen.de writes: Hi Nick, Nick Dokos ndo...@gmail.com writes: Andreas Leha andreas.l...@med.uni-goettingen.de writes: I forgot... Andreas Leha andreas.l...@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 h2Table of Contents/h2 div id=text-table-of-contents ul lia href=#orgheadline11. Test File/a/li /ul /div /div !-- Some Comment -- # Test Filea 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
Re: [O] export (to gfm) with file local variables
Hello, Nick Dokos ndo...@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 h2Table of Contents/h2 div id=text-table-of-contents ul lia href=#orgheadline11. Test File/a/li /ul /div /div !-- Some Comment -- # Test Filea 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
Re: [O] export (to gfm) with file local variables
Andreas Leha andreas.l...@med.uni-goettingen.de writes: Hi Nick, Nick Dokos ndo...@gmail.com writes: Andreas Leha andreas.l...@med.uni-goettingen.de writes: I forgot... Andreas Leha andreas.l...@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 h2Table of Contents/h2 div id=text-table-of-contents ul lia href=#orgheadline11. Test File/a/li /ul /div /div !-- Some Comment -- # Test Filea 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
Re: [O] export (to gfm) with file local variables
Andreas Leha andreas.l...@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
Re: [O] export (to gfm) with file local variables
Nick Dokos ndo...@gmail.com writes: Andreas Leha andreas.l...@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
Re: [O] export (to gfm) with file local variables
Hi Nicolas, Nicolas Goaziou m...@nicolasgoaziou.fr writes: Hello, Nick Dokos ndo...@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 h2Table of Contents/h2 div id=text-table-of-contents ul lia href=#orgheadline11. Test File/a/li /ul /div /div !-- Some Comment -- # Test Filea 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