emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Orgmode] Patch: new org-publish-project-alist property: :body-only


From: Richard KLINDA
Subject: [Orgmode] Patch: new org-publish-project-alist property: :body-only
Date: Thu, 12 Feb 2009 16:31:05 +0100
User-agent: Gnus/5.110003 (No Gnus v0.3) XEmacs/21.4 (Educational Television, linux)

I defined a new org-publish-project-alist property: :body-only, the
functionality was already in Org.

,----[ example ]
|        '("test" . (:base-directory "/tmp/"
|                    :base-extension "org"
|                    :publishing-directory "/tmp/1/"
|                    :body-only t ;; <----
|                    ))
`----

Excerpt from the patch:

,----
| When :body-only is set to t, don't produce the file header and footer,
| simply publish the content of <body>...</body>, without even the body
| tags themselves.
`----

Carsten, please include this if you think it's ok.

--- org-publish.el      2009-02-10 20:23:13.000000000 +0100
+++ /home/ignotus/.elisp/org/lisp/org-publish.el        2009-02-12 
16:24:20.000000000 +0100
@@ -222,6 +222,10 @@
   :completion-function    Function to be called after publishing
                           this project.
 
+When :body-only is set to t, don't produce the file header and footer,
+simply publish the content of <body>...</body>, without even the body
+tags themselves.
+
 Some properties control details of the Org publishing process,
 and are equivalent to the corresponding user variables listed in
 the right column.  See the documentation for those variables to
@@ -501,7 +507,8 @@
        (setq export-buf-or-file
              (funcall (intern (concat "org-export-as-" format))
                       (plist-get plist :headline-levels)
-                      nil plist nil nil pub-dir))
+                      nil plist nil (plist-get plist :body-only)
+                       pub-dir))
        (when (and (bufferp export-buf-or-file)
                   (buffer-live-p export-buf-or-file))
          (set-buffer export-buf-or-file)
-- 
Udv, Richard

reply via email to

[Prev in Thread] Current Thread [Next in Thread]