From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pillow Kuda Sai Subject: Bug: html-preamble doesn't work with a function [8.3.2 (8.3.2-39-gd537a3-elpa @ /home/pillow/.emacs.d/elpa/org-20151123/)] Date: Sat, 12 Dec 2015 20:26:57 +0100 Message-ID: <566C7501.2060407@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42820) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a7ppF-0001Ar-Em for emacs-orgmode@gnu.org; Sat, 12 Dec 2015 14:27:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a7ppC-0005cB-0h for emacs-orgmode@gnu.org; Sat, 12 Dec 2015 14:27:25 -0500 Received: from mail-wm0-x232.google.com ([2a00:1450:400c:c09::232]:34333) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a7ppB-0005c7-NN for emacs-orgmode@gnu.org; Sat, 12 Dec 2015 14:27:21 -0500 Received: by mail-wm0-x232.google.com with SMTP id p66so13960403wmp.1 for ; Sat, 12 Dec 2015 11:27:21 -0800 (PST) Received: from [194.171.229.35] ([194.171.229.35]) by smtp.gmail.com with ESMTPSA id an7sm22414972wjc.44.2015.12.12.11.27.19 for (version=TLSv1/SSLv3 cipher=OTHER); Sat, 12 Dec 2015 11:27:19 -0800 (PST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org 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-show-empty-lines org-optimize-window-after-visibility-change) org-html-mathjax-template "\n" org-html-mathjax-options '((path "http://orgmode.org/mathjax/MathJax.js") (scale "100") (align "center") (indent "2em") (mathml nil)) org-export-with-creator 'comment org-html-creator-string "Emacs 25.0.50.2 (Org mode 8.2.10)" org-latex-with-hyperref "\\hypersetup{\n pdfauthor={%a},\n pdftitle={%t},\n pdfkeywords={%k},\n pdfsubject={%d},\n pdfcreator={%c}, \n pdflang={%L}}\n" org-timer-default-timer 0 org-babel-process-comment-text 'org-babel-trim org-babel-tangle-lang-exts '(("emacs-lisp" . "el")) org-confirm-elisp-link-function 'yes-or-no-p org-metadown-hook '(org-babel-pop-to-session-maybe) org-latex-listings-langs '((emacs-lisp "Lisp") (lisp "Lisp") (clojure "Lisp") (c "C") (cc "C++") (fortran "fortran") (perl "Perl") (cperl "Perl") (python "Python") (ruby "Ruby") (html "HTML") (xml "XML") (tex "TeX") (latex "[LaTeX]TeX") (shell-script "bash") (gnuplot "Gnuplot") (ocaml "Caml") (caml "Caml") (sql "SQL") (sqlite "sql")) org-effort-durations '(("h" . 60) ("d" . 480) ("w" . 2400) ("m" . 9600) ("y" . 96000)) org-html-format-headline-function 'ignore org-structure-template-alist '(("s" "#+BEGIN_SRC ?\n\n#+END_SRC" "\n\n") ("e" "#+BEGIN_EXAMPLE\n?\n#+END_EXAMPLE" "\n?\n") ("q" "#+BEGIN_QUOTE\n?\n#+END_QUOTE" "\n?\n") ("v" "#+BEGIN_VERSE\n?\n#+END_VERSE" "\n?\n") ("V" "#+BEGIN_VERBATIM\n?\n#+END_VERBATIM" "\n?\n") ("c" "#+BEGIN_CENTER\n?\n#+END_CENTER" "
\n?\n
") ("l" "#+BEGIN_LaTeX\n?\n#+END_LaTeX" "\n?\n") ("L" "#+LaTeX: " "?") ("h" "#+BEGIN_HTML\n?\n#+END_HTML" "\n?\n") ("H" "#+HTML: " "?") ("a" "#+BEGIN_ASCII\n?\n#+END_ASCII" "") ("A" "#+ASCII: " "") ("i" "#+INDEX: ?" "#+INDEX: ?") ("I" "#+INCLUDE: %file ?" "")) org-export-creator-string "Emacs 25.0.50.2 (Org mode 8.2.10)" org-html-format-inlinetask-function 'ignore org-clock-out-hook '(org-clock-remove-empty-clock-drawer) org-src-fontify-natively nil 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 :auto-preamble t :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"))) )