emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Publishing subsections of an orgmode file (HTML)
@ 2009-07-13 13:59 Ben
  2009-07-13 14:38 ` Matthew Lundin
  0 siblings, 1 reply; 4+ messages in thread
From: Ben @ 2009-07-13 13:59 UTC (permalink / raw)
  To: emacs-orgmode

Hello everybody

I think that's my first post here and I would like first of all to
thank you all for your amazing work.

I've a couple of questions to ask you and I must say I certainly don't
have the skills to understand in-depth answers, unfortunately, if it
involves coding or too fancy configuration but maybe there as
possibility to fix these issues pretty easily (hopefully!).

It turns out that the best way to organize my life with orgmode is to
have a couple of orgfiles (one 'work', one 'personal') and to put
everything in there: meeting reports, todo lists, notes, links,
everything really, wrapped up with Git for file revision control. And
that's brilliant, not too strict so I can directly jump where I want
to insert a new note, not too messy so I can easily find the stuff I'm
looking for.

My first question is: How can I publish a subsection of one of these
files as a webpage (and this subsection only)? I occasionally do that
manually with C-c C-e [R] export-region, which export the subsection
as a HTML page in an Emacs buffer. What I would like to do is to put a
comment in the org file subsection to set the HTML 'target' location
page such as

* Topic A
** Things to do [...] (private)
** Interesting Notes I would like to publish
#+THIS_REGION_TARGET_FILE=~/public_html/myfile.html

I think I've seen that somewhere on a orgmode page but I can't find it
yet :< Sorry if the answer is obvious.

2/ The second thing I would eventually need would be a 'automatic'
menu and bread crumbs generation system.
I appreciate the fact that this has been discussed in this thread:
http://www.mail-archive.com/emacs-orgmode@gnu.org/msg12087.html
I would like to know if there is anything new in this area! :)

thank you again for your help,

 -- Ben

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Publishing subsections of an orgmode file (HTML)
  2009-07-13 13:59 Publishing subsections of an orgmode file (HTML) Ben
@ 2009-07-13 14:38 ` Matthew Lundin
  2009-07-13 15:29   ` Dan Davison
  0 siblings, 1 reply; 4+ messages in thread
From: Matthew Lundin @ 2009-07-13 14:38 UTC (permalink / raw)
  To: Ben; +Cc: emacs-orgmode

Ben <bip@maleloria.org> writes:

> I think that's my first post here and I would like first of all to
> thank you all for your amazing work.

Welcome!

>
> My first question is: How can I publish a subsection of one of these
> files as a webpage (and this subsection only)? I occasionally do that
> manually with C-c C-e [R] export-region, which export the subsection
> as a HTML page in an Emacs buffer. What I would like to do is to put a
> comment in the org file subsection to set the HTML 'target' location
> page such as
>
> * Topic A
> ** Things to do [...] (private)
> ** Interesting Notes I would like to publish
> #+THIS_REGION_TARGET_FILE=~/public_html/myfile.html

You can specify the target file for an exported region using the
property EXPORT_FILE_NAME. E.g.

--8<---------------cut here---------------start------------->8---
* Topic A
  :PROPERTIES:
  :EXPORT_FILE_NAME: ~/public_html/myfile.html
  :END:
** Things to do [...] (private)
** Interesting Notes I would like to publish
--8<---------------cut here---------------end--------------->8---

You'll need to select the tree with C-c @ before exporting for this to
work.

See this section of the manual for more information:

http://orgmode.org/manual/Export-options.html

Best,
Matt

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Re: Publishing subsections of an orgmode file (HTML)
  2009-07-13 14:38 ` Matthew Lundin
@ 2009-07-13 15:29   ` Dan Davison
  2009-07-13 23:24     ` Ben
  0 siblings, 1 reply; 4+ messages in thread
From: Dan Davison @ 2009-07-13 15:29 UTC (permalink / raw)
  To: Matthew Lundin; +Cc: emacs-orgmode

Matthew Lundin <mdl@imapmail.org> writes:

> Ben <bip@maleloria.org> writes:
>
>> I think that's my first post here and I would like first of all to
>> thank you all for your amazing work.
>
> Welcome!
>
>>
>> My first question is: How can I publish a subsection of one of these
>> files as a webpage (and this subsection only)? I occasionally do that
>> manually with C-c C-e [R] export-region, which export the subsection
>> as a HTML page in an Emacs buffer. What I would like to do is to put a
>> comment in the org file subsection to set the HTML 'target' location
>> page such as
>>
>> * Topic A
>> ** Things to do [...] (private)
>> ** Interesting Notes I would like to publish
>> #+THIS_REGION_TARGET_FILE=~/public_html/myfile.html
>
> You can specify the target file for an exported region using the
> property EXPORT_FILE_NAME. E.g.
>
> * Topic A
>   :PROPERTIES:
>   :EXPORT_FILE_NAME: ~/public_html/myfile.html
>   :END:
> ** Things to do [...] (private)
> ** Interesting Notes I would like to publish
>
> You'll need to select the tree with C-c @ before exporting for this to
> work.
>
> See this section of the manual for more information:
>
> http://orgmode.org/manual/Export-options.html

Hi Ben,

Also, see this section

http://orgmode.org/manual/Selective-export.html#Selective-export

As the manual says, "This behavior is governed by two variables:
org-export-select-tags and org-export-exclude-tags." These are both
lists of tags. The default values contain a single tag each: "export"
and "noexport" respectively.

So, e.g.

--8<---------------cut here---------------start------------->8---
#+title: Selective export test 1

* This subtree is exported 					     :export:
  Stuff in expored subtree
* But not this one as there is an `export' tag in the buffer
  Stuff that won't be exported
--8<---------------cut here---------------end--------------->8---



--8<---------------cut here---------------start------------->8---
#+title: Selective export test 2

* This subtree will be exported, with a single subtree exclusion
  h1 contents
*** h1.2
    h1.2 contents
*** h2.2 (won't be exported) 					   :noexport:
    h2.2 contents
* This subtree will be exported
  Stuff that will be exported
--8<---------------cut here---------------end--------------->8---



--8<---------------cut here---------------start------------->8---
#+title: Selective export test 3

* This subtree will be exported, with a single subtree exclusion     :export:
  h1 contents
*** h1.2
    h1.2 contents
*** h2.2 (won't be exported) 					   :noexport:
    h2.2 contents
* This subtree won't be exported, since an export tag is present in the buffer
  Stuff that won't be exported
--8<---------------cut here---------------end--------------->8---


Dan

p.s. In the first and third case, is it arguable that the :export: tag
should not appear in the exported HTML/pdf?


>
> Best,
> Matt
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Re: Publishing subsections of an orgmode file (HTML)
  2009-07-13 15:29   ` Dan Davison
@ 2009-07-13 23:24     ` Ben
  0 siblings, 0 replies; 4+ messages in thread
From: Ben @ 2009-07-13 23:24 UTC (permalink / raw)
  To: emacs-orgmode

>> http://orgmode.org/manual/Export-options.html
(...)
> http://orgmode.org/manual/Selective-export.html#Selective-export

Right, the answer was obvious and right under my nose :)
Thank you a million times for these pointers and sorry for not
understanding that by myself earlier.
Indeed a EXPORT_FILE + the 'export' tag you mentioned seem to fit the
bill. I'm really excited about that, orgmode seems so *perfectly*
fitted for any use! Thank you really.

 -- Ben

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-07-13 23:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-13 13:59 Publishing subsections of an orgmode file (HTML) Ben
2009-07-13 14:38 ` Matthew Lundin
2009-07-13 15:29   ` Dan Davison
2009-07-13 23:24     ` Ben

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).