[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/textmodes/org-publish.el,v
From: |
Carsten Dominik |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/textmodes/org-publish.el,v |
Date: |
Wed, 22 Aug 2007 11:49:23 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Carsten Dominik <cdominik> 07/08/22 11:49:23
Index: org-publish.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/textmodes/org-publish.el,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- org-publish.el 27 Jul 2007 07:17:56 -0000 1.4
+++ org-publish.el 22 Aug 2007 11:49:23 -0000 1.5
@@ -6,9 +6,11 @@
;; Keywords: hypermedia, outlines
;; Version: 1.80
+;; $Id: org-publish.el,v 1.5 2007/08/22 11:49:23 cdominik Exp $
+
;; This file is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 3, or (at your option)
+;; the Free Software Foundation; either version 2, or (at your option)
;; any later version.
;; This file is distributed in the hope that it will be useful,
@@ -452,6 +454,27 @@
(kill-buffer (current-buffer)))))
+(defun org-publish-org-to-latex (plist filename)
+ "Publish an org file to LaTeX."
+ (org-publish-org-to "latex" plist filename))
+
+(defun org-publish-org-to-html (plist filename)
+ "Publish an org file to HTML."
+ (org-publish-org-to "html" plist filename))
+
+(defun org-publish-org-to (format plist filename)
+ "Publish an org file to FORMAT.
+PLIST is the property list for the given project.
+FILENAME is the filename of the org file to be published."
+ (require 'org)
+ (let* ((arg (plist-get plist :headline-levels)))
+ (progn
+ (find-file filename)
+ (funcall (intern (concat "org-export-as-" format))
+ arg nil plist)
+ (kill-buffer (current-buffer)))))
+
+
(defun org-publish-attachment (plist filename)
"Publish a file with no transformation of any kind.
PLIST is the property list for the given project.
@@ -596,6 +619,4 @@
(provide 'org-publish)
-
-;; arch-tag: 72807f3c-8af0-4a6b-8dca-c3376eb25adb
;;; org-publish.el ends here
- [Emacs-diffs] Changes to emacs/lisp/textmodes/org-publish.el,v,
Carsten Dominik <=