Browse Source

Make body-only export not take the first buffer line for a title

Carsten Dominik 15 years ago
parent
commit
89276e1982
2 changed files with 5 additions and 1 deletions
  1. 3 0
      lisp/ChangeLog
  2. 2 1
      lisp/org-html.el

+ 3 - 0
lisp/ChangeLog

@@ -1,5 +1,8 @@
 2009-12-16  Carsten Dominik  <carsten.dominik@gmail.com>
 
+	* org-html.el (org-export-as-html): Only take title from buffer if
+	not exporting body-only.
+
 	* org-latex.el (org-export-latex-preprocess): Better version of
 	the regular expression for protecting LaTeX macros.
 	(org-export-latex-preprocess): Start searching for macros to

+ 2 - 1
lisp/org-html.el

@@ -625,7 +625,8 @@ PUB-DIR is set, use this as the publishing directory."
 	 (author      (plist-get opt-plist :author))
 	 (title       (or (and subtree-p (org-export-get-title-from-subtree))
 			  (plist-get opt-plist :title)
-			  (and (not
+			  (and (not body-only)
+			       (not
 				(plist-get opt-plist :skip-before-1st-heading))
 			       (org-export-grab-title-from-buffer))
 			  (and buffer-file-name