[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Orgmode] Need help exporting subtrees to html
From: |
Juan Reyero |
Subject: |
Re: [Orgmode] Need help exporting subtrees to html |
Date: |
Thu, 31 Dec 2009 14:50:23 +0100 |
On Thu, Dec 31, 2009 at 9:15 AM, Carsten Dominik
<address@hidden> wrote:
> On Dec 27, 2009, at 8:31 PM, Juan Reyero wrote:
>> On Sun, Dec 27, 2009 at 7:35 PM, Carsten Dominik
>> <address@hidden> wrote:
>>> On Dec 27, 2009, at 5:34 PM, Juan Reyero wrote:
>>>> I have written a function to export org-mode subtrees as jekyll posts,
>>>> http://juanreyero.com/open/org-jekyll/ The idea is that any entry in
>>>> an org-publish project that has a :blog: keyword and an :on: property
>>>> with a timestamp should be exported to a _posts directory with the
>>>> year-month-day-title.html that jekyll expects, with the properties as
>>>> front-matter.
>>>>
>>>> I was very happy with it, until I realized that the levels of the
>>>> headers in the exported file (h2, h3, etc) depend on the indentation
>>>> of the subtree in the outline. I wanted to be able to add a :blog:
>>>> subtree anywhere in my project's files, and get it always exported the
>>>> same, regardless of where in the outline it is.
>>>>
>>>> Is there any reasonably simple way to overcome this problem? I am
>>>> using:
>>>>
>>>> (org-narrow-to-subtree)
>>>> (setq html (org-export-as-html nil nil nil 'string t nil))
>>>
>>> Hi Juan,
>>>
>>> Try this:
>>>
>>> (outline-mark-subtree)
>>> (setq html (org-export-as-html nil nil nil 'string t nil))
>>
>> Thanks for your answer. I've tried it, but now it exports the whole
>> buffer, as if (outline-mark-subtree) didn't understand which subtree I
>> am looking at. I am doing this from within an (org-map-entries). If
>> I first narrow and then mark it doesn't work either: it complains of
>> "Before first headline at position...".
>
> You are right, this does not work as I had hoped. What needs to be
> done is that the tree must be selected, and the region needs to be *active*
> when the export command is called. I am not quite sure right now
> how to do this in the middle of a Lisp program....
Looks like it is not going to be a small investment. For the time
being I'll stick to writing blog posts as first-level entries, and
I'll try to figure it out when I find some more time. Thank you very
much for your answers.
Cheers,
Juan
>> I have updated the tests at http://github.com/juanre/org-jekyll to
>> reflect the problem.
--
http://juanreyero.com/
http://unarueda.com
- [Orgmode] Need help exporting subtrees to html, Juan Reyero, 2009/12/27
- Re: [Orgmode] Need help exporting subtrees to html, Carsten Dominik, 2009/12/27
- Re: [Orgmode] Need help exporting subtrees to html, Juan Reyero, 2009/12/27
- Re: [Orgmode] Need help exporting subtrees to html, Carsten Dominik, 2009/12/31
- Re: [Orgmode] Need help exporting subtrees to html,
Juan Reyero <=
- Re: [Orgmode] Need help exporting subtrees to html, Eric Schulte, 2009/12/31
- Re: [Orgmode] Need help exporting subtrees to html, Eric Schulte, 2009/12/31
- Re: [Orgmode] Need help exporting subtrees to html, Juan Reyero, 2009/12/31
- Re: [Orgmode] Need help exporting subtrees to html, Eric Schulte, 2009/12/31