emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Richard KLINDA <rklinda@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Patch: new org-publish-project-alist property: :body-only
Date: Thu, 12 Feb 2009 16:31:05 +0100	[thread overview]
Message-ID: <87ab8raczq.fsf@gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 589 bytes --]

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.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: body-only.patch --]
[-- Type: text/x-diff, Size: 1024 bytes --]

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

[-- Attachment #3: Type: text/plain, Size: 18 bytes --]


-- 
Udv, Richard

[-- Attachment #4: Type: text/plain, Size: 204 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

                 reply	other threads:[~2009-02-12 15:33 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=87ab8raczq.fsf@gmail.com \
    --to=rklinda@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).