emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* body-only for single file html export
@ 2010-12-18 18:46 joe
  2010-12-19 22:10 ` Bernt Hansen
  0 siblings, 1 reply; 3+ messages in thread
From: joe @ 2010-12-18 18:46 UTC (permalink / raw)
  To: emacs-orgmode

Hello org-mode Experts,

I would like to use the ":body-only" option for exporting html (and
ocassionally latex). Reading through the docs and maillist, I think I
understand how to do this if I'm publishing an entire project.  I
don't have a project, though...

I use emacs for editing html textareas and on-the-fly html editing,
and want to export a single file using the body-only option.

I was hoping I could simply do something like this in the template but
it doesn't seem to work:

#+OPTIONS: body-only:t

If someone can help me with an org-mode-export-html function that sets
the body-only option for a single file (without setting up a project),
I would be very grateful.

Thank you much!

BTW: using org-mode 7.4, gnu emacs 23.1.50

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

* Re: body-only for single file html export
  2010-12-18 18:46 body-only for single file html export joe
@ 2010-12-19 22:10 ` Bernt Hansen
  2010-12-20 15:03   ` joe
  0 siblings, 1 reply; 3+ messages in thread
From: Bernt Hansen @ 2010-12-19 22:10 UTC (permalink / raw)
  To: joe; +Cc: emacs-orgmode

joe <joe@chemistry.coe.edu> writes:

> I would like to use the ":body-only" option for exporting html (and
> ocassionally latex). Reading through the docs and maillist, I think I
> understand how to do this if I'm publishing an entire project.  I
> don't have a project, though...
>
> I use emacs for editing html textareas and on-the-fly html editing,
> and want to export a single file using the body-only option.
>
> I was hoping I could simply do something like this in the template but
> it doesn't seem to work:
>
> #+OPTIONS: body-only:t
>
> If someone can help me with an org-mode-export-html function that sets
> the body-only option for a single file (without setting up a project),
> I would be very grateful.
>
> Thank you much!

Hi Joe,

(global-set-key (kbd "<f9> x") 'bh/test)

(defun bh/test (arg)
  (interactive "P")
  (org-export-as-html arg nil nil nil t))

then f9-x in an org-mode buffer will export as body-only and put a copy
in the kill ring so you can paste it.

HTH,
Bernt

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

* Re: body-only for single file html export
  2010-12-19 22:10 ` Bernt Hansen
@ 2010-12-20 15:03   ` joe
  0 siblings, 0 replies; 3+ messages in thread
From: joe @ 2010-12-20 15:03 UTC (permalink / raw)
  Cc: emacs-orgmode

On Sun, Dec 19, 2010 at 05:10:57PM -0500, Bernt Hansen wrote:
> joe <joe@chemistry.coe.edu> writes:
> 
> > I would like to use the ":body-only" option for exporting html (and
> > ocassionally latex). Reading through the docs and maillist, I think I
> > understand how to do this if I'm publishing an entire project.  I
> > don't have a project, though...
> >
> > I use emacs for editing html textareas and on-the-fly html editing,
> > and want to export a single file using the body-only option.
> >
> > I was hoping I could simply do something like this in the template but
> > it doesn't seem to work:
> >
> > #+OPTIONS: body-only:t
> >
> > If someone can help me with an org-mode-export-html function that sets
> > the body-only option for a single file (without setting up a project),
> > I would be very grateful.
> >
> > Thank you much!
> 
> Hi Joe,
> 
> (global-set-key (kbd "<f9> x") 'bh/test)
> 
> (defun bh/test (arg)
>   (interactive "P")
>   (org-export-as-html arg nil nil nil t))
> 
> then f9-x in an org-mode buffer will export as body-only and put a copy
> in the kill ring so you can paste it.
> 
> HTH,
> Bernt

Bernt,

YES!  Thank you...this is just what I needed.  I also learned a little
about lisp.

A question for org-mode developers or expert users: Is there a design
reason an export option like "body-only" can't be set using the
#+OPTIONS directive?  Just curious...

Thanks,
Joe

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

end of thread, other threads:[~2010-12-20 15:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-18 18:46 body-only for single file html export joe
2010-12-19 22:10 ` Bernt Hansen
2010-12-20 15:03   ` joe

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