diff options
author | Carsten Dominik <carsten.dominik@gmail.com> | 2010-10-14 13:51:23 +0200 |
---|---|---|
committer | Carsten Dominik <carsten.dominik@gmail.com> | 2010-10-14 13:51:23 +0200 |
commit | 9f5c6557f2173545eaeff955eca38f6ea0de538c (patch) | |
tree | 51ffebcc1055877bb46a235605c9dfed55697bd1 | |
parent | 19d695ef8fd27ac1b1ef1b675c3960b9b7d6abdc (diff) | |
download | org-mode-9f5c6557f2173545eaeff955eca38f6ea0de538c.tar.gz |
Add publishing functions for ASCII, Latin-1 and UTF-8
* lisp/org-publish.el (org-publish-org-to-ascii):
(org-publish-org-to-latin1):
(org-publish-org-to-utf8): New functions.
* doc/org.texi (Publishing action): Document the new publishing functions.
Thanks to Matthias Danzl for showing how to do this.
-rw-r--r-- | doc/org.texi | 18 | ||||
-rw-r--r-- | lisp/org-publish.el | 18 |
2 files changed, 27 insertions, 9 deletions
diff --git a/doc/org.texi b/doc/org.texi index 558396d..06209e6 100644 --- a/doc/org.texi +++ b/doc/org.texi @@ -10630,20 +10630,20 @@ possibly transformed in the process. The default transformation is to export Org files as HTML files, and this is done by the function @code{org-publish-org-to-html} which calls the HTML exporter (@pxref{HTML export}). But you also can publish your content as PDF files using -@code{org-publish-org-to-pdf}. If you want to publish the Org file itself, -but with @i{archived}, @i{commented}, and @i{tag-excluded} trees removed, use -@code{org-publish-org-to-org} and set the parameters @code{:plain-source} -and/or @code{:htmlized-source}. This will produce @file{file.org} and -@file{file.org.html} in the publishing +@code{org-publish-org-to-pdf}, or as @code{ascii}, @code{latin1} or +@code{utf8} encoded files using the corresponding functions. If you want to +publish the Org file itself, but with @i{archived}, @i{commented}, and +@i{tag-excluded} trees removed, use @code{org-publish-org-to-org} and set the +parameters @code{:plain-source} and/or @code{:htmlized-source}. This will +produce @file{file.org} and @file{file.org.html} in the publishing directory@footnote{@file{file-source.org} and @file{file-source.org.html} if source and publishing directories are equal. Note that with this kind of setup, you need to add @code{:exclude "-source\\.org"} to the project definition in @code{org-publish-project-alist} to avoid that the published source files will be considered as new org files the next time the project is -published.}. Other files like images only -need to be copied to the publishing destination, for this you may use -@code{org-publish-attachment}. For non-Org files, you always need to -specify the publishing function: +published.}. Other files like images only need to be copied to the +publishing destination, for this you may use @code{org-publish-attachment}. +For non-Org files, you always need to specify the publishing function: @multitable @columnfractions 0.3 0.7 @item @code{:publishing-function} diff --git a/lisp/org-publish.el b/lisp/org-publish.el index 2b85aa6..4ebc04c 100644 --- a/lisp/org-publish.el +++ b/lisp/org-publish.el @@ -574,6 +574,24 @@ See `org-publish-org-to' to the list of arguments." See `org-publish-org-to' to the list of arguments." (org-publish-org-to "org" plist filename pub-dir)) +(defun org-publish-org-to-ascii (plist filename pub-dir) + "Publish an org file to ASCII. +See `org-publish-org-to' to the list of arguments." + (org-publish-with-aux-preprocess-maybe + (org-publish-org-to "ascii" plist filename pub-dir))) + +(defun org-publish-org-to-latin1 (plist filename pub-dir) + "Publish an org file to Latin-1. +See `org-publish-org-to' to the list of arguments." + (org-publish-with-aux-preprocess-maybe + (org-publish-org-to "latin1" plist filename pub-dir))) + +(defun org-publish-org-to-utf8 (plist filename pub-dir) + "Publish an org file to UTF-8. +See `org-publish-org-to' to the list of arguments." + (org-publish-with-aux-preprocess-maybe + (org-publish-org-to "utf8" plist filename pub-dir))) + (defun org-publish-attachment (plist filename pub-dir) "Publish a file with no transformation of any kind. See `org-publish-org-to' to the list of arguments." |