emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Russell Adams <RLAdams@AdamsInfoServ.Com>
To: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: SOLVED: Exporting HTML on save
Date: Fri, 3 Jul 2020 14:03:04 +0200	[thread overview]
Message-ID: <20200703120304.GR19456@volibear> (raw)

I ran into a situation with a simple file where I wanted it to be exported to
html every time I saved. After some troubleshooting and IRC help I was able to
get a header/file local variable to work. Posting here for others to save time!

Place this at the top of your .org file:

# -*- eval: (add-hook 'after-save-hook (lambda() (org-html-export-to-html)) nil 'localonly); -*-

------------------------------------------------------------------
Russell Adams                            RLAdams@AdamsInfoServ.com

PGP Key ID:     0x1160DCB3           http://www.adamsinfoserv.com/

Fingerprint:    1723 D8CA 4280 1EC9 557F  66E8 1154 E018 1160 DCB3


                 reply	other threads:[~2020-07-03 12:04 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200703120304.GR19456@volibear \
    --to=rladams@adamsinfoserv.com \
    --cc=emacs-orgmode@gnu.org \
    --subject='Re: SOLVED: Exporting HTML on save' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Code repositories for project(s) associated with this 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).