My setup:
;;; Minimal setup to load latest 'org-mode'
;; activate debugging
(setq debug-on-error t
debug-on-signal nil
debug-on-quit nil)
;; add latest org-mode to load path
(add-to-list 'load-path (expand-file-name "~/.emacs.d/elpa/org-20151123/"))
(add-to-list 'load-path (expand-file-name
"~/.emacs.d/elpa/org-20151123/" t))
What I did:
(require 'ox-publish)
(setq org-publish-project-alist
'(
("org-notes"
:base-directory "~/org/"
:base-extension "org"
:publishing-directory "~/public_html/"
:recursive t
:publishing-function org-html-publish-to-html
:headline-levels 4 ; Just the default for this project.
:auto-preamble t
;; :html-preamble "Howdy" ; does work
:html-preamble (concat "Howdy")
)
("org-static"
:base-directory "~/org/"
:base-extension "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf"
:publishing-directory "~/public_html/"
:recursive t
:publishing-function org-publish-attachment
)
("org" :components ("org-notes" "org-static"
What I expected: All off the above code is from
http://orgmode.org/worg/org-tutorials/org-publish-html-tutorial.html
except for the :html-preamble part. I want to add my own preamble by
using a function. :html-preamble sets org-html-preamble (the options
are: nil, t, string, function that must return a string). When using a
string (:html-preamble "Howdy") it works. When using a function that
returns a string (:html-preamble (concat "Howdy")) it doesn't work.
I'm not entirely sure if this is a bug or if I'm missing something but
hopefully the mailing-list can help me out :)
Thanks in advance, Pillow
Emacs : GNU Emacs 25.0.50.2 (x86_64-unknown-linux-gnu, GTK+ Version 3.14.5)
of 2015-10-09
Package: Org-mode version 8.3.2 (8.3.2-39-gd537a3-elpa @
/home/pillow/.emacs.d/elpa/org-20151123/)
current state:
==
(setq
org-src-lang-modes '(("ocaml" . tuareg) ("elisp" . emacs-lisp) ("ditaa"
. artist) ("asymptote" . asy)
("dot" . fundamental) ("sqlite" . sql) ("calc" .
fundamental)
("C" . c) ("cpp" . c++)
("C++" . c++) ("screen" . shell-script))
org-tab-first-hook '(org-hide-block-toggle-maybe
org-src-native-tab-command-maybe
org-babel-hide-result-toggle-maybe
org-babel-header-arg-expand)
org-sparse-tree-default-date-type 'scheduled-or-deadline
org-latex-default-packages-alist '(("AUTO" "inputenc" t) ("T1"
"fontenc" t) ("" "fixltx2e" nil) ("" "graphicx" t)
("" "longtable" nil) ("" "float" nil) (""
"wrapfig" nil) (""
"rotating" nil)
("normalem" "ulem" t) ("" "amsmath" t) (""
"textcomp" t) (""
"marvosym" t)
("" "wasysym" t) ("" "amssymb" t) (""
"hyperref" nil)
"\\tolerance=1000")
org-speed-command-hook '(org-speed-command-default-hook
org-babel-speed-command-hook)
org-occur-hook '(org-first-headline-recenter)
org-metaup-hook '(org-babel-load-in-session-maybe)
org-html-format-drawer-function '(lambda (name contents) contents)
org-clock-into-drawer nil
org-latex-format-inlinetask-function 'ignore
org-confirm-shell-link-function 'yes-or-no-p
org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default
org-latex-text-markup-alist '((bold . "\\textbf{%s}") (code . verb)
(italic . "\\emph{%s}")
(strike-through . "\\sout{%s}") (underline .
"\\uline{%s}")
(verbatim . protectedtexttt))
org-latex-format-headline-function
'org-latex-format-headline-default-function
org-after-todo-state-change-hook '(org-clock-out-if-current)
org-latex-format-drawer-function '(lambda (name contents) contents)
org-src-mode-hook '(org-src-babel-configure-edit-buffer
org-src-mode-configure-edit-buffer)
org-agenda-before-write-hook '(org-agenda-add-entry-text)
org-babel-pre-tangle-hook '(save-buffer)
org-html-allow-name-attribute-in-anchors t
org-latex-logfiles-extensions '("aux" "idx" "log" "out" "toc" "nav"
"snm" "vrb")
org-export-copy-to-kill-ring 'if-interactive
org-mode-hook '(#[nil "\300\301\302\303\304$\207"
[org-add-hook change-major-mode-hook org-show-block-all
append
local] 5]
#[nil "\300\301\302\303\304$\207"
[org-add-hook change-major-mode-hook
org-babel-show-result-all
append local] 5]
org-babel-result-hide-spec org-babel-hide-all-hashes)
org-archive-hook '(org-attach-archive-delete-maybe)
org-ascii-format-drawer-function '(lambda (name contents width) contents)
org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point
org-babel-execute-safely-maybe)
org-cycle-hook '(org-cycle-hide-archived-subtrees
org-cycle-hide-drawers org-cycle-hide-inline-tasks
org-cycle