Created
January 26, 2013 00:40
-
-
Save limist/4639239 to your computer and use it in GitHub Desktop.
Error output using org-mode 7.9.3d and current o-blog trunk, following clean-build instructions from `bug-report.html`
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
**Backtrace** | |
``` | |
file-name-nondirectory(nil) | |
(or (and subtree-p (org-entry-get (region-beginning) "EXPORT_FILE_NAME" t)) (file-name-nondirectory buffer-file-name)) | |
(file-name-sans-extension (or (and subtree-p (org-entry-get (region-beginning) "EXPORT_FILE_NAME" t)) (file-name-nondirectory buffer-file-name))) | |
(concat (file-name-sans-extension (or (and subtree-p (org-entry-get (region-beginning) "EXPORT_FILE_NAME" t)) (file-name-nondirectory buffer-file-name))) "." html-extension) | |
(expand-file-name (concat (file-name-sans-extension (or (and subtree-p (org-entry-get (region-beginning) "EXPORT_FILE_NAME" t)) (file-name-nondirectory buffer-file-name))) "." html-extension) (file-name-as-directory (or pub-dir (org-export-directory :html opt-plist)))) | |
(if to-buffer nil (expand-file-name (concat (file-name-sans-extension (or (and subtree-p (org-entry-get (region-beginning) "EXPORT_FILE_NAME" t)) (file-name-nondirectory buffer-file-name))) "." html-extension) (file-name-as-directory (or pub-dir (org-export-directory :html opt-plist))))) | |
(let* ((opt-plist (org-export-process-option-filters (org-combine-plists (org-default-export-plist) ext-plist (org-infile-export-plist)))) (body-only (or body-only (plist-get opt-plist :body-only))) (style (concat (if (plist-get opt-plist :style-include-default) org-export-html-style-default) (plist-get opt-plist :style) (plist-get opt-plist :style-extra) " | |
" (if (plist-get opt-plist :style-include-scripts) org-export-html-scripts))) (html-extension (plist-get opt-plist :html-extension)) valid thetoc have-headings first-heading-pos (odd org-odd-levels-only) (region-p (org-region-active-p)) (rbeg (and region-p (region-beginning))) (rend (and region-p (region-end))) (subtree-p (if (plist-get opt-plist :ignore-subtree-p) nil (when region-p (save-excursion (goto-char rbeg) (and (org-at-heading-p) (>= ... rend)))))) (level-offset (if subtree-p (save-excursion (goto-char rbeg) (+ (funcall outline-level) (if org-odd-levels-only 1 0))) 0)) (opt-plist (setq org-export-opt-plist (if subtree-p (org-export-add-subtree-options opt-plist rbeg) opt-plist))) (org-current-export-dir (or pub-dir (org-export-directory :html opt-plist))) (org-current-export-file buffer-file-name) (level 0) (org-line "") (origline "") txt todo (umax nil) (umax-toc nil) (filename (if to-buffer nil (expand-file-name (concat (file-name-sans-extension (or ... ...)) "." html-extension) (file-name-as-directory (or pub-dir (org-export-directory :html opt-plist)))))) (current-dir (if buffer-file-name (file-name-directory buffer-file-name) default-directory)) (auto-insert nil) (buffer (if to-buffer (cond ((eq to-buffer (quote string)) (get-buffer-create "*Org HTML Export*")) (t (get-buffer-create to-buffer))) (find-file-noselect filename))) (org-levels-open (make-vector org-level-max nil)) (date (org-html-expand (plist-get opt-plist :date))) (author (org-html-expand (plist-get opt-plist :author))) (html-validation-link (or org-export-html-validation-link "")) (title (org-html-expand (or (and subtree-p (org-export-get-title-from-subtree)) (plist-get opt-plist :title) (and (not body-only) (not (plist-get opt-plist :skip-before-1st-heading)) (org-export-grab-title-from-buffer)) (and buffer-file-name (file-name-sans-extension (file-name-nondirectory buffer-file-name))) "UNTITLED"))) (link-up (and (plist-get opt-plist :link-up) (string-match "\\S-" (plist-get opt-plist :link-up)) (plist-get opt-plist :link-up))) (link-home (and (plist-get opt-plist :link-home) (string-match "\\S-" (plist-get opt-plist :link-home)) (plist-get opt-plist :link-home))) (dummy (setq opt-plist (plist-put opt-plist :title title))) (html-table-tag (plist-get opt-plist :html-table-tag)) (quote-re0 (concat "^ *" org-quote-string "\\( +\\|[ ]*$\\)")) (quote-re (format org-heading-keyword-regexp-format org-quote-string)) (inquote nil) (infixed nil) (inverse nil) (email (plist-get opt-plist :email)) (language (plist-get opt-plist :language)) (keywords (org-html-expand (plist-get opt-plist :keywords))) (description (org-html-expand (plist-get opt-plist :description))) (num (plist-get opt-plist :section-numbers)) (lang-words nil) (head-count 0) cnt (start 0) (coding-system (and (boundp (quote buffer-file-coding-system)) buffer-file-coding-system)) (coding-system-for-write (or org-export-html-coding-system coding-system)) (save-buffer-coding-system (or org-export-html-coding-system coding-system)) (charset (and coding-system-for-write (fboundp (quote coding-system-get)) (coding-system-get coding-system-for-write (quote mime-charset)))) (region (buffer-substring (if region-p (region-beginning) (point-min)) (if region-p (region-end) (point-max)))) (org-export-have-math nil) (org-export-footnotes-seen nil) (org-export-footnotes-data (org-footnote-all-labels (quote with-defs))) (custom-id (or (org-entry-get nil "CUSTOM_ID" t) "")) (footnote-def-prefix (format "fn-%s" custom-id)) (footnote-ref-prefix (format "fnr-%s" custom-id)) (lines (org-split-string (org-export-preprocess-string region :emph-multiline t :for-backend (quote html) :skip-before-1st-heading (plist-get opt-plist :skip-before-1st-heading) :drawers (plist-get opt-plist :drawers) :todo-keywords (plist-get opt-plist :todo-keywords) :tasks (plist-get opt-plist :tasks) :tags (plist-get opt-plist :tags) :priority (plist-get opt-plist :priority) :footnotes (plist-get opt-plist :footnotes) :timestamps (plist-get opt-plist :timestamps) :archived-trees (plist-get opt-plist :archived-trees) :select-tags (plist-get opt-plist :select-tags) :exclude-tags (plist-get opt-plist :exclude-tags) :add-text (plist-get opt-plist :text) :LaTeX-fragments (plist-get opt-plist :LaTeX-fragments)) "[ | |
]")) (mathjax (if (or (eq (plist-get opt-plist :LaTeX-fragments) (quote mathjax)) (and org-export-have-math (eq (plist-get opt-plist :LaTeX-fragments) t))) (org-export-html-mathjax-config org-export-html-mathjax-template org-export-html-mathjax-options (or (plist-get opt-plist :mathjax) "")) "")) table-open table-buffer table-orig-buffer ind rpl path attr desc descp desc1 desc2 link snumber fnc footnotes footref-seen href) (let ((inhibit-read-only t)) (org-unmodified (remove-text-properties (point-min) (point-max) (quote (:org-license-to-kill t))))) (message "Exporting...") (setq org-min-level (org-get-min-level lines level-offset)) (setq org-last-level org-min-level) (org-init-section-numbers) (cond ((and date (string-match "%" date)) (setq date (format-time-string date))) (date) (t (setq date (format-time-string org-export-html-date-format-string)))) (setq lang-words (or (assoc language org-export-language-setup) (assoc "en" org-export-language-setup))) (set-buffer buffer) (let ((inhibit-read-only t)) (erase-buffer)) (fundamental-mode) (org-install-letbind) (and (fboundp (quote set-buffer-file-coding-system)) (set-buffer-file-coding-system coding-system-for-write)) (let ((case-fold-search nil) (org-odd-levels-only odd)) (mapc (lambda (x) (set (make-local-variable (nth 2 x)) (plist-get opt-plist (car x)))) org-export-plist-vars) (setq umax (if arg (prefix-numeric-value arg) org-export-headline-levels)) (setq umax-toc (if (integerp org-export-with-toc) (min org-export-with-toc umax) umax)) (unless body-only (insert (format "%s | |
<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" | |
\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\"> | |
<html xmlns=\"http://www.w3.org/1999/xhtml\" lang=\"%s\" xml:lang=\"%s\"> | |
<head> | |
<title>%s</title> | |
<meta http-equiv=\"Content-Type\" content=\"text/html;charset=%s\"/> | |
<meta name=\"title\" content=\"%s\"/> | |
<meta name=\"generator\" content=\"Org-mode\"/> | |
<meta name=\"generated\" content=\"%s\"/> | |
<meta name=\"author\" content=\"%s\"/> | |
<meta name=\"description\" content=\"%s\"/> | |
<meta name=\"keywords\" content=\"%s\"/> | |
%s | |
%s | |
</head> | |
<body> | |
%s | |
" (format (or (and ... org-export-html-xml-declaration) (cdr ...) (cdr ...) "") (or charset "iso-8859-1")) language language title (or charset "iso-8859-1") title date author description keywords style mathjax (if (or link-up link-home) (concat (format org-export-html-home/up-format ... ...) " | |
") ""))) (when (plist-get opt-plist :html-preamble) (let ((html-pre (plist-get opt-plist :html-preamble)) (html-pre-real-contents "")) (cond ((stringp html-pre) (setq html-pre-real-contents ...)) ((functionp html-pre) (insert "<div id=\"" ... "\"> | |
") (if ... ...) (insert " | |
</div> | |
")) (t (setq html-pre-real-contents ...))) (unless (and (functionp html-pre) (equal html-pre-real-contents "")) (insert "<div id=\"" (nth 0 org-export-html-divs) "\"> | |
") (insert html-pre-real-contents) (insert " | |
</div> | |
")))) (insert (format " | |
<div id=\"%s\">" (or org-export-html-content-div (nth 1 org-export-html-divs))) " | |
<h1 class=\"title\">" title "</h1> | |
")) (if org-export-with-toc (progn (push (format "<h%d>%s</h%d> | |
" org-export-html-toplevel-hlevel (nth 3 lang-words) org-export-html-toplevel-hlevel) thetoc) (push "<div id=\"text-table-of-contents\"> | |
" thetoc) (push "<ul> | |
<li>" thetoc) (setq lines (mapcar (function (lambda ... ... org-line)) lines)) (while (> org-last-level (1- org-min-level)) (setq org-last-level (1- org-last-level)) (push "</li> | |
</ul> | |
" thetoc)) (push "</div> | |
" thetoc) (setq thetoc (if have-headings (nreverse thetoc) nil)))) (setq head-count 0) (org-init-section-numbers) (org-open-par) (while (setq org-line (pop lines) origline org-line) (catch (quote nextline) (when (and inquote (string-match org-outline-regexp-bol org-line)) (insert "</pre> | |
") (org-open-par) (setq inquote nil)) (when inquote (insert (org-html-protect org-line) " | |
") (throw (quote nextline) nil)) (when (and org-export-with-fixed-width (string-match "^[ ]*:\\(\\([ ]\\|$\\)\\(.*\\)\\)" org-line)) (when (not infixed) (setq infixed t) (org-close-par-maybe) (insert "<pre class=\"example\"> | |
")) (insert (org-html-protect (match-string 3 org-line)) " | |
") (when (or (not lines) (not ...)) (setq infixed nil) (insert "</pre> | |
") (org-open-par)) (throw (quote nextline) nil)) (when (and (get-text-property 0 (quote org-protected) org-line) (not (< ... ...))) (let (par (ind ...)) (when (re-search-backward "\\(<p>\\)\\([ | |
]*\\)\\=" ... t) (setq par ...) (replace-match "\\2 | |
")) (insert org-line " | |
") (while (and lines ... ...) (insert ... " | |
")) (and par (insert "<p> | |
"))) (throw (quote nextline) nil)) (when (equal "ORG-BLOCKQUOTE-START" org-line) (org-close-par-maybe) (insert "<blockquote> | |
") (org-open-par) (throw (quote nextline) nil)) (when (equal "ORG-BLOCKQUOTE-END" org-line) (org-close-par-maybe) (insert " | |
</blockquote> | |
") (org-open-par) (throw (quote nextline) nil)) (when (equal "ORG-VERSE-START" org-line) (org-close-par-maybe) (insert " | |
<p class=\"verse\"> | |
") (setq org-par-open t) (setq inverse t) (throw (quote nextline) nil)) (when (equal "ORG-VERSE-END" org-line) (insert "</p> | |
") (setq org-par-open nil) (org-open-par) (setq inverse nil) (throw (quote nextline) nil)) (when (equal "ORG-CENTER-START" org-line) (org-close-par-maybe) (insert " | |
<div style=\"text-align: center\">") (org-open-par) (throw (quote nextline) nil)) (when (equal "ORG-CENTER-END" org-line) (org-close-par-maybe) (insert " | |
</div>") (org-open-par) (throw (quote nextline) nil)) (run-hooks (quote org-export-html-after-blockquotes-hook)) (when inverse (let ((i ...)) (if (> i 0) (setq org-line ...)) (unless (string-match "\\\\\\\\[ ]*$" org-line) (setq org-line ...)))) (setq start 0) (while (string-match "<<<?\\([^<>]*\\)>>>?\\((INVISIBLE)\\)?[ ]* | |
?" org-line start) (cond ((get-text-property ... ... org-line) (setq start ...)) ((match-end 2) (setq org-line ...)) ((and org-export-with-toc ...) (setq org-line ...)) (t (setq org-line ...)))) (setq org-line (org-html-handle-time-stamps org-line)) (or (string-match org-table-hline-regexp org-line) (string-match "^[ ]*\\([+]-\\||[ ]\\)[-+ |]*[+|][ ]*$" org-line) (setq org-line (org-html-expand org-line))) (setq org-line (org-html-handle-links org-line opt-plist)) (if (and org-todo-line-regexp (string-match org-todo-line-regexp org-line) (match-beginning 2)) (setq org-line (concat (substring org-line 0 ...) "<span class=\"" (if ... "done" "todo") " " (org-export-html-get-todo-kwd-class-name ...) "\">" (match-string 2 org-line) "</span>" (substring org-line ...)))) (when org-export-with-footnotes (setq start 0) (while (string-match "\\([^* ].*?\\)\\[\\([0-9]+\\)\\]" org-line start) (if (or ... ...) (setq start ...) (let ... ... ...)))) (cond ((string-match "^\\(\\*+\\)\\(?: +\\(.*?\\)\\)?[ ]*$" org-line) (setq level (org-tr-level ...) txt (or ... "")) (if (string-match quote-re0 txt) (setq txt ...)) (if (<= level ...) (setq head-count ...)) (setq first-heading-pos (or first-heading-pos ...)) (org-html-level-start level txt umax (and org-export-with-toc ...) head-count opt-plist) (when (string-match quote-re org-line) (org-close-par-maybe) (insert "<pre>") (setq inquote t))) ((and org-export-with-tables (string-match "^\\([ ]*\\)\\(|\\|\\+-+\\+\\)" org-line)) (when (not table-open) (setq table-open t table-buffer nil table-orig-buffer nil)) (setq table-buffer (cons org-line table-buffer) table-orig-buffer (cons origline table-orig-buffer)) (when (or ... ...) (setq table-open nil table-buffer ... table-orig-buffer ...) (org-close-par-maybe) (insert ...))) (t (when (get-text-property 0 ... org-line) (setq org-line ...)) (when (string-match "^[ ]*-\\{5,\\}[ ]*$" org-line) (if org-par-open ... ...) (throw ... nil)) (if (string-match "^ [-+*]-\\|^[ ]*$" org-line) (org-open-par)) (when org-export-with-footnotes (when ... ...) (when ... ... ...)) (cond (... ...) (org-export-preserve-breaks ...)) (let (...) (while ... ... ...)) (insert org-line " | |
"))))) (when inquote (insert "</pre> | |
") (org-open-par)) (org-html-level-start 1 nil umax (and org-export-with-toc (<= level umax)) head-count opt-plist) (when (and (> umax 0) first-heading-pos) (insert "</div> | |
")) (save-excursion (goto-char (point-min)) (while (re-search-forward "\\(\\(<p class=\"footnote\">\\)[^^@]*?\\)\\(\\(\\2\\)\\|\\'\\)" nil t) (push (match-string 1) footnotes) (replace-match "\\4" t nil) (goto-char (match-beginning 0)))) (when footnotes (insert (format org-export-html-footnotes-section (nth 4 lang-words) (mapconcat (quote identity) (nreverse footnotes) " | |
")) " | |
")) (let ((bib (org-export-html-get-bibliography))) (when bib (insert " | |
" bib " | |
"))) (unless body-only (insert "</div> | |
") (let ((html-post (plist-get opt-plist :html-postamble)) (email (mapconcat (lambda ... ...) (split-string email ",+ *") ", ")) (creator-info (concat "<a href=\"http://orgmode.org\">Org</a> version " (org-version) " with <a href=\"http://www.gnu.org/software/emacs/\">Emacs</a> version " (number-to-string emacs-major-version)))) (when (plist-get opt-plist :html-postamble) (insert " | |
<div id=\"" (nth 2 org-export-html-divs) "\"> | |
") (cond ((stringp html-post) (insert ...)) ((functionp html-post) (if ... ...)) ((eq html-post ...) (when ... ...) (when ... ...) (when ... ...) (when ... ...) (insert html-validation-link " | |
")) (t (insert ...))) (insert " | |
</div>")))) (if org-export-html-with-timestamp (insert org-export-html-html-helper-timestamp)) (unless body-only (insert " | |
</body> | |
</html> | |
")) (unless (plist-get opt-plist :buffer-will-be-killed) (normal-mode) (if (eq major-mode (default-value (quote major-mode))) (html-mode))) (goto-char (point-min)) (when thetoc (if (or (re-search-forward "<p>\\s-*\\[TABLE-OF-CONTENTS\\]\\s-*</p>" nil t) (re-search-forward "\\[TABLE-OF-CONTENTS\\]" nil t)) (progn (goto-char (match-beginning 0)) (replace-match "")) (goto-char first-heading-pos) (when (looking-at "\\s-*</p>") (goto-char (match-end 0)) (insert " | |
"))) (insert "<div id=\"table-of-contents\"> | |
") (let ((beg (point))) (mapc (quote insert) thetoc) (insert "</div> | |
") (while (re-search-backward "<li>[ | |
]*</li> | |
?" beg t) (replace-match "")))) (goto-char (point-min)) (while (re-search-forward "<p>[ | |
]*</p>" nil t) (replace-match "")) (goto-char (point-min)) (goto-char (point-min)) (let (beg end n) (while (setq beg (next-single-property-change (point) (quote org-whitespace))) (setq n (get-text-property beg (quote org-whitespace)) end (next-single-property-change beg (quote org-whitespace))) (goto-char beg) (delete-region beg end) (insert (format "<span style=\"visibility:hidden;\">%s</span>" (make-string n 120))))) (goto-char (point-min)) (when (looking-at "\\s-+ | |
") (replace-match "")) (remove-text-properties (point-min) (point-max) (quote (display t))) (run-hooks (quote org-export-html-final-hook)) (or to-buffer (save-buffer)) (goto-char (point-min)) (or (org-export-push-to-kill-ring "HTML") (message "Exporting... done")) (if (eq to-buffer (quote string)) (prog1 (buffer-substring (point-min) (point-max)) (kill-buffer (current-buffer))) (current-buffer)))) | |
org-export-as-html(nil nil nil string t) | |
(substring-no-properties (org-export-as-html nil nil nil (quote string) t)) | |
(setq ret (substring-no-properties (org-export-as-html nil nil nil (quote string) t))) | |
(let ((saved-file (when (re-search-forward "^#\\+BEGIN_SRC:?[ ]+\\(ditaa\\)" nil t) (format "/%s/%s/%s.src.org" default-directory (ob:blog-publish-dir BLOG) htmlfile))) (org-confirm-babel-evaluate nil) ret) (when saved-file (ob-write-file saved-file)) (setq ret (substring-no-properties (org-export-as-html nil nil nil (quote string) t))) (when saved-file (delete-file saved-file)) ret) | |
(progn (insert string) (org-mode) (goto-char (point-min)) (let ((saved-file (when (re-search-forward "^#\\+BEGIN_SRC:?[ ]+\\(ditaa\\)" nil t) (format "/%s/%s/%s.src.org" default-directory (ob:blog-publish-dir BLOG) htmlfile))) (org-confirm-babel-evaluate nil) ret) (when saved-file (ob-write-file saved-file)) (setq ret (substring-no-properties (org-export-as-html nil nil nil (quote string) t))) (when saved-file (delete-file saved-file)) ret)) | |
(unwind-protect (progn (insert string) (org-mode) (goto-char (point-min)) (let ((saved-file (when (re-search-forward "^#\\+BEGIN_SRC:?[ ]+\\(ditaa\\)" nil t) (format "/%s/%s/%s.src.org" default-directory (ob:blog-publish-dir BLOG) htmlfile))) (org-confirm-babel-evaluate nil) ret) (when saved-file (ob-write-file saved-file)) (setq ret (substring-no-properties (org-export-as-html nil nil nil (quote string) t))) (when saved-file (delete-file saved-file)) ret)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))) | |
(save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (insert string) (org-mode) (goto-char (point-min)) (let ((saved-file (when (re-search-forward "^#\\+BEGIN_SRC:?[ ]+\\(ditaa\\)" nil t) (format "/%s/%s/%s.src.org" default-directory ... htmlfile))) (org-confirm-babel-evaluate nil) ret) (when saved-file (ob-write-file saved-file)) (setq ret (substring-no-properties (org-export-as-html nil nil nil (quote string) t))) (when saved-file (delete-file saved-file)) ret)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))) | |
(with-current-buffer temp-buffer (unwind-protect (progn (insert string) (org-mode) (goto-char (point-min)) (let ((saved-file (when (re-search-forward "^#\\+BEGIN_SRC:?[ ]+\\(ditaa\\)" nil t) (format "/%s/%s/%s.src.org" default-directory ... htmlfile))) (org-confirm-babel-evaluate nil) ret) (when saved-file (ob-write-file saved-file)) (setq ret (substring-no-properties (org-export-as-html nil nil nil (quote string) t))) (when saved-file (delete-file saved-file)) ret)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))) | |
(let ((temp-buffer (generate-new-buffer " *temp*"))) (with-current-buffer temp-buffer (unwind-protect (progn (insert string) (org-mode) (goto-char (point-min)) (let ((saved-file (when ... ...)) (org-confirm-babel-evaluate nil) ret) (when saved-file (ob-write-file saved-file)) (setq ret (substring-no-properties (org-export-as-html nil nil nil ... t))) (when saved-file (delete-file saved-file)) ret)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))) | |
(with-temp-buffer (insert string) (org-mode) (goto-char (point-min)) (let ((saved-file (when (re-search-forward "^#\\+BEGIN_SRC:?[ ]+\\(ditaa\\)" nil t) (format "/%s/%s/%s.src.org" default-directory (ob:blog-publish-dir BLOG) htmlfile))) (org-confirm-babel-evaluate nil) ret) (when saved-file (ob-write-file saved-file)) (setq ret (substring-no-properties (org-export-as-html nil nil nil (quote string) t))) (when saved-file (delete-file saved-file)) ret)) | |
ob-export-string-to-html("#+OPTIONS: H:7 num:nil toc:nil d:nil todo:nil <:nil pri:nil tags:nil | |
#+BEGIN_HTML | |
<div class=\"row \"><div class=\"span8 \"> | |
#+END_HTML | |
#+BEGIN_HTML | |
<div class=\"hero-unit\"> | |
#+END_HTML | |
#+HTML: <h1>o-blog</h1> | |
A stand-alone blog and publication tool for [[http://orgmode.org/][Org-mode]]. | |
#+BEGIN_HTML | |
</div> | |
#+END_HTML | |
#+HTML: <h1 style=\"font-size: 500%;\">Quick start guide</h1> | |
#+BEGIN_HTML | |
</div><div class=\"span4 \"> | |
#+END_HTML | |
#+HTML: <div class=\"hero-unit\" style=\"font-size: 200%;\"> | |
[[file:{lisp}(ob:path-to-root){/lisp}/features.html][/icon-cog icon-white/ Features]] | |
[[https://github.com/renard/o-blog][/icon-github-sign icon-white/ Github]] | |
[[file:{lisp}(ob:path-to-root){/lisp}/testimonials.html][/icon-comments-alt icon-white/ Testimonials]] | |
[[file:{lisp}(ob:path-to-root){/lisp}/changelog.html][/icon-pencil icon-white/ Changelog]] | |
[[file:{lisp}(ob:path-to-root){/lisp}/bug-report.html][/icon-fire icon-white/ Bug report]] | |
#+HTML: </div> | |
#+BEGIN_HTML | |
</div></div> | |
#+END_HTML | |
** Setup | |
First you need to install [[http://www.gnu.org/s/emacs][Emacs]] (tested with version 24, might work with 23) | |
and [[http://orgmode.org/][Org-mode]] (tested with version 7.8.09, other /might/ work as well). Then | |
you have 2 ways to install [[https://github.com/renard/o-blog][o-blog]]. | |
#+BEGIN_HTML | |
<div class=\"row \"><div class=\"span5 \"> | |
#+END_HTML | |
#+HTML: <h4>Using el-get</h4> | |
If you are using [[https://github.com/dimitri/el-get][el-get]] it would be very easy to install. All you need to do | |
is to add =o-blog= to =el-get-sources= and type: | |
=M-x el-get-install o-blog= | |
If you are using =el-get= 4 or greater, you only need to type: | |
=M-x el-get-install o-blog=. | |
#+BEGIN_HTML | |
</div><div class=\"span6 \"> | |
#+END_HTML | |
#+HTML: <h4>Manual setup</h4> | |
Start by cloning the /git/ repository from [[http://github.com][Github]]. | |
#+begin_src bash | |
cd ~/.emacs.d | |
git clone https://github.com/renard/o-blog.git | |
#+end_src | |
And add following to your =~/.emacs.d/init.el= file: | |
#+begin_src emacs-lisp | |
(add-to-list 'load-path \"~/.emacs.d/o-blog\") | |
(require 'o-blog) | |
#+end_src | |
#+BEGIN_HTML | |
</div></div> | |
#+END_HTML | |
** Publish | |
Open the =~/.emacs.d/o-blog/example/sample.org= file and type =M-x | |
org-publish-blog=. The result site would be published by default in | |
=~/.emacs.d/o-blog/out=. | |
See the [[file:Tips/index.html][tips]] for more details. | |
") | |
(make-ob:post :title title :tags tags :timestamp timestamp :year year :month month :day day :filename filename :filepath filepath :path-to-root (file-relative-name "." filepath) :htmlfile htmlfile :template (or (org-entry-get (point) "TEMPLATE") (if page "blog_static.html" "blog_post.html")) :content content :content-html (ob-export-string-to-html content) :category (make-ob:category :name category :safe category-safe) :sitemap (or (org-entry-get (point) "SITEMAP"))) | |
(let ((content (ob-get-entry-text))) (make-ob:post :title title :tags tags :timestamp timestamp :year year :month month :day day :filename filename :filepath filepath :path-to-root (file-relative-name "." filepath) :htmlfile htmlfile :template (or (org-entry-get (point) "TEMPLATE") (if page "blog_static.html" "blog_post.html")) :content content :content-html (ob-export-string-to-html content) :category (make-ob:category :name category :safe category-safe) :sitemap (or (org-entry-get (point) "SITEMAP")))) | |
(let* ((title (match-string-no-properties 4)) (tags (loop for tn in (org-get-local-tags) with td do (setf td (replace-regexp-in-string "_" " " (replace-regexp-in-string "@" "-" tn))) and collect (make-ob:tags :name td :safe (ob:sanitize-string td)))) (timestamp (apply (quote encode-time) (org-parse-time-string (or (org-entry-get (point) "CLOSED") (time-stamp-string "%:y-%02m-%02d %02H:%02M:%02S %u"))))) (year (string-to-number (format-time-string "%Y" timestamp))) (month (string-to-number (format-time-string "%m" timestamp))) (day (string-to-number (format-time-string "%d" timestamp))) (category (or (org-entry-get (point) "category") (car (last (org-get-outline-path))) (org-entry-get (point) "ARCHIVE_OLPATH") (ob:blog-default-category BLOG))) (category-safe (ob:sanitize-string category)) (page (org-entry-get (point) "PAGE")) (filename (or (org-entry-get (point) "CUSTOM_ID") (ob:sanitize-string title))) (filepath (funcall (ob:blog-posts-filepath BLOG) category-safe year month)) (htmlfile (funcall (ob:blog-posts-htmlfile BLOG) filepath day filename))) (when page (setq htmlfile page filename (file-name-sans-extension (file-name-nondirectory htmlfile)) filepath (file-name-directory htmlfile))) (let ((content (ob-get-entry-text))) (make-ob:post :title title :tags tags :timestamp timestamp :year year :month month :day day :filename filename :filepath filepath :path-to-root (file-relative-name "." filepath) :htmlfile htmlfile :template (or (org-entry-get (point) "TEMPLATE") (if page "blog_static.html" "blog_post.html")) :content content :content-html (ob-export-string-to-html content) :category (make-ob:category :name category :safe category-safe) :sitemap (or (org-entry-get (point) "SITEMAP"))))) | |
(progn (let* ((title (match-string-no-properties 4)) (tags (loop for tn in (org-get-local-tags) with td do (setf td (replace-regexp-in-string "_" " " (replace-regexp-in-string "@" "-" tn))) and collect (make-ob:tags :name td :safe (ob:sanitize-string td)))) (timestamp (apply (quote encode-time) (org-parse-time-string (or (org-entry-get ... "CLOSED") (time-stamp-string "%:y-%02m-%02d %02H:%02M:%02S %u"))))) (year (string-to-number (format-time-string "%Y" timestamp))) (month (string-to-number (format-time-string "%m" timestamp))) (day (string-to-number (format-time-string "%d" timestamp))) (category (or (org-entry-get (point) "category") (car (last (org-get-outline-path))) (org-entry-get (point) "ARCHIVE_OLPATH") (ob:blog-default-category BLOG))) (category-safe (ob:sanitize-string category)) (page (org-entry-get (point) "PAGE")) (filename (or (org-entry-get (point) "CUSTOM_ID") (ob:sanitize-string title))) (filepath (funcall (ob:blog-posts-filepath BLOG) category-safe year month)) (htmlfile (funcall (ob:blog-posts-htmlfile BLOG) filepath day filename))) (when page (setq htmlfile page filename (file-name-sans-extension (file-name-nondirectory htmlfile)) filepath (file-name-directory htmlfile))) (let ((content (ob-get-entry-text))) (make-ob:post :title title :tags tags :timestamp timestamp :year year :month month :day day :filename filename :filepath filepath :path-to-root (file-relative-name "." filepath) :htmlfile htmlfile :template (or (org-entry-get (point) "TEMPLATE") (if page "blog_static.html" "blog_post.html")) :content content :content-html (ob-export-string-to-html content) :category (make-ob:category :name category :safe category-safe) :sitemap (or (org-entry-get (point) "SITEMAP")))))) | |
(if (search-forward-regexp org-complex-heading-regexp (point-at-eol) t) (progn (let* ((title (match-string-no-properties 4)) (tags (loop for tn in (org-get-local-tags) with td do (setf td (replace-regexp-in-string "_" " " ...)) and collect (make-ob:tags :name td :safe (ob:sanitize-string td)))) (timestamp (apply (quote encode-time) (org-parse-time-string (or ... ...)))) (year (string-to-number (format-time-string "%Y" timestamp))) (month (string-to-number (format-time-string "%m" timestamp))) (day (string-to-number (format-time-string "%d" timestamp))) (category (or (org-entry-get (point) "category") (car (last ...)) (org-entry-get (point) "ARCHIVE_OLPATH") (ob:blog-default-category BLOG))) (category-safe (ob:sanitize-string category)) (page (org-entry-get (point) "PAGE")) (filename (or (org-entry-get (point) "CUSTOM_ID") (ob:sanitize-string title))) (filepath (funcall (ob:blog-posts-filepath BLOG) category-safe year month)) (htmlfile (funcall (ob:blog-posts-htmlfile BLOG) filepath day filename))) (when page (setq htmlfile page filename (file-name-sans-extension (file-name-nondirectory htmlfile)) filepath (file-name-directory htmlfile))) (let ((content (ob-get-entry-text))) (make-ob:post :title title :tags tags :timestamp timestamp :year year :month month :day day :filename filename :filepath filepath :path-to-root (file-relative-name "." filepath) :htmlfile htmlfile :template (or (org-entry-get (point) "TEMPLATE") (if page "blog_static.html" "blog_post.html")) :content content :content-html (ob-export-string-to-html content) :category (make-ob:category :name category :safe category-safe) :sitemap (or (org-entry-get (point) "SITEMAP"))))))) | |
(when (search-forward-regexp org-complex-heading-regexp (point-at-eol) t) (let* ((title (match-string-no-properties 4)) (tags (loop for tn in (org-get-local-tags) with td do (setf td (replace-regexp-in-string "_" " " (replace-regexp-in-string "@" "-" tn))) and collect (make-ob:tags :name td :safe (ob:sanitize-string td)))) (timestamp (apply (quote encode-time) (org-parse-time-string (or (org-entry-get ... "CLOSED") (time-stamp-string "%:y-%02m-%02d %02H:%02M:%02S %u"))))) (year (string-to-number (format-time-string "%Y" timestamp))) (month (string-to-number (format-time-string "%m" timestamp))) (day (string-to-number (format-time-string "%d" timestamp))) (category (or (org-entry-get (point) "category") (car (last (org-get-outline-path))) (org-entry-get (point) "ARCHIVE_OLPATH") (ob:blog-default-category BLOG))) (category-safe (ob:sanitize-string category)) (page (org-entry-get (point) "PAGE")) (filename (or (org-entry-get (point) "CUSTOM_ID") (ob:sanitize-string title))) (filepath (funcall (ob:blog-posts-filepath BLOG) category-safe year month)) (htmlfile (funcall (ob:blog-posts-htmlfile BLOG) filepath day filename))) (when page (setq htmlfile page filename (file-name-sans-extension (file-name-nondirectory htmlfile)) filepath (file-name-directory htmlfile))) (let ((content (ob-get-entry-text))) (make-ob:post :title title :tags tags :timestamp timestamp :year year :month month :day day :filename filename :filepath filepath :path-to-root (file-relative-name "." filepath) :htmlfile htmlfile :template (or (org-entry-get (point) "TEMPLATE") (if page "blog_static.html" "blog_post.html")) :content content :content-html (ob-export-string-to-html content) :category (make-ob:category :name category :safe category-safe) :sitemap (or (org-entry-get (point) "SITEMAP")))))) | |
ob-parse-entry() | |
(save-current-buffer (set-buffer (marker-buffer marker)) (goto-char (marker-position marker)) (ob-parse-entry)) | |
(with-current-buffer (marker-buffer marker) (goto-char (marker-position marker)) (ob-parse-entry)) | |
(list (with-current-buffer (marker-buffer marker) (goto-char (marker-position marker)) (ob-parse-entry))) | |
(nconc posts (list (with-current-buffer (marker-buffer marker) (goto-char (marker-position marker)) (ob-parse-entry)))) | |
(setq posts (nconc posts (list (with-current-buffer (marker-buffer marker) (goto-char (marker-position marker)) (ob-parse-entry))))) | |
(while (consp --cl-var--) (setq marker (car --cl-var--)) (setq posts (nconc posts (list (with-current-buffer (marker-buffer marker) (goto-char (marker-position marker)) (ob-parse-entry))))) (setq --cl-var-- (cdr --cl-var--))) | |
(let* ((--cl-var-- markers) (marker nil) (posts nil) (posts nil)) (while (consp --cl-var--) (setq marker (car --cl-var--)) (setq posts (nconc posts (list (with-current-buffer (marker-buffer marker) (goto-char (marker-position marker)) (ob-parse-entry))))) (setq --cl-var-- (cdr --cl-var--))) (loop for post in (sort posts (ob:blog-posts-sorter BLOG)) with id = 0 do (setf (ob:post-id post) id) and do (incf id 1) and collect post)) | |
(catch (quote --cl-block-nil--) (let* ((--cl-var-- markers) (marker nil) (posts nil) (posts nil)) (while (consp --cl-var--) (setq marker (car --cl-var--)) (setq posts (nconc posts (list (with-current-buffer (marker-buffer marker) (goto-char ...) (ob-parse-entry))))) (setq --cl-var-- (cdr --cl-var--))) (loop for post in (sort posts (ob:blog-posts-sorter BLOG)) with id = 0 do (setf (ob:post-id post) id) and do (incf id 1) and collect post))) | |
(cl-block-wrapper (catch (quote --cl-block-nil--) (let* ((--cl-var-- markers) (marker nil) (posts nil) (posts nil)) (while (consp --cl-var--) (setq marker (car --cl-var--)) (setq posts (nconc posts (list (with-current-buffer ... ... ...)))) (setq --cl-var-- (cdr --cl-var--))) (loop for post in (sort posts (ob:blog-posts-sorter BLOG)) with id = 0 do (setf (ob:post-id post) id) and do (incf id 1) and collect post)))) | |
(block nil (let* ((--cl-var-- markers) (marker nil) (posts nil) (posts nil)) (while (consp --cl-var--) (setq marker (car --cl-var--)) (setq posts (nconc posts (list (with-current-buffer (marker-buffer marker) (goto-char ...) (ob-parse-entry))))) (setq --cl-var-- (cdr --cl-var--))) (loop for post in (sort posts (ob:blog-posts-sorter BLOG)) with id = 0 do (setf (ob:post-id post) id) and do (incf id 1) and collect post))) | |
(loop for marker in markers with posts = nil collect (with-current-buffer (marker-buffer marker) (goto-char (marker-position marker)) (ob-parse-entry)) into posts finally return (loop for post in (sort posts (ob:blog-posts-sorter BLOG)) with id = 0 do (setf (ob:post-id post) id) and do (incf id 1) and collect post)) | |
(save-excursion (loop for marker in markers with posts = nil collect (with-current-buffer (marker-buffer marker) (goto-char (marker-position marker)) (ob-parse-entry)) into posts finally return (loop for post in (sort posts (ob:blog-posts-sorter BLOG)) with id = 0 do (setf (ob:post-id post) id) and do (incf id 1) and collect post))) | |
ob-parse-entries((#<marker at 426 in sample.org> #<marker at 5942 in sample.org> #<marker at 6046 in sample.org> #<marker at 7222 in sample.org> #<marker at 7324 in sample.org> #<marker at 8974 in sample.org> #<marker at 11200 in sample.org> #<marker at 15992 in sample.org> #<marker at 20220 in sample.org> #<marker at 21583 in sample.org> #<marker at 24264 in sample.org> #<marker at 24930 in sample.org>)) | |
(append STATIC (ob-parse-entries (org-map-entries (quote point-marker) (ob:blog-static-filter BLOG) (quote file-with-archives)))) | |
(let* ((org-todo-keywords (default-value (quote org-todo-keywords))) (start-time (current-time)) (default-directory (file-name-directory file)) STATIC (BLOG (ob-parse-blog-headers)) (STATIC (append STATIC (ob-parse-entries (org-map-entries (quote point-marker) (ob:blog-static-filter BLOG) (quote file-with-archives))))) (POSTS (ob-parse-entries (org-map-entries (quote point-marker) (ob:blog-posts-filter BLOG) (quote file-with-archives)))) (ALL-POSTS POSTS) (SNIPPETS (ob-parse-entries (org-map-entries (quote point-marker) (ob:blog-snippet-filter BLOG) (quote file-with-archives)))) (TAGS (ob-compute-tags POSTS))) (ob-write-static) (ob-write-posts) (ob-write-tags) (ob-write-index) (ob-do-copy (format "%s" (ob:blog-assets-dir BLOG)) (ob:blog-publish-dir BLOG)) (ob-do-copy (format "%s/%s" (ob:blog-template-dir BLOG) (ob:blog-style-dir BLOG)) (ob:blog-publish-dir BLOG)) (run-hooks (quote o-blog-after-publish-hook)) (message (format "Blog %s published in %ss" file (format-time-string "%s.%3N" (time-subtract (current-time) start-time))))) | |
(save-current-buffer (set-buffer (or (get-file-buffer file) (find-file file))) (run-hooks (quote o-blog-before-publish-hook)) (let* ((org-todo-keywords (default-value (quote org-todo-keywords))) (start-time (current-time)) (default-directory (file-name-directory file)) STATIC (BLOG (ob-parse-blog-headers)) (STATIC (append STATIC (ob-parse-entries (org-map-entries (quote point-marker) (ob:blog-static-filter BLOG) (quote file-with-archives))))) (POSTS (ob-parse-entries (org-map-entries (quote point-marker) (ob:blog-posts-filter BLOG) (quote file-with-archives)))) (ALL-POSTS POSTS) (SNIPPETS (ob-parse-entries (org-map-entries (quote point-marker) (ob:blog-snippet-filter BLOG) (quote file-with-archives)))) (TAGS (ob-compute-tags POSTS))) (ob-write-static) (ob-write-posts) (ob-write-tags) (ob-write-index) (ob-do-copy (format "%s" (ob:blog-assets-dir BLOG)) (ob:blog-publish-dir BLOG)) (ob-do-copy (format "%s/%s" (ob:blog-template-dir BLOG) (ob:blog-style-dir BLOG)) (ob:blog-publish-dir BLOG)) (run-hooks (quote o-blog-after-publish-hook)) (message (format "Blog %s published in %ss" file (format-time-string "%s.%3N" (time-subtract (current-time) start-time)))))) | |
(with-current-buffer (or (get-file-buffer file) (find-file file)) (run-hooks (quote o-blog-before-publish-hook)) (let* ((org-todo-keywords (default-value (quote org-todo-keywords))) (start-time (current-time)) (default-directory (file-name-directory file)) STATIC (BLOG (ob-parse-blog-headers)) (STATIC (append STATIC (ob-parse-entries (org-map-entries (quote point-marker) (ob:blog-static-filter BLOG) (quote file-with-archives))))) (POSTS (ob-parse-entries (org-map-entries (quote point-marker) (ob:blog-posts-filter BLOG) (quote file-with-archives)))) (ALL-POSTS POSTS) (SNIPPETS (ob-parse-entries (org-map-entries (quote point-marker) (ob:blog-snippet-filter BLOG) (quote file-with-archives)))) (TAGS (ob-compute-tags POSTS))) (ob-write-static) (ob-write-posts) (ob-write-tags) (ob-write-index) (ob-do-copy (format "%s" (ob:blog-assets-dir BLOG)) (ob:blog-publish-dir BLOG)) (ob-do-copy (format "%s/%s" (ob:blog-template-dir BLOG) (ob:blog-style-dir BLOG)) (ob:blog-publish-dir BLOG)) (run-hooks (quote o-blog-after-publish-hook)) (message (format "Blog %s published in %ss" file (format-time-string "%s.%3N" (time-subtract (current-time) start-time)))))) | |
org-publish-blog-sync("~/tmp//.emacs.d/o-blog/example/sample.org") | |
(if async (org-publish-blog-async file) (org-publish-blog-sync file)) | |
org-publish-blog("~/tmp//.emacs.d/o-blog/example/sample.org") | |
(let* ((d default-directory) (sample (format "%s/.emacs.d/o-blog/example/sample.org" d)) (debugger (lambda (&rest debugger-args) (let* ((trace (with-temp-buffer ... ... ... ... ...))) (o-blog-bug-report trace)))) (debug-on-error t) print-length print-level) (add-to-list (quote load-path) (format "%s/.emacs.d/org-mode/lisp" d)) (add-to-list (quote load-path) (format "%s/.emacs.d/org-mode/contrib/lisp" d)) (add-to-list (quote load-path) (format "%s/.emacs.d/o-blog" d)) (require (quote o-blog)) (print (concat (emacs-version) " | |
" (org-version) " | |
" (o-blog-version) " | |
")) (find-file sample) (org-publish-blog sample) (kill-emacs)) | |
ob-build-sample() | |
(progn (setq browse-url-generic-program "x-www-browser" browse-url-browser-function (quote browse-url-generic)) (ob-build-sample)) | |
eval((progn (setq browse-url-generic-program "x-www-browser" browse-url-browser-function (quote browse-url-generic)) (ob-build-sample))) | |
command-line-1(("-l" ".emacs.d/o-blog/sample-init.el" "--eval" "(progn (setq browse-url-generic-program \"x-www-browser\" | |
browse-url-browser-function (quote browse-url-generic)) | |
(ob-build-sample))")) | |
command-line() | |
normal-top-level() | |
``` | |
**Configuration** | |
* Emacs | |
``` | |
GNU Emacs 24.1.50.1 (i686-pc-linux-gnu, GTK+ Version 3.0.8) | |
of 2012-09-18 on kutjera, modified by Debian | |
``` | |
* Org-mode | |
``` | |
7.9.3d | |
``` | |
* o-blog | |
``` | |
06a5a119fee27be599ab61baf9b83a1fb88bee9e o-blog (1.2-120-g06a5a11) | |
-ee55c859d23af4a3d4825610815ed5926c417101 Font-Awesome | |
-320b75de63f347027774ba7353eea7f6937ab14b bootstrap | |
-bd8679b4c6e1e05d81c5b9c8a3f85d6fafde9ebe less.js | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment