* HTML export with one key
@ 2009-06-13 14:31 Stefan Vollmar
2009-06-13 19:54 ` Sebastian Rose
0 siblings, 1 reply; 3+ messages in thread
From: Stefan Vollmar @ 2009-06-13 14:31 UTC (permalink / raw
To: emacs-orgmode
Hello,
I am excited about using org-mode for generating HTML code, in fact,
for one project I do that so frequently that I wanted to have a simple
shortcut instead of having to press:
C-x C-s C-c C-e b
I have tried (I know very little Lisp, sorry):
(defun my-org-export ()
"save, then export current org file to html, open in browser"
(save-buffer)
(interactive)
(org-export-as-html-and-open t))
(global-set-key [(f2)] 'my-org-export)
... which does most of the job as intended. However, using this
function yields HTML output which renders second- and third-level
headlines into itemized lists whereas I want to have the default
behaviour (1.1, 1.2, 1.2.3, etc).
Many thanks for any tips on how to improve this!
Warm regards,
Stefan
--
Dr. Stefan Vollmar, Dipl.-Phys.
Max-Planck-Institut für neurologische Forschung
Gleuelerstr. 50, 50931 Köln, Germany
Tel.: +49-221-4726-213 FAX +49-221-4726-298
Tel.: +49-221-478-5713 Mobile: 0160-93874279
Email: vollmar@nf.mpg.de http://www.nf.mpg.de
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: HTML export with one key
2009-06-13 14:31 HTML export with one key Stefan Vollmar
@ 2009-06-13 19:54 ` Sebastian Rose
2009-06-13 20:10 ` Sebastian Rose
0 siblings, 1 reply; 3+ messages in thread
From: Sebastian Rose @ 2009-06-13 19:54 UTC (permalink / raw
To: Stefan Vollmar; +Cc: emacs-orgmode
Ah - got it:
the docs of org-export-as-html-and-open says:
"Export the outline as HTML and immediately open it with a browser.
If there is an active region, export only the region.
The prefix ARG specifies how many levels of the outline should become
headlines. The default is 3. Lower levels will become bulleted lists."
Means: exchange `t' with the headline level you need.
You might look into the functions in ..../org-mode/lisp/org-html.el to
find out more.
Sebastian
Stefan Vollmar <vollmar@nf.mpg.de> writes:
> Hello,
>
> I am excited about using org-mode for generating HTML code, in fact, for one
> project I do that so frequently that I wanted to have a simple shortcut instead
> of having to press:
> C-x C-s C-c C-e b
>
> I have tried (I know very little Lisp, sorry):
>
> (defun my-org-export ()
> "save, then export current org file to html, open in browser"
> (save-buffer)
> (interactive)
> (org-export-as-html-and-open t))
>
> (global-set-key [(f2)] 'my-org-export)
>
> ... which does most of the job as intended. However, using this function yields
> HTML output which renders second- and third-level headlines into itemized lists
> whereas I want to have the default behaviour (1.1, 1.2, 1.2.3, etc).
>
> Many thanks for any tips on how to improve this!
> Warm regards,
> Stefan
> --
> Dr. Stefan Vollmar, Dipl.-Phys.
> Max-Planck-Institut für neurologische Forschung
> Gleuelerstr. 50, 50931 Köln, Germany
> Tel.: +49-221-4726-213 FAX +49-221-4726-298
> Tel.: +49-221-478-5713 Mobile: 0160-93874279
> Email: vollmar@nf.mpg.de http://www.nf.mpg.de
>
>
>
>
>
>
>
> _______________________________________________
> 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
>
--
Sebastian Rose, EMMA STIL - mediendesign, Niemeyerstr.6, 30449 Hannover
Tel.: +49 (0)511 - 36 58 472
Fax: +49 (0)1805 - 233633 - 11044
mobil: +49 (0)173 - 83 93 417
Email: s.rose@emma-stil.de, sebastian_rose@gmx.de
Http: www.emma-stil.de
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: HTML export with one key
2009-06-13 19:54 ` Sebastian Rose
@ 2009-06-13 20:10 ` Sebastian Rose
0 siblings, 0 replies; 3+ messages in thread
From: Sebastian Rose @ 2009-06-13 20:10 UTC (permalink / raw
To: Stefan Vollmar; +Cc: emacs-orgmode
Sebastian Rose <sebastian_rose@gmx.de> writes:
> Ah - got it:
>
> the docs of org-export-as-html-and-open says:
>
>
> "Export the outline as HTML and immediately open it with a browser.
> If there is an active region, export only the region.
> The prefix ARG specifies how many levels of the outline should become
> headlines. The default is 3. Lower levels will become bulleted lists."
>
>
> Means: exchange `t' with the headline level you need.
To use your global default for headline levels:
(defun my-org-export ()
"save, then export current org file to html, open in browser"
(save-buffer)
(interactive)
(org-export-as-html-and-open org-export-headline-levels))
(global-set-key [(f2)] 'my-org-export)
Regards
Sebastian
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-06-13 20:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-13 14:31 HTML export with one key Stefan Vollmar
2009-06-13 19:54 ` Sebastian Rose
2009-06-13 20:10 ` Sebastian Rose
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.