Closed mkouhia closed 12 years ago
Hi,
This is because you don't have adoc-mode installed.
have a look at http://code.google.com/p/sensorflo-emacs/source/browse/trunk/adoc-mode/adoc-mode.el
Or better you can use https://github.com/dimitri/el-get
Thanks for pointing out the obvious. However, after installing adoc-mode via el-get, out came following:
OVERVIEW
Mark set
Exporting...
htmlize.el 1.34 or later is needed for source code formatting
Exporting...
HTML export done, pushed to kill ring and clipboard
OVERVIEW
Mark set
Exporting...
Exporting...
HTML export done, pushed to kill ring and clipboard
OVERVIEW
Mark set
Exporting...
htmlize.el 1.34 or later is needed for source code formatting
htmlize.el 1.34 or later is needed for source code formatting
Exporting...
HTML export done, pushed to kill ring and clipboard
OVERVIEW
Mark set
Exporting...
htmlize.el 1.34 or later is needed for source code formatting
Exporting...
HTML export done, pushed to kill ring and clipboard
OVERVIEW
Mark set
Exporting...
htmlize.el 1.34 or later is needed for source code formatting
Exporting...
HTML export done, pushed to kill ring and clipboard
OVERVIEW
Symbol's function definition is void: htmlize-region-for-paste
Something seems still to be wrong. I now install htmlize via el-get and get this:
OVERVIEW
Loading vc-git...
OVERVIEW
Mark set
Exporting...
Exporting...
HTML export done, pushed to kill ring and clipboard
OVERVIEW
Mark set
Exporting...
Exporting...
HTML export done, pushed to kill ring and clipboard
OVERVIEW
Mark set
Exporting...
Exporting...
HTML export done, pushed to kill ring and clipboard
OVERVIEW
Mark set
Exporting...
Exporting...
HTML export done, pushed to kill ring and clipboard
OVERVIEW
Mark set
Exporting...
Exporting...
HTML export done, pushed to kill ring and clipboard
OVERVIEW
Wrong type argument: symbolp, (fixed-pitch adoc-generic)
Still not working. Now what?
If adoc-mode and htmlize are prerequisites for using o-blog, I'd consider mentioning them in the quick start guide.
There is indeed something wrong here.
Can you please run following in your sample.org
buffer:
M-x eval-expression RET (let (print-length print-level (debug-on-error t)) (org-publish-blog)) RET
And post the content of the *Backtrace*
buffer.
Thanks
Here is the requested content:
Debugger entered--Lisp error: (wrong-type-argument stringp nil)
get-file-buffer(nil)
(or (get-file-buffer file) (find-file file))
(set-buffer (or (get-file-buffer file) (find-file file)))
(save-current-buffer (set-buffer (or (get-file-buffer file) (find-file file))) (run-hooks (quote o-blog-before-publish-hook)) (let* ((start-time (current-time)) (default-directory (file-name-directory file)) (BLOG (ob-parse-blog-headers)) (POSTS (ob-parse-entries (org-map-entries (quote point-marker) (ob:blog-posts-filter BLOG) (quote file-with-archives)))) (ALL-POSTS POSTS) (STATIC (ob-parse-entries (org-map-entries (quote point-marker) (ob:blog-static-filter BLOG) (quote file-with-archives)))) (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) (copy-directory (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* ((start-time (current-time)) (default-directory (file-name-directory file)) (BLOG (ob-parse-blog-headers)) (POSTS (ob-parse-entries (org-map-entries (quote point-marker) (ob:blog-posts-filter BLOG) (quote file-with-archives)))) (ALL-POSTS POSTS) (STATIC (ob-parse-entries (org-map-entries (quote point-marker) (ob:blog-static-filter BLOG) (quote file-with-archives)))) (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) (copy-directory (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(nil)
(if async (org-publish-blog-async file) (org-publish-blog-sync file))
org-publish-blog()
(let (print-length print-level (debug-on-error t)) (org-publish-blog))
eval((let (print-length print-level (debug-on-error t)) (org-publish-blog)) nil)
eval-expression((let (print-length print-level (debug-on-error t)) (org-publish-blog)) nil)
call-interactively(eval-expression t nil)
execute-extended-command(nil)
call-interactively(execute-extended-command nil nil)
As far as I can read org-publish-blog-sync
is called with a nil
argument.
Can you please check that:
M-x eval-expression RET (let (print-length print-level (debug-on-error t)) (org-publish-blog "path/to/o-blog/example/sample.org" nil)) RET
Please change the path/to
according to your configuration.
By the way I had a check about the previous error you got regarding adoc-mode
not found. Please consider updating your version.
I pulled the changes, no changes result in output to *Messages*
. Here is the result of requested evaluation:
Debugger entered--Lisp error: (wrong-type-argument symbolp (fixed-pitch adoc-generic))
internal-get-lisp-face-attribute((fixed-pitch adoc-generic) :height nil)
face-attribute((fixed-pitch adoc-generic) :height)
htmlize-face-size(adoc-monospace)
htmlize-face-to-fstruct(adoc-monospace)
htmlize-make-face-map((default adoc-monospace adoc-title-3 adoc-title-2 adoc-orig-default adoc-list-item adoc-title-1 adoc-reference adoc-delimiter adoc-title-0 adoc-hide-delimiter))
htmlize-buffer-1()
htmlize-region(1 1192)
htmlize-region-for-paste(1 1192)
(progn (insert-file-contents src-file) (if mode (let ((func (intern (format "%s-mode" mode)))) (if (functionp func) (funcall func) (warn (concat "Mode %s not found for %s. " "Consider installing it. " "No syntax highlight would be bone this time.") mode src-file))) (set-auto-mode)) (font-lock-fontify-buffer) (htmlize-region-for-paste (point-min) (point-max)))
(unwind-protect (progn (insert-file-contents src-file) (if mode (let ((func (intern (format "%s-mode" mode)))) (if (functionp func) (funcall func) (warn (concat "Mode %s not found for %s. " "Consider installing it. " "No syntax highlight would be bone this time.") mode src-file))) (set-auto-mode)) (font-lock-fontify-buffer) (htmlize-region-for-paste (point-min) (point-max))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))
(save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (insert-file-contents src-file) (if mode (let ((func (intern ...))) (if (functionp func) (funcall func) (warn (concat "Mode %s not found for %s. " "Consider installing it. " "No syntax highlight would be bone this time.") mode src-file))) (set-auto-mode)) (font-lock-fontify-buffer) (htmlize-region-for-paste (point-min) (point-max))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))
(with-current-buffer temp-buffer (unwind-protect (progn (insert-file-contents src-file) (if mode (let ((func (intern ...))) (if (functionp func) (funcall func) (warn (concat "Mode %s not found for %s. " "Consider installing it. " "No syntax highlight would be bone this time.") mode src-file))) (set-auto-mode)) (font-lock-fontify-buffer) (htmlize-region-for-paste (point-min) (point-max))) (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-file-contents src-file) (if mode (let ((func ...)) (if (functionp func) (funcall func) (warn ... mode src-file))) (set-auto-mode)) (font-lock-fontify-buffer) (htmlize-region-for-paste (point-min) (point-max))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))))
(with-temp-buffer (insert-file-contents src-file) (if mode (let ((func (intern (format "%s-mode" mode)))) (if (functionp func) (funcall func) (warn (concat "Mode %s not found for %s. " "Consider installing it. " "No syntax highlight would be bone this time.") mode src-file))) (set-auto-mode)) (font-lock-fontify-buffer) (htmlize-region-for-paste (point-min) (point-max)))
(insert "#+BEGIN_HTML\n" (format o-blog-source-header src-file-safe src-file-name src-file-safe src-file-name) (with-temp-buffer (insert-file-contents src-file) (if mode (let ((func (intern (format "%s-mode" mode)))) (if (functionp func) (funcall func) (warn (concat "Mode %s not found for %s. " "Consider installing it. " "No syntax highlight would be bone this time.") mode src-file))) (set-auto-mode)) (font-lock-fontify-buffer) (htmlize-region-for-paste (point-min) (point-max))) o-blog-source-footer "\n#+END_HTML\n")
(let* ((src-file (match-string 1)) (src-file-name (file-name-nondirectory src-file)) (src-file-safe (ob:sanitize-string src-file-name)) (mode (match-string 3))) (beginning-of-line) (delete-region (point) (point-at-eol)) (insert "#+BEGIN_HTML\n" (format o-blog-source-header src-file-safe src-file-name src-file-safe src-file-name) (with-temp-buffer (insert-file-contents src-file) (if mode (let ((func (intern ...))) (if (functionp func) (funcall func) (warn (concat "Mode %s not found for %s. " "Consider installing it. " "No syntax highlight would be bone this time.") mode src-file))) (set-auto-mode)) (font-lock-fontify-buffer) (htmlize-region-for-paste (point-min) (point-max))) o-blog-source-footer "\n#+END_HTML\n"))
(while (re-search-forward "^#\\+O_BLOG_SOURCE:?[ ]+\\(.+?\\)\\([ ]+\\(.+\\)\\)?$" nil t) (let* ((src-file (match-string 1)) (src-file-name (file-name-nondirectory src-file)) (src-file-safe (ob:sanitize-string src-file-name)) (mode (match-string 3))) (beginning-of-line) (delete-region (point) (point-at-eol)) (insert "#+BEGIN_HTML\n" (format o-blog-source-header src-file-safe src-file-name src-file-safe src-file-name) (with-temp-buffer (insert-file-contents src-file) (if mode (let ((func ...)) (if (functionp func) (funcall func) (warn ... mode src-file))) (set-auto-mode)) (font-lock-fontify-buffer) (htmlize-region-for-paste (point-min) (point-max))) o-blog-source-footer "\n#+END_HTML\n")))
(let ((case-fold-search t)) (while (re-search-forward "^#\\+O_BLOG_SOURCE:?[ ]+\\(.+?\\)\\([ ]+\\(.+\\)\\)?$" nil t) (let* ((src-file (match-string 1)) (src-file-name (file-name-nondirectory src-file)) (src-file-safe (ob:sanitize-string src-file-name)) (mode (match-string 3))) (beginning-of-line) (delete-region (point) (point-at-eol)) (insert "#+BEGIN_HTML\n" (format o-blog-source-header src-file-safe src-file-name src-file-safe src-file-name) (with-temp-buffer (insert-file-contents src-file) (if mode (let (...) (if ... ... ...)) (set-auto-mode)) (font-lock-fontify-buffer) (htmlize-region-for-paste (point-min) (point-max))) o-blog-source-footer "\n#+END_HTML\n"))))
(save-excursion (goto-char (point-min)) (let ((case-fold-search t)) (while (re-search-forward "^#\\+O_BLOG_SOURCE:?[ ]+\\(.+?\\)\\([ ]+\\(.+\\)\\)?$" nil t) (let* ((src-file (match-string 1)) (src-file-name (file-name-nondirectory src-file)) (src-file-safe (ob:sanitize-string src-file-name)) (mode (match-string 3))) (beginning-of-line) (delete-region (point) (point-at-eol)) (insert "#+BEGIN_HTML\n" (format o-blog-source-header src-file-safe src-file-name src-file-safe src-file-name) (with-temp-buffer (insert-file-contents src-file) (if mode (let ... ...) (set-auto-mode)) (font-lock-fontify-buffer) (htmlize-region-for-paste (point-min) (point-max))) o-blog-source-footer "\n#+END_HTML\n")))))
(progn (save-excursion (goto-char (point-min)) (let ((case-fold-search t)) (while (re-search-forward "^#\\+O_BLOG_SOURCE:?[ ]+\\(.+?\\)\\([ ]+\\(.+\\)\\)?$" nil t) (let* ((src-file (match-string 1)) (src-file-name (file-name-nondirectory src-file)) (src-file-safe (ob:sanitize-string src-file-name)) (mode (match-string 3))) (beginning-of-line) (delete-region (point) (point-at-eol)) (insert "#+BEGIN_HTML\n" (format o-blog-source-header src-file-safe src-file-name src-file-safe src-file-name) (with-temp-buffer (insert-file-contents src-file) (if mode ... ...) (font-lock-fontify-buffer) (htmlize-region-for-paste ... ...)) o-blog-source-footer "\n#+END_HTML\n"))))))
(unwind-protect (progn (save-excursion (goto-char (point-min)) (let ((case-fold-search t)) (while (re-search-forward "^#\\+O_BLOG_SOURCE:?[ ]+\\(.+?\\)\\([ ]+\\(.+\\)\\)?$" nil t) (let* ((src-file ...) (src-file-name ...) (src-file-safe ...) (mode ...)) (beginning-of-line) (delete-region (point) (point-at-eol)) (insert "#+BEGIN_HTML\n" (format o-blog-source-header src-file-safe src-file-name src-file-safe src-file-name) (with-temp-buffer ... ... ... ...) o-blog-source-footer "\n#+END_HTML\n")))))) (set-match-data save-match-data-internal (quote evaporate)))
(let ((save-match-data-internal (match-data))) (unwind-protect (progn (save-excursion (goto-char (point-min)) (let ((case-fold-search t)) (while (re-search-forward "^#\\+O_BLOG_SOURCE:?[ ]+\\(.+?\\)\\([ ]+\\(.+\\)\\)?$" nil t) (let* (... ... ... ...) (beginning-of-line) (delete-region ... ...) (insert "#+BEGIN_HTML\n" ... ... o-blog-source-footer "\n#+END_HTML\n")))))) (set-match-data save-match-data-internal (quote evaporate))))
(save-match-data (save-excursion (goto-char (point-min)) (let ((case-fold-search t)) (while (re-search-forward "^#\\+O_BLOG_SOURCE:?[ ]+\\(.+?\\)\\([ ]+\\(.+\\)\\)?$" nil t) (let* ((src-file (match-string 1)) (src-file-name (file-name-nondirectory src-file)) (src-file-safe (ob:sanitize-string src-file-name)) (mode (match-string 3))) (beginning-of-line) (delete-region (point) (point-at-eol)) (insert "#+BEGIN_HTML\n" (format o-blog-source-header src-file-safe src-file-name src-file-safe src-file-name) (with-temp-buffer (insert-file-contents src-file) (if mode ... ...) (font-lock-fontify-buffer) (htmlize-region-for-paste ... ...)) o-blog-source-footer "\n#+END_HTML\n"))))))
o-blog-publish-source()
run-hooks(o-blog-html-plugins-hook)
(progn (insert text) (goto-char (point-min)) (org-mode) (while (<= 2 (save-match-data (funcall outline-level))) (org-promote-subtree)) (run-hooks (quote o-blog-html-plugins-hook)) (goto-char (point-min)) (when (search-forward-regexp "^\\s-*$" nil t) (goto-char (match-end 0))) (save-excursion (insert "#+OPTIONS: H:7 num:nil toc:8 d:nil todo:nil <:nil pri:nil tags:nil\n\n")) (buffer-substring-no-properties (point) (point-max)))
(unwind-protect (progn (insert text) (goto-char (point-min)) (org-mode) (while (<= 2 (save-match-data (funcall outline-level))) (org-promote-subtree)) (run-hooks (quote o-blog-html-plugins-hook)) (goto-char (point-min)) (when (search-forward-regexp "^\\s-*$" nil t) (goto-char (match-end 0))) (save-excursion (insert "#+OPTIONS: H:7 num:nil toc:8 d:nil todo:nil <:nil pri:nil tags:nil\n\n")) (buffer-substring-no-properties (point) (point-max))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))
(save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (insert text) (goto-char (point-min)) (org-mode) (while (<= 2 (save-match-data (funcall outline-level))) (org-promote-subtree)) (run-hooks (quote o-blog-html-plugins-hook)) (goto-char (point-min)) (when (search-forward-regexp "^\\s-*$" nil t) (goto-char (match-end 0))) (save-excursion (insert "#+OPTIONS: H:7 num:nil toc:8 d:nil todo:nil <:nil pri:nil tags:nil\n\n")) (buffer-substring-no-properties (point) (point-max))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))
(with-current-buffer temp-buffer (unwind-protect (progn (insert text) (goto-char (point-min)) (org-mode) (while (<= 2 (save-match-data (funcall outline-level))) (org-promote-subtree)) (run-hooks (quote o-blog-html-plugins-hook)) (goto-char (point-min)) (when (search-forward-regexp "^\\s-*$" nil t) (goto-char (match-end 0))) (save-excursion (insert "#+OPTIONS: H:7 num:nil toc:8 d:nil todo:nil <:nil pri:nil tags:nil\n\n")) (buffer-substring-no-properties (point) (point-max))) (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 text) (goto-char (point-min)) (org-mode) (while (<= 2 (save-match-data (funcall outline-level))) (org-promote-subtree)) (run-hooks (quote o-blog-html-plugins-hook)) (goto-char (point-min)) (when (search-forward-regexp "^\\s-*$" nil t) (goto-char (match-end 0))) (save-excursion (insert "#+OPTIONS: H:7 num:nil toc:8 d:nil todo:nil <:nil pri:nil tags:nil\n\n")) (buffer-substring-no-properties (point) (point-max))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))))
(with-temp-buffer (insert text) (goto-char (point-min)) (org-mode) (while (<= 2 (save-match-data (funcall outline-level))) (org-promote-subtree)) (run-hooks (quote o-blog-html-plugins-hook)) (goto-char (point-min)) (when (search-forward-regexp "^\\s-*$" nil t) (goto-char (match-end 0))) (save-excursion (insert "#+OPTIONS: H:7 num:nil toc:8 d:nil todo:nil <:nil pri:nil tags:nil\n\n")) (buffer-substring-no-properties (point) (point-max)))
(let ((text (buffer-string))) (with-temp-buffer (insert text) (goto-char (point-min)) (org-mode) (while (<= 2 (save-match-data (funcall outline-level))) (org-promote-subtree)) (run-hooks (quote o-blog-html-plugins-hook)) (goto-char (point-min)) (when (search-forward-regexp "^\\s-*$" nil t) (goto-char (match-end 0))) (save-excursion (insert "#+OPTIONS: H:7 num:nil toc:8 d:nil todo:nil <:nil pri:nil tags:nil\n\n")) (buffer-substring-no-properties (point) (point-max))))
(progn (org-narrow-to-subtree) (let ((text (buffer-string))) (with-temp-buffer (insert text) (goto-char (point-min)) (org-mode) (while (<= 2 (save-match-data (funcall outline-level))) (org-promote-subtree)) (run-hooks (quote o-blog-html-plugins-hook)) (goto-char (point-min)) (when (search-forward-regexp "^\\s-*$" nil t) (goto-char (match-end 0))) (save-excursion (insert "#+OPTIONS: H:7 num:nil toc:8 d:nil todo:nil <:nil pri:nil tags:nil\n\n")) (buffer-substring-no-properties (point) (point-max)))))
(unwind-protect (progn (org-narrow-to-subtree) (let ((text (buffer-string))) (with-temp-buffer (insert text) (goto-char (point-min)) (org-mode) (while (<= 2 (save-match-data (funcall outline-level))) (org-promote-subtree)) (run-hooks (quote o-blog-html-plugins-hook)) (goto-char (point-min)) (when (search-forward-regexp "^\\s-*$" nil t) (goto-char (match-end 0))) (save-excursion (insert "#+OPTIONS: H:7 num:nil toc:8 d:nil todo:nil <:nil pri:nil tags:nil\n\n")) (buffer-substring-no-properties (point) (point-max))))) (set-match-data save-match-data-internal (quote evaporate)))
(let ((save-match-data-internal (match-data))) (unwind-protect (progn (org-narrow-to-subtree) (let ((text (buffer-string))) (with-temp-buffer (insert text) (goto-char (point-min)) (org-mode) (while (<= 2 (save-match-data ...)) (org-promote-subtree)) (run-hooks (quote o-blog-html-plugins-hook)) (goto-char (point-min)) (when (search-forward-regexp "^\\s-*$" nil t) (goto-char (match-end 0))) (save-excursion (insert "#+OPTIONS: H:7 num:nil toc:8 d:nil todo:nil <:nil pri:nil tags:nil\n\n")) (buffer-substring-no-properties (point) (point-max))))) (set-match-data save-match-data-internal (quote evaporate))))
(save-match-data (org-narrow-to-subtree) (let ((text (buffer-string))) (with-temp-buffer (insert text) (goto-char (point-min)) (org-mode) (while (<= 2 (save-match-data (funcall outline-level))) (org-promote-subtree)) (run-hooks (quote o-blog-html-plugins-hook)) (goto-char (point-min)) (when (search-forward-regexp "^\\s-*$" nil t) (goto-char (match-end 0))) (save-excursion (insert "#+OPTIONS: H:7 num:nil toc:8 d:nil todo:nil <:nil pri:nil tags:nil\n\n")) (buffer-substring-no-properties (point) (point-max)))))
(save-restriction (save-match-data (org-narrow-to-subtree) (let ((text (buffer-string))) (with-temp-buffer (insert text) (goto-char (point-min)) (org-mode) (while (<= 2 (save-match-data (funcall outline-level))) (org-promote-subtree)) (run-hooks (quote o-blog-html-plugins-hook)) (goto-char (point-min)) (when (search-forward-regexp "^\\s-*$" nil t) (goto-char (match-end 0))) (save-excursion (insert "#+OPTIONS: H:7 num:nil toc:8 d:nil todo:nil <:nil pri:nil tags:nil\n\n")) (buffer-substring-no-properties (point) (point-max))))))
(save-excursion (save-restriction (save-match-data (org-narrow-to-subtree) (let ((text (buffer-string))) (with-temp-buffer (insert text) (goto-char (point-min)) (org-mode) (while (<= 2 (save-match-data ...)) (org-promote-subtree)) (run-hooks (quote o-blog-html-plugins-hook)) (goto-char (point-min)) (when (search-forward-regexp "^\\s-*$" nil t) (goto-char (match-end 0))) (save-excursion (insert "#+OPTIONS: H:7 num:nil toc:8 d:nil todo:nil <:nil pri:nil tags:nil\n\n")) (buffer-substring-no-properties (point) (point-max)))))))
ob-get-entry-text()
(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))))) (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") (ob:blog-default-category BLOG))) (page (org-entry-get (point) "PAGE")) (filename (ob:sanitize-string title)) (filepath (format "%s/%.4d/%.2d" category year month)) (htmlfile (format "%s/%.2d_%s.html" filepath day filename)) (content (ob-get-entry-text)) (linked-files (ob-get-linked-files content))) (when page (setq htmlfile page filename (file-name-sans-extension (file-name-nondirectory htmlfile)) filepath (file-name-directory htmlfile))) (loop for f in linked-files do (let ((target (format "%s/%s/%s" (ob:blog-publish-dir BLOG) (or filepath ".") f))) (mkdir (file-name-directory target) t) (copy-file f target t t t))) (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 category))
(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))))) (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") (ob:blog-default-category BLOG))) (page (org-entry-get (point) "PAGE")) (filename (ob:sanitize-string title)) (filepath (format "%s/%.4d/%.2d" category year month)) (htmlfile (format "%s/%.2d_%s.html" filepath day filename)) (content (ob-get-entry-text)) (linked-files (ob-get-linked-files content))) (when page (setq htmlfile page filename (file-name-sans-extension (file-name-nondirectory htmlfile)) filepath (file-name-directory htmlfile))) (loop for f in linked-files do (let ((target (format "%s/%s/%s" (ob:blog-publish-dir BLOG) (or filepath ".") f))) (mkdir (file-name-directory target) t) (copy-file f target t t t))) (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 category)))
(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") (ob:blog-default-category BLOG))) (page (org-entry-get (point) "PAGE")) (filename (ob:sanitize-string title)) (filepath (format "%s/%.4d/%.2d" category year month)) (htmlfile (format "%s/%.2d_%s.html" filepath day filename)) (content (ob-get-entry-text)) (linked-files (ob-get-linked-files content))) (when page (setq htmlfile page filename (file-name-sans-extension (file-name-nondirectory htmlfile)) filepath (file-name-directory htmlfile))) (loop for f in linked-files do (let ((target (format "%s/%s/%s" ... ... f))) (mkdir (file-name-directory target) t) (copy-file f target t t t))) (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 category))))
(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))))) (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") (ob:blog-default-category BLOG))) (page (org-entry-get (point) "PAGE")) (filename (ob:sanitize-string title)) (filepath (format "%s/%.4d/%.2d" category year month)) (htmlfile (format "%s/%.2d_%s.html" filepath day filename)) (content (ob-get-entry-text)) (linked-files (ob-get-linked-files content))) (when page (setq htmlfile page filename (file-name-sans-extension (file-name-nondirectory htmlfile)) filepath (file-name-directory htmlfile))) (loop for f in linked-files do (let ((target (format "%s/%s/%s" (ob:blog-publish-dir BLOG) (or filepath ".") f))) (mkdir (file-name-directory target) t) (copy-file f target t t t))) (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 category)))
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 (quote ob-sort-posts-by-date)) 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 (quote ob-sort-posts-by-date)) 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 (quote ob-sort-posts-by-date)) 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 (quote ob-sort-posts-by-date)) 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 (quote ob-sort-posts-by-date)) 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 (quote ob-sort-posts-by-date)) with id = 0 do (setf (ob:post-id post) id) and do (incf id 1) and collect post)))
ob-parse-entries((#<marker at 17593 in sample.org> #<marker at 18752 in sample.org> #<marker at 19251 in sample.org> #<marker at 25625 in sample.org> #<marker at 26385 in sample.org> #<marker at 29032 in sample.org> #<marker at 29704 in sample.org> #<marker at 33200 in sample.org>))
(let* ((start-time (current-time)) (default-directory (file-name-directory file)) (BLOG (ob-parse-blog-headers)) (POSTS (ob-parse-entries (org-map-entries (quote point-marker) (ob:blog-posts-filter BLOG) (quote file-with-archives)))) (ALL-POSTS POSTS) (STATIC (ob-parse-entries (org-map-entries (quote point-marker) (ob:blog-static-filter BLOG) (quote file-with-archives)))) (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) (copy-directory (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* ((start-time (current-time)) (default-directory (file-name-directory file)) (BLOG (ob-parse-blog-headers)) (POSTS (ob-parse-entries (org-map-entries (quote point-marker) (ob:blog-posts-filter BLOG) (quote file-with-archives)))) (ALL-POSTS POSTS) (STATIC (ob-parse-entries (org-map-entries (quote point-marker) (ob:blog-static-filter BLOG) (quote file-with-archives)))) (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) (copy-directory (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* ((start-time (current-time)) (default-directory (file-name-directory file)) (BLOG (ob-parse-blog-headers)) (POSTS (ob-parse-entries (org-map-entries (quote point-marker) (ob:blog-posts-filter BLOG) (quote file-with-archives)))) (ALL-POSTS POSTS) (STATIC (ob-parse-entries (org-map-entries (quote point-marker) (ob:blog-static-filter BLOG) (quote file-with-archives)))) (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) (copy-directory (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("~/.emacs.d/o-blog/example/sample.org")
(if async (org-publish-blog-async file) (org-publish-blog-sync file))
org-publish-blog("~/.emacs.d/o-blog/example/sample.org" nil)
(let (print-length print-level (debug-on-error t)) (org-publish-blog "~/.emacs.d/o-blog/example/sample.org" nil))
eval((let (print-length print-level (debug-on-error t)) (org-publish-blog "~/.emacs.d/o-blog/example/sample.org" nil)) nil)
eval-expression((let (print-length print-level (debug-on-error t)) (org-publish-blog "~/.emacs.d/o-blog/example/sample.org" nil)) nil)
call-interactively(eval-expression t nil)
execute-extended-command(nil)
call-interactively(execute-extended-command nil nil)
Ok.
I guess this is a adoc-mode related issue.
I do use that version: http://sensorflo-emacs.googlecode.com/svn-history/r193/trunk/adoc-mode/adoc-mode.el
Can you please test with that version?
Interestingly, changing adoc-mode to the version you specified did not change anything. I even tried emptying my .emacs
and having there only lines related to o-blog
, adoc-mode
and el-get
, but neither did it help.
What error do you get? still the same about
Debugger entered--Lisp error: (wrong-type-argument symbolp (fixed-pitch adoc-generic))
Yes — seems rather same as the last one.
M-x eval-expression RET (let (print-length print-level (debug-on-error t)) (org-publish-blog "path/to/o-blog/example/sample.org" nil)) RET
results in following:
Debugger entered--Lisp error: (wrong-type-argument symbolp (fixed-pitch adoc-generic))
internal-get-lisp-face-attribute((fixed-pitch adoc-generic) :height nil)
face-attribute((fixed-pitch adoc-generic) :height)
htmlize-face-size(adoc-monospace)
htmlize-face-to-fstruct(adoc-monospace)
htmlize-make-face-map((default adoc-monospace adoc-title-3 adoc-title-2 adoc-orig-default adoc-list-item adoc-title-1 adoc-reference adoc-delimiter adoc-title-0 adoc-hide-delimiter))
htmlize-buffer-1()
htmlize-region(1 1192)
htmlize-region-for-paste(1 1192)
(progn (insert-file-contents src-file) (if mode (let ((func (intern (format "%s-mode" mode)))) (if (functionp func) (funcall func) (warn (concat "Mode %s not found for %s. " "Consider installing it. " "No syntax highlight would be bone this time.") mode src-file))) (set-auto-mode)) (font-lock-fontify-buffer) (htmlize-region-for-paste (point-min) (point-max)))
(unwind-protect (progn (insert-file-contents src-file) (if mode (let ((func (intern (format "%s-mode" mode)))) (if (functionp func) (funcall func) (warn (concat "Mode %s not found for %s. " "Consider installing it. " "No syntax highlight would be bone this time.") mode src-file))) (set-auto-mode)) (font-lock-fontify-buffer) (htmlize-region-for-paste (point-min) (point-max))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))
(save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (insert-file-contents src-file) (if mode (let ((func (intern ...))) (if (functionp func) (funcall func) (warn (concat "Mode %s not found for %s. " "Consider installing it. " "No syntax highlight would be bone this time.") mode src-file))) (set-auto-mode)) (font-lock-fontify-buffer) (htmlize-region-for-paste (point-min) (point-max))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))
(with-current-buffer temp-buffer (unwind-protect (progn (insert-file-contents src-file) (if mode (let ((func (intern ...))) (if (functionp func) (funcall func) (warn (concat "Mode %s not found for %s. " "Consider installing it. " "No syntax highlight would be bone this time.") mode src-file))) (set-auto-mode)) (font-lock-fontify-buffer) (htmlize-region-for-paste (point-min) (point-max))) (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-file-contents src-file) (if mode (let ((func ...)) (if (functionp func) (funcall func) (warn ... mode src-file))) (set-auto-mode)) (font-lock-fontify-buffer) (htmlize-region-for-paste (point-min) (point-max))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))))
(with-temp-buffer (insert-file-contents src-file) (if mode (let ((func (intern (format "%s-mode" mode)))) (if (functionp func) (funcall func) (warn (concat "Mode %s not found for %s. " "Consider installing it. " "No syntax highlight would be bone this time.") mode src-file))) (set-auto-mode)) (font-lock-fontify-buffer) (htmlize-region-for-paste (point-min) (point-max)))
(insert "#+BEGIN_HTML\n" (format o-blog-source-header src-file-safe src-file-name src-file-safe src-file-name) (with-temp-buffer (insert-file-contents src-file) (if mode (let ((func (intern (format "%s-mode" mode)))) (if (functionp func) (funcall func) (warn (concat "Mode %s not found for %s. " "Consider installing it. " "No syntax highlight would be bone this time.") mode src-file))) (set-auto-mode)) (font-lock-fontify-buffer) (htmlize-region-for-paste (point-min) (point-max))) o-blog-source-footer "\n#+END_HTML\n")
(let* ((src-file (match-string 1)) (src-file-name (file-name-nondirectory src-file)) (src-file-safe (ob:sanitize-string src-file-name)) (mode (match-string 3))) (beginning-of-line) (delete-region (point) (point-at-eol)) (insert "#+BEGIN_HTML\n" (format o-blog-source-header src-file-safe src-file-name src-file-safe src-file-name) (with-temp-buffer (insert-file-contents src-file) (if mode (let ((func (intern ...))) (if (functionp func) (funcall func) (warn (concat "Mode %s not found for %s. " "Consider installing it. " "No syntax highlight would be bone this time.") mode src-file))) (set-auto-mode)) (font-lock-fontify-buffer) (htmlize-region-for-paste (point-min) (point-max))) o-blog-source-footer "\n#+END_HTML\n"))
(while (re-search-forward "^#\\+O_BLOG_SOURCE:?[ ]+\\(.+?\\)\\([ ]+\\(.+\\)\\)?$" nil t) (let* ((src-file (match-string 1)) (src-file-name (file-name-nondirectory src-file)) (src-file-safe (ob:sanitize-string src-file-name)) (mode (match-string 3))) (beginning-of-line) (delete-region (point) (point-at-eol)) (insert "#+BEGIN_HTML\n" (format o-blog-source-header src-file-safe src-file-name src-file-safe src-file-name) (with-temp-buffer (insert-file-contents src-file) (if mode (let ((func ...)) (if (functionp func) (funcall func) (warn ... mode src-file))) (set-auto-mode)) (font-lock-fontify-buffer) (htmlize-region-for-paste (point-min) (point-max))) o-blog-source-footer "\n#+END_HTML\n")))
(let ((case-fold-search t)) (while (re-search-forward "^#\\+O_BLOG_SOURCE:?[ ]+\\(.+?\\)\\([ ]+\\(.+\\)\\)?$" nil t) (let* ((src-file (match-string 1)) (src-file-name (file-name-nondirectory src-file)) (src-file-safe (ob:sanitize-string src-file-name)) (mode (match-string 3))) (beginning-of-line) (delete-region (point) (point-at-eol)) (insert "#+BEGIN_HTML\n" (format o-blog-source-header src-file-safe src-file-name src-file-safe src-file-name) (with-temp-buffer (insert-file-contents src-file) (if mode (let (...) (if ... ... ...)) (set-auto-mode)) (font-lock-fontify-buffer) (htmlize-region-for-paste (point-min) (point-max))) o-blog-source-footer "\n#+END_HTML\n"))))
(save-excursion (goto-char (point-min)) (let ((case-fold-search t)) (while (re-search-forward "^#\\+O_BLOG_SOURCE:?[ ]+\\(.+?\\)\\([ ]+\\(.+\\)\\)?$" nil t) (let* ((src-file (match-string 1)) (src-file-name (file-name-nondirectory src-file)) (src-file-safe (ob:sanitize-string src-file-name)) (mode (match-string 3))) (beginning-of-line) (delete-region (point) (point-at-eol)) (insert "#+BEGIN_HTML\n" (format o-blog-source-header src-file-safe src-file-name src-file-safe src-file-name) (with-temp-buffer (insert-file-contents src-file) (if mode (let ... ...) (set-auto-mode)) (font-lock-fontify-buffer) (htmlize-region-for-paste (point-min) (point-max))) o-blog-source-footer "\n#+END_HTML\n")))))
(progn (save-excursion (goto-char (point-min)) (let ((case-fold-search t)) (while (re-search-forward "^#\\+O_BLOG_SOURCE:?[ ]+\\(.+?\\)\\([ ]+\\(.+\\)\\)?$" nil t) (let* ((src-file (match-string 1)) (src-file-name (file-name-nondirectory src-file)) (src-file-safe (ob:sanitize-string src-file-name)) (mode (match-string 3))) (beginning-of-line) (delete-region (point) (point-at-eol)) (insert "#+BEGIN_HTML\n" (format o-blog-source-header src-file-safe src-file-name src-file-safe src-file-name) (with-temp-buffer (insert-file-contents src-file) (if mode ... ...) (font-lock-fontify-buffer) (htmlize-region-for-paste ... ...)) o-blog-source-footer "\n#+END_HTML\n"))))))
(unwind-protect (progn (save-excursion (goto-char (point-min)) (let ((case-fold-search t)) (while (re-search-forward "^#\\+O_BLOG_SOURCE:?[ ]+\\(.+?\\)\\([ ]+\\(.+\\)\\)?$" nil t) (let* ((src-file ...) (src-file-name ...) (src-file-safe ...) (mode ...)) (beginning-of-line) (delete-region (point) (point-at-eol)) (insert "#+BEGIN_HTML\n" (format o-blog-source-header src-file-safe src-file-name src-file-safe src-file-name) (with-temp-buffer ... ... ... ...) o-blog-source-footer "\n#+END_HTML\n")))))) (set-match-data save-match-data-internal (quote evaporate)))
(let ((save-match-data-internal (match-data))) (unwind-protect (progn (save-excursion (goto-char (point-min)) (let ((case-fold-search t)) (while (re-search-forward "^#\\+O_BLOG_SOURCE:?[ ]+\\(.+?\\)\\([ ]+\\(.+\\)\\)?$" nil t) (let* (... ... ... ...) (beginning-of-line) (delete-region ... ...) (insert "#+BEGIN_HTML\n" ... ... o-blog-source-footer "\n#+END_HTML\n")))))) (set-match-data save-match-data-internal (quote evaporate))))
(save-match-data (save-excursion (goto-char (point-min)) (let ((case-fold-search t)) (while (re-search-forward "^#\\+O_BLOG_SOURCE:?[ ]+\\(.+?\\)\\([ ]+\\(.+\\)\\)?$" nil t) (let* ((src-file (match-string 1)) (src-file-name (file-name-nondirectory src-file)) (src-file-safe (ob:sanitize-string src-file-name)) (mode (match-string 3))) (beginning-of-line) (delete-region (point) (point-at-eol)) (insert "#+BEGIN_HTML\n" (format o-blog-source-header src-file-safe src-file-name src-file-safe src-file-name) (with-temp-buffer (insert-file-contents src-file) (if mode ... ...) (font-lock-fontify-buffer) (htmlize-region-for-paste ... ...)) o-blog-source-footer "\n#+END_HTML\n"))))))
o-blog-publish-source()
run-hooks(o-blog-html-plugins-hook)
(progn (insert text) (goto-char (point-min)) (org-mode) (while (<= 2 (save-match-data (funcall outline-level))) (org-promote-subtree)) (run-hooks (quote o-blog-html-plugins-hook)) (goto-char (point-min)) (when (search-forward-regexp "^\\s-*$" nil t) (goto-char (match-end 0))) (save-excursion (insert "#+OPTIONS: H:7 num:nil toc:8 d:nil todo:nil <:nil pri:nil tags:nil\n\n")) (buffer-substring-no-properties (point) (point-max)))
(unwind-protect (progn (insert text) (goto-char (point-min)) (org-mode) (while (<= 2 (save-match-data (funcall outline-level))) (org-promote-subtree)) (run-hooks (quote o-blog-html-plugins-hook)) (goto-char (point-min)) (when (search-forward-regexp "^\\s-*$" nil t) (goto-char (match-end 0))) (save-excursion (insert "#+OPTIONS: H:7 num:nil toc:8 d:nil todo:nil <:nil pri:nil tags:nil\n\n")) (buffer-substring-no-properties (point) (point-max))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))
(save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (insert text) (goto-char (point-min)) (org-mode) (while (<= 2 (save-match-data (funcall outline-level))) (org-promote-subtree)) (run-hooks (quote o-blog-html-plugins-hook)) (goto-char (point-min)) (when (search-forward-regexp "^\\s-*$" nil t) (goto-char (match-end 0))) (save-excursion (insert "#+OPTIONS: H:7 num:nil toc:8 d:nil todo:nil <:nil pri:nil tags:nil\n\n")) (buffer-substring-no-properties (point) (point-max))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))
(with-current-buffer temp-buffer (unwind-protect (progn (insert text) (goto-char (point-min)) (org-mode) (while (<= 2 (save-match-data (funcall outline-level))) (org-promote-subtree)) (run-hooks (quote o-blog-html-plugins-hook)) (goto-char (point-min)) (when (search-forward-regexp "^\\s-*$" nil t) (goto-char (match-end 0))) (save-excursion (insert "#+OPTIONS: H:7 num:nil toc:8 d:nil todo:nil <:nil pri:nil tags:nil\n\n")) (buffer-substring-no-properties (point) (point-max))) (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 text) (goto-char (point-min)) (org-mode) (while (<= 2 (save-match-data (funcall outline-level))) (org-promote-subtree)) (run-hooks (quote o-blog-html-plugins-hook)) (goto-char (point-min)) (when (search-forward-regexp "^\\s-*$" nil t) (goto-char (match-end 0))) (save-excursion (insert "#+OPTIONS: H:7 num:nil toc:8 d:nil todo:nil <:nil pri:nil tags:nil\n\n")) (buffer-substring-no-properties (point) (point-max))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))))
(with-temp-buffer (insert text) (goto-char (point-min)) (org-mode) (while (<= 2 (save-match-data (funcall outline-level))) (org-promote-subtree)) (run-hooks (quote o-blog-html-plugins-hook)) (goto-char (point-min)) (when (search-forward-regexp "^\\s-*$" nil t) (goto-char (match-end 0))) (save-excursion (insert "#+OPTIONS: H:7 num:nil toc:8 d:nil todo:nil <:nil pri:nil tags:nil\n\n")) (buffer-substring-no-properties (point) (point-max)))
(let ((text (buffer-string))) (with-temp-buffer (insert text) (goto-char (point-min)) (org-mode) (while (<= 2 (save-match-data (funcall outline-level))) (org-promote-subtree)) (run-hooks (quote o-blog-html-plugins-hook)) (goto-char (point-min)) (when (search-forward-regexp "^\\s-*$" nil t) (goto-char (match-end 0))) (save-excursion (insert "#+OPTIONS: H:7 num:nil toc:8 d:nil todo:nil <:nil pri:nil tags:nil\n\n")) (buffer-substring-no-properties (point) (point-max))))
(progn (org-narrow-to-subtree) (let ((text (buffer-string))) (with-temp-buffer (insert text) (goto-char (point-min)) (org-mode) (while (<= 2 (save-match-data (funcall outline-level))) (org-promote-subtree)) (run-hooks (quote o-blog-html-plugins-hook)) (goto-char (point-min)) (when (search-forward-regexp "^\\s-*$" nil t) (goto-char (match-end 0))) (save-excursion (insert "#+OPTIONS: H:7 num:nil toc:8 d:nil todo:nil <:nil pri:nil tags:nil\n\n")) (buffer-substring-no-properties (point) (point-max)))))
(unwind-protect (progn (org-narrow-to-subtree) (let ((text (buffer-string))) (with-temp-buffer (insert text) (goto-char (point-min)) (org-mode) (while (<= 2 (save-match-data (funcall outline-level))) (org-promote-subtree)) (run-hooks (quote o-blog-html-plugins-hook)) (goto-char (point-min)) (when (search-forward-regexp "^\\s-*$" nil t) (goto-char (match-end 0))) (save-excursion (insert "#+OPTIONS: H:7 num:nil toc:8 d:nil todo:nil <:nil pri:nil tags:nil\n\n")) (buffer-substring-no-properties (point) (point-max))))) (set-match-data save-match-data-internal (quote evaporate)))
(let ((save-match-data-internal (match-data))) (unwind-protect (progn (org-narrow-to-subtree) (let ((text (buffer-string))) (with-temp-buffer (insert text) (goto-char (point-min)) (org-mode) (while (<= 2 (save-match-data ...)) (org-promote-subtree)) (run-hooks (quote o-blog-html-plugins-hook)) (goto-char (point-min)) (when (search-forward-regexp "^\\s-*$" nil t) (goto-char (match-end 0))) (save-excursion (insert "#+OPTIONS: H:7 num:nil toc:8 d:nil todo:nil <:nil pri:nil tags:nil\n\n")) (buffer-substring-no-properties (point) (point-max))))) (set-match-data save-match-data-internal (quote evaporate))))
(save-match-data (org-narrow-to-subtree) (let ((text (buffer-string))) (with-temp-buffer (insert text) (goto-char (point-min)) (org-mode) (while (<= 2 (save-match-data (funcall outline-level))) (org-promote-subtree)) (run-hooks (quote o-blog-html-plugins-hook)) (goto-char (point-min)) (when (search-forward-regexp "^\\s-*$" nil t) (goto-char (match-end 0))) (save-excursion (insert "#+OPTIONS: H:7 num:nil toc:8 d:nil todo:nil <:nil pri:nil tags:nil\n\n")) (buffer-substring-no-properties (point) (point-max)))))
(save-restriction (save-match-data (org-narrow-to-subtree) (let ((text (buffer-string))) (with-temp-buffer (insert text) (goto-char (point-min)) (org-mode) (while (<= 2 (save-match-data (funcall outline-level))) (org-promote-subtree)) (run-hooks (quote o-blog-html-plugins-hook)) (goto-char (point-min)) (when (search-forward-regexp "^\\s-*$" nil t) (goto-char (match-end 0))) (save-excursion (insert "#+OPTIONS: H:7 num:nil toc:8 d:nil todo:nil <:nil pri:nil tags:nil\n\n")) (buffer-substring-no-properties (point) (point-max))))))
(save-excursion (save-restriction (save-match-data (org-narrow-to-subtree) (let ((text (buffer-string))) (with-temp-buffer (insert text) (goto-char (point-min)) (org-mode) (while (<= 2 (save-match-data ...)) (org-promote-subtree)) (run-hooks (quote o-blog-html-plugins-hook)) (goto-char (point-min)) (when (search-forward-regexp "^\\s-*$" nil t) (goto-char (match-end 0))) (save-excursion (insert "#+OPTIONS: H:7 num:nil toc:8 d:nil todo:nil <:nil pri:nil tags:nil\n\n")) (buffer-substring-no-properties (point) (point-max)))))))
ob-get-entry-text()
(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))))) (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") (ob:blog-default-category BLOG))) (page (org-entry-get (point) "PAGE")) (filename (ob:sanitize-string title)) (filepath (format "%s/%.4d/%.2d" category year month)) (htmlfile (format "%s/%.2d_%s.html" filepath day filename)) (content (ob-get-entry-text)) (linked-files (ob-get-linked-files content))) (when page (setq htmlfile page filename (file-name-sans-extension (file-name-nondirectory htmlfile)) filepath (file-name-directory htmlfile))) (loop for f in linked-files do (let ((target (format "%s/%s/%s" (ob:blog-publish-dir BLOG) (or filepath ".") f))) (mkdir (file-name-directory target) t) (copy-file f target t t t))) (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 category))
(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))))) (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") (ob:blog-default-category BLOG))) (page (org-entry-get (point) "PAGE")) (filename (ob:sanitize-string title)) (filepath (format "%s/%.4d/%.2d" category year month)) (htmlfile (format "%s/%.2d_%s.html" filepath day filename)) (content (ob-get-entry-text)) (linked-files (ob-get-linked-files content))) (when page (setq htmlfile page filename (file-name-sans-extension (file-name-nondirectory htmlfile)) filepath (file-name-directory htmlfile))) (loop for f in linked-files do (let ((target (format "%s/%s/%s" (ob:blog-publish-dir BLOG) (or filepath ".") f))) (mkdir (file-name-directory target) t) (copy-file f target t t t))) (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 category)))
(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") (ob:blog-default-category BLOG))) (page (org-entry-get (point) "PAGE")) (filename (ob:sanitize-string title)) (filepath (format "%s/%.4d/%.2d" category year month)) (htmlfile (format "%s/%.2d_%s.html" filepath day filename)) (content (ob-get-entry-text)) (linked-files (ob-get-linked-files content))) (when page (setq htmlfile page filename (file-name-sans-extension (file-name-nondirectory htmlfile)) filepath (file-name-directory htmlfile))) (loop for f in linked-files do (let ((target (format "%s/%s/%s" ... ... f))) (mkdir (file-name-directory target) t) (copy-file f target t t t))) (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 category))))
(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))))) (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") (ob:blog-default-category BLOG))) (page (org-entry-get (point) "PAGE")) (filename (ob:sanitize-string title)) (filepath (format "%s/%.4d/%.2d" category year month)) (htmlfile (format "%s/%.2d_%s.html" filepath day filename)) (content (ob-get-entry-text)) (linked-files (ob-get-linked-files content))) (when page (setq htmlfile page filename (file-name-sans-extension (file-name-nondirectory htmlfile)) filepath (file-name-directory htmlfile))) (loop for f in linked-files do (let ((target (format "%s/%s/%s" (ob:blog-publish-dir BLOG) (or filepath ".") f))) (mkdir (file-name-directory target) t) (copy-file f target t t t))) (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 category)))
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 (quote ob-sort-posts-by-date)) 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 (quote ob-sort-posts-by-date)) 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 (quote ob-sort-posts-by-date)) 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 (quote ob-sort-posts-by-date)) 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 (quote ob-sort-posts-by-date)) 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 (quote ob-sort-posts-by-date)) with id = 0 do (setf (ob:post-id post) id) and do (incf id 1) and collect post)))
ob-parse-entries((#<marker at 17593 in sample.org> #<marker at 18752 in sample.org> #<marker at 19251 in sample.org> #<marker at 25625 in sample.org> #<marker at 26385 in sample.org> #<marker at 29032 in sample.org> #<marker at 29704 in sample.org> #<marker at 33200 in sample.org>))
(let* ((start-time (current-time)) (default-directory (file-name-directory file)) (BLOG (ob-parse-blog-headers)) (POSTS (ob-parse-entries (org-map-entries (quote point-marker) (ob:blog-posts-filter BLOG) (quote file-with-archives)))) (ALL-POSTS POSTS) (STATIC (ob-parse-entries (org-map-entries (quote point-marker) (ob:blog-static-filter BLOG) (quote file-with-archives)))) (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) (copy-directory (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* ((start-time (current-time)) (default-directory (file-name-directory file)) (BLOG (ob-parse-blog-headers)) (POSTS (ob-parse-entries (org-map-entries (quote point-marker) (ob:blog-posts-filter BLOG) (quote file-with-archives)))) (ALL-POSTS POSTS) (STATIC (ob-parse-entries (org-map-entries (quote point-marker) (ob:blog-static-filter BLOG) (quote file-with-archives)))) (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) (copy-directory (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* ((start-time (current-time)) (default-directory (file-name-directory file)) (BLOG (ob-parse-blog-headers)) (POSTS (ob-parse-entries (org-map-entries (quote point-marker) (ob:blog-posts-filter BLOG) (quote file-with-archives)))) (ALL-POSTS POSTS) (STATIC (ob-parse-entries (org-map-entries (quote point-marker) (ob:blog-static-filter BLOG) (quote file-with-archives)))) (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) (copy-directory (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("~/.emacs.d/o-blog/example/sample.org")
(if async (org-publish-blog-async file) (org-publish-blog-sync file))
org-publish-blog("~/.emacs.d/o-blog/example/sample.org" nil)
(let (print-length print-level (debug-on-error t)) (org-publish-blog "~/.emacs.d/o-blog/example/sample.org" nil))
eval((let (print-length print-level (debug-on-error t)) (org-publish-blog "~/.emacs.d/o-blog/example/sample.org" nil)) nil)
eval-expression((let (print-length print-level (debug-on-error t)) (org-publish-blog "~/.emacs.d/o-blog/example/sample.org" nil)) nil)
call-interactively(eval-expression t nil)
execute-extended-command(nil)
call-interactively(execute-extended-command nil nil)
Debugger entered--Lisp error: (wrong-type-argument symbolp (fixed-pitch adoc-generic))
internal-get-lisp-face-attribute((fixed-pitch adoc-generic) :height nil)
face-attribute((fixed-pitch adoc-generic) :height)
htmlize-face-size(adoc-monospace)
htmlize-face-to-fstruct(adoc-monospace)
htmlize-make-face-map((default adoc-monospace adoc-title-3 adoc-title-2 adoc-orig-default adoc-list-item adoc-title-1 adoc-reference adoc-delimiter adoc-title-0 adoc-hide-delimiter))
htmlize-buffer-1()
htmlize-region(1 1192)
htmlize-region-for-paste(1 1192)
(progn (insert-file-contents src-file) (if mode (let ((func (intern (format "%s-mode" mode)))) (if (functionp func) (funcall func) (warn (concat "Mode %s not found for %s. " "Consider installing it. " "No syntax highlight would be bone this time.") mode src-file))) (set-auto-mode)) (font-lock-fontify-buffer) (htmlize-region-for-paste (point-min) (point-max)))
(unwind-protect (progn (insert-file-contents src-file) (if mode (let ((func (intern (format "%s-mode" mode)))) (if (functionp func) (funcall func) (warn (concat "Mode %s not found for %s. " "Consider installing it. " "No syntax highlight would be bone this time.") mode src-file))) (set-auto-mode)) (font-lock-fontify-buffer) (htmlize-region-for-paste (point-min) (point-max))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))
(save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (insert-file-contents src-file) (if mode (let ((func (intern ...))) (if (functionp func) (funcall func) (warn (concat "Mode %s not found for %s. " "Consider installing it. " "No syntax highlight would be bone this time.") mode src-file))) (set-auto-mode)) (font-lock-fontify-buffer) (htmlize-region-for-paste (point-min) (point-max))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))
(with-current-buffer temp-buffer (unwind-protect (progn (insert-file-contents src-file) (if mode (let ((func (intern ...))) (if (functionp func) (funcall func) (warn (concat "Mode %s not found for %s. " "Consider installing it. " "No syntax highlight would be bone this time.") mode src-file))) (set-auto-mode)) (font-lock-fontify-buffer) (htmlize-region-for-paste (point-min) (point-max))) (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-file-contents src-file) (if mode (let ((func ...)) (if (functionp func) (funcall func) (warn ... mode src-file))) (set-auto-mode)) (font-lock-fontify-buffer) (htmlize-region-for-paste (point-min) (point-max))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))))
(with-temp-buffer (insert-file-contents src-file) (if mode (let ((func (intern (format "%s-mode" mode)))) (if (functionp func) (funcall func) (warn (concat "Mode %s not found for %s. " "Consider installing it. " "No syntax highlight would be bone this time.") mode src-file))) (set-auto-mode)) (font-lock-fontify-buffer) (htmlize-region-for-paste (point-min) (point-max)))
(insert "#+BEGIN_HTML\n" (format o-blog-source-header src-file-safe src-file-name src-file-safe src-file-name) (with-temp-buffer (insert-file-contents src-file) (if mode (let ((func (intern (format "%s-mode" mode)))) (if (functionp func) (funcall func) (warn (concat "Mode %s not found for %s. " "Consider installing it. " "No syntax highlight would be bone this time.") mode src-file))) (set-auto-mode)) (font-lock-fontify-buffer) (htmlize-region-for-paste (point-min) (point-max))) o-blog-source-footer "\n#+END_HTML\n")
(let* ((src-file (match-string 1)) (src-file-name (file-name-nondirectory src-file)) (src-file-safe (ob:sanitize-string src-file-name)) (mode (match-string 3))) (beginning-of-line) (delete-region (point) (point-at-eol)) (insert "#+BEGIN_HTML\n" (format o-blog-source-header src-file-safe src-file-name src-file-safe src-file-name) (with-temp-buffer (insert-file-contents src-file) (if mode (let ((func (intern ...))) (if (functionp func) (funcall func) (warn (concat "Mode %s not found for %s. " "Consider installing it. " "No syntax highlight would be bone this time.") mode src-file))) (set-auto-mode)) (font-lock-fontify-buffer) (htmlize-region-for-paste (point-min) (point-max))) o-blog-source-footer "\n#+END_HTML\n"))
(while (re-search-forward "^#\\+O_BLOG_SOURCE:?[ ]+\\(.+?\\)\\([ ]+\\(.+\\)\\)?$" nil t) (let* ((src-file (match-string 1)) (src-file-name (file-name-nondirectory src-file)) (src-file-safe (ob:sanitize-string src-file-name)) (mode (match-string 3))) (beginning-of-line) (delete-region (point) (point-at-eol)) (insert "#+BEGIN_HTML\n" (format o-blog-source-header src-file-safe src-file-name src-file-safe src-file-name) (with-temp-buffer (insert-file-contents src-file) (if mode (let ((func ...)) (if (functionp func) (funcall func) (warn ... mode src-file))) (set-auto-mode)) (font-lock-fontify-buffer) (htmlize-region-for-paste (point-min) (point-max))) o-blog-source-footer "\n#+END_HTML\n")))
(let ((case-fold-search t)) (while (re-search-forward "^#\\+O_BLOG_SOURCE:?[ ]+\\(.+?\\)\\([ ]+\\(.+\\)\\)?$" nil t) (let* ((src-file (match-string 1)) (src-file-name (file-name-nondirectory src-file)) (src-file-safe (ob:sanitize-string src-file-name)) (mode (match-string 3))) (beginning-of-line) (delete-region (point) (point-at-eol)) (insert "#+BEGIN_HTML\n" (format o-blog-source-header src-file-safe src-file-name src-file-safe src-file-name) (with-temp-buffer (insert-file-contents src-file) (if mode (let (...) (if ... ... ...)) (set-auto-mode)) (font-lock-fontify-buffer) (htmlize-region-for-paste (point-min) (point-max))) o-blog-source-footer "\n#+END_HTML\n"))))
(save-excursion (goto-char (point-min)) (let ((case-fold-search t)) (while (re-search-forward "^#\\+O_BLOG_SOURCE:?[ ]+\\(.+?\\)\\([ ]+\\(.+\\)\\)?$" nil t) (let* ((src-file (match-string 1)) (src-file-name (file-name-nondirectory src-file)) (src-file-safe (ob:sanitize-string src-file-name)) (mode (match-string 3))) (beginning-of-line) (delete-region (point) (point-at-eol)) (insert "#+BEGIN_HTML\n" (format o-blog-source-header src-file-safe src-file-name src-file-safe src-file-name) (with-temp-buffer (insert-file-contents src-file) (if mode (let ... ...) (set-auto-mode)) (font-lock-fontify-buffer) (htmlize-region-for-paste (point-min) (point-max))) o-blog-source-footer "\n#+END_HTML\n")))))
(progn (save-excursion (goto-char (point-min)) (let ((case-fold-search t)) (while (re-search-forward "^#\\+O_BLOG_SOURCE:?[ ]+\\(.+?\\)\\([ ]+\\(.+\\)\\)?$" nil t) (let* ((src-file (match-string 1)) (src-file-name (file-name-nondirectory src-file)) (src-file-safe (ob:sanitize-string src-file-name)) (mode (match-string 3))) (beginning-of-line) (delete-region (point) (point-at-eol)) (insert "#+BEGIN_HTML\n" (format o-blog-source-header src-file-safe src-file-name src-file-safe src-file-name) (with-temp-buffer (insert-file-contents src-file) (if mode ... ...) (font-lock-fontify-buffer) (htmlize-region-for-paste ... ...)) o-blog-source-footer "\n#+END_HTML\n"))))))
(unwind-protect (progn (save-excursion (goto-char (point-min)) (let ((case-fold-search t)) (while (re-search-forward "^#\\+O_BLOG_SOURCE:?[ ]+\\(.+?\\)\\([ ]+\\(.+\\)\\)?$" nil t) (let* ((src-file ...) (src-file-name ...) (src-file-safe ...) (mode ...)) (beginning-of-line) (delete-region (point) (point-at-eol)) (insert "#+BEGIN_HTML\n" (format o-blog-source-header src-file-safe src-file-name src-file-safe src-file-name) (with-temp-buffer ... ... ... ...) o-blog-source-footer "\n#+END_HTML\n")))))) (set-match-data save-match-data-internal (quote evaporate)))
(let ((save-match-data-internal (match-data))) (unwind-protect (progn (save-excursion (goto-char (point-min)) (let ((case-fold-search t)) (while (re-search-forward "^#\\+O_BLOG_SOURCE:?[ ]+\\(.+?\\)\\([ ]+\\(.+\\)\\)?$" nil t) (let* (... ... ... ...) (beginning-of-line) (delete-region ... ...) (insert "#+BEGIN_HTML\n" ... ... o-blog-source-footer "\n#+END_HTML\n")))))) (set-match-data save-match-data-internal (quote evaporate))))
(save-match-data (save-excursion (goto-char (point-min)) (let ((case-fold-search t)) (while (re-search-forward "^#\\+O_BLOG_SOURCE:?[ ]+\\(.+?\\)\\([ ]+\\(.+\\)\\)?$" nil t) (let* ((src-file (match-string 1)) (src-file-name (file-name-nondirectory src-file)) (src-file-safe (ob:sanitize-string src-file-name)) (mode (match-string 3))) (beginning-of-line) (delete-region (point) (point-at-eol)) (insert "#+BEGIN_HTML\n" (format o-blog-source-header src-file-safe src-file-name src-file-safe src-file-name) (with-temp-buffer (insert-file-contents src-file) (if mode ... ...) (font-lock-fontify-buffer) (htmlize-region-for-paste ... ...)) o-blog-source-footer "\n#+END_HTML\n"))))))
o-blog-publish-source()
run-hooks(o-blog-html-plugins-hook)
(progn (insert text) (goto-char (point-min)) (org-mode) (while (<= 2 (save-match-data (funcall outline-level))) (org-promote-subtree)) (run-hooks (quote o-blog-html-plugins-hook)) (goto-char (point-min)) (when (search-forward-regexp "^\\s-*$" nil t) (goto-char (match-end 0))) (save-excursion (insert "#+OPTIONS: H:7 num:nil toc:8 d:nil todo:nil <:nil pri:nil tags:nil\n\n")) (buffer-substring-no-properties (point) (point-max)))
(unwind-protect (progn (insert text) (goto-char (point-min)) (org-mode) (while (<= 2 (save-match-data (funcall outline-level))) (org-promote-subtree)) (run-hooks (quote o-blog-html-plugins-hook)) (goto-char (point-min)) (when (search-forward-regexp "^\\s-*$" nil t) (goto-char (match-end 0))) (save-excursion (insert "#+OPTIONS: H:7 num:nil toc:8 d:nil todo:nil <:nil pri:nil tags:nil\n\n")) (buffer-substring-no-properties (point) (point-max))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))
(save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (insert text) (goto-char (point-min)) (org-mode) (while (<= 2 (save-match-data (funcall outline-level))) (org-promote-subtree)) (run-hooks (quote o-blog-html-plugins-hook)) (goto-char (point-min)) (when (search-forward-regexp "^\\s-*$" nil t) (goto-char (match-end 0))) (save-excursion (insert "#+OPTIONS: H:7 num:nil toc:8 d:nil todo:nil <:nil pri:nil tags:nil\n\n")) (buffer-substring-no-properties (point) (point-max))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))
(with-current-buffer temp-buffer (unwind-protect (progn (insert text) (goto-char (point-min)) (org-mode) (while (<= 2 (save-match-data (funcall outline-level))) (org-promote-subtree)) (run-hooks (quote o-blog-html-plugins-hook)) (goto-char (point-min)) (when (search-forward-regexp "^\\s-*$" nil t) (goto-char (match-end 0))) (save-excursion (insert "#+OPTIONS: H:7 num:nil toc:8 d:nil todo:nil <:nil pri:nil tags:nil\n\n")) (buffer-substring-no-properties (point) (point-max))) (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 text) (goto-char (point-min)) (org-mode) (while (<= 2 (save-match-data (funcall outline-level))) (org-promote-subtree)) (run-hooks (quote o-blog-html-plugins-hook)) (goto-char (point-min)) (when (search-forward-regexp "^\\s-*$" nil t) (goto-char (match-end 0))) (save-excursion (insert "#+OPTIONS: H:7 num:nil toc:8 d:nil todo:nil <:nil pri:nil tags:nil\n\n")) (buffer-substring-no-properties (point) (point-max))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))))
(with-temp-buffer (insert text) (goto-char (point-min)) (org-mode) (while (<= 2 (save-match-data (funcall outline-level))) (org-promote-subtree)) (run-hooks (quote o-blog-html-plugins-hook)) (goto-char (point-min)) (when (search-forward-regexp "^\\s-*$" nil t) (goto-char (match-end 0))) (save-excursion (insert "#+OPTIONS: H:7 num:nil toc:8 d:nil todo:nil <:nil pri:nil tags:nil\n\n")) (buffer-substring-no-properties (point) (point-max)))
(let ((text (buffer-string))) (with-temp-buffer (insert text) (goto-char (point-min)) (org-mode) (while (<= 2 (save-match-data (funcall outline-level))) (org-promote-subtree)) (run-hooks (quote o-blog-html-plugins-hook)) (goto-char (point-min)) (when (search-forward-regexp "^\\s-*$" nil t) (goto-char (match-end 0))) (save-excursion (insert "#+OPTIONS: H:7 num:nil toc:8 d:nil todo:nil <:nil pri:nil tags:nil\n\n")) (buffer-substring-no-properties (point) (point-max))))
(progn (org-narrow-to-subtree) (let ((text (buffer-string))) (with-temp-buffer (insert text) (goto-char (point-min)) (org-mode) (while (<= 2 (save-match-data (funcall outline-level))) (org-promote-subtree)) (run-hooks (quote o-blog-html-plugins-hook)) (goto-char (point-min)) (when (search-forward-regexp "^\\s-*$" nil t) (goto-char (match-end 0))) (save-excursion (insert "#+OPTIONS: H:7 num:nil toc:8 d:nil todo:nil <:nil pri:nil tags:nil\n\n")) (buffer-substring-no-properties (point) (point-max)))))
(unwind-protect (progn (org-narrow-to-subtree) (let ((text (buffer-string))) (with-temp-buffer (insert text) (goto-char (point-min)) (org-mode) (while (<= 2 (save-match-data (funcall outline-level))) (org-promote-subtree)) (run-hooks (quote o-blog-html-plugins-hook)) (goto-char (point-min)) (when (search-forward-regexp "^\\s-*$" nil t) (goto-char (match-end 0))) (save-excursion (insert "#+OPTIONS: H:7 num:nil toc:8 d:nil todo:nil <:nil pri:nil tags:nil\n\n")) (buffer-substring-no-properties (point) (point-max))))) (set-match-data save-match-data-internal (quote evaporate)))
(let ((save-match-data-internal (match-data))) (unwind-protect (progn (org-narrow-to-subtree) (let ((text (buffer-string))) (with-temp-buffer (insert text) (goto-char (point-min)) (org-mode) (while (<= 2 (save-match-data ...)) (org-promote-subtree)) (run-hooks (quote o-blog-html-plugins-hook)) (goto-char (point-min)) (when (search-forward-regexp "^\\s-*$" nil t) (goto-char (match-end 0))) (save-excursion (insert "#+OPTIONS: H:7 num:nil toc:8 d:nil todo:nil <:nil pri:nil tags:nil\n\n")) (buffer-substring-no-properties (point) (point-max))))) (set-match-data save-match-data-internal (quote evaporate))))
(save-match-data (org-narrow-to-subtree) (let ((text (buffer-string))) (with-temp-buffer (insert text) (goto-char (point-min)) (org-mode) (while (<= 2 (save-match-data (funcall outline-level))) (org-promote-subtree)) (run-hooks (quote o-blog-html-plugins-hook)) (goto-char (point-min)) (when (search-forward-regexp "^\\s-*$" nil t) (goto-char (match-end 0))) (save-excursion (insert "#+OPTIONS: H:7 num:nil toc:8 d:nil todo:nil <:nil pri:nil tags:nil\n\n")) (buffer-substring-no-properties (point) (point-max)))))
(save-restriction (save-match-data (org-narrow-to-subtree) (let ((text (buffer-string))) (with-temp-buffer (insert text) (goto-char (point-min)) (org-mode) (while (<= 2 (save-match-data (funcall outline-level))) (org-promote-subtree)) (run-hooks (quote o-blog-html-plugins-hook)) (goto-char (point-min)) (when (search-forward-regexp "^\\s-*$" nil t) (goto-char (match-end 0))) (save-excursion (insert "#+OPTIONS: H:7 num:nil toc:8 d:nil todo:nil <:nil pri:nil tags:nil\n\n")) (buffer-substring-no-properties (point) (point-max))))))
(save-excursion (save-restriction (save-match-data (org-narrow-to-subtree) (let ((text (buffer-string))) (with-temp-buffer (insert text) (goto-char (point-min)) (org-mode) (while (<= 2 (save-match-data ...)) (org-promote-subtree)) (run-hooks (quote o-blog-html-plugins-hook)) (goto-char (point-min)) (when (search-forward-regexp "^\\s-*$" nil t) (goto-char (match-end 0))) (save-excursion (insert "#+OPTIONS: H:7 num:nil toc:8 d:nil todo:nil <:nil pri:nil tags:nil\n\n")) (buffer-substring-no-properties (point) (point-max)))))))
ob-get-entry-text()
(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))))) (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") (ob:blog-default-category BLOG))) (page (org-entry-get (point) "PAGE")) (filename (ob:sanitize-string title)) (filepath (format "%s/%.4d/%.2d" category year month)) (htmlfile (format "%s/%.2d_%s.html" filepath day filename)) (content (ob-get-entry-text)) (linked-files (ob-get-linked-files content))) (when page (setq htmlfile page filename (file-name-sans-extension (file-name-nondirectory htmlfile)) filepath (file-name-directory htmlfile))) (loop for f in linked-files do (let ((target (format "%s/%s/%s" (ob:blog-publish-dir BLOG) (or filepath ".") f))) (mkdir (file-name-directory target) t) (copy-file f target t t t))) (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 category))
(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))))) (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") (ob:blog-default-category BLOG))) (page (org-entry-get (point) "PAGE")) (filename (ob:sanitize-string title)) (filepath (format "%s/%.4d/%.2d" category year month)) (htmlfile (format "%s/%.2d_%s.html" filepath day filename)) (content (ob-get-entry-text)) (linked-files (ob-get-linked-files content))) (when page (setq htmlfile page filename (file-name-sans-extension (file-name-nondirectory htmlfile)) filepath (file-name-directory htmlfile))) (loop for f in linked-files do (let ((target (format "%s/%s/%s" (ob:blog-publish-dir BLOG) (or filepath ".") f))) (mkdir (file-name-directory target) t) (copy-file f target t t t))) (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 category)))
(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") (ob:blog-default-category BLOG))) (page (org-entry-get (point) "PAGE")) (filename (ob:sanitize-string title)) (filepath (format "%s/%.4d/%.2d" category year month)) (htmlfile (format "%s/%.2d_%s.html" filepath day filename)) (content (ob-get-entry-text)) (linked-files (ob-get-linked-files content))) (when page (setq htmlfile page filename (file-name-sans-extension (file-name-nondirectory htmlfile)) filepath (file-name-directory htmlfile))) (loop for f in linked-files do (let ((target (format "%s/%s/%s" ... ... f))) (mkdir (file-name-directory target) t) (copy-file f target t t t))) (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 category))))
(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))))) (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") (ob:blog-default-category BLOG))) (page (org-entry-get (point) "PAGE")) (filename (ob:sanitize-string title)) (filepath (format "%s/%.4d/%.2d" category year month)) (htmlfile (format "%s/%.2d_%s.html" filepath day filename)) (content (ob-get-entry-text)) (linked-files (ob-get-linked-files content))) (when page (setq htmlfile page filename (file-name-sans-extension (file-name-nondirectory htmlfile)) filepath (file-name-directory htmlfile))) (loop for f in linked-files do (let ((target (format "%s/%s/%s" (ob:blog-publish-dir BLOG) (or filepath ".") f))) (mkdir (file-name-directory target) t) (copy-file f target t t t))) (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 category)))
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 (quote ob-sort-posts-by-date)) 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 (quote ob-sort-posts-by-date)) 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 (quote ob-sort-posts-by-date)) 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 (quote ob-sort-posts-by-date)) 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 (quote ob-sort-posts-by-date)) 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 (quote ob-sort-posts-by-date)) with id = 0 do (setf (ob:post-id post) id) and do (incf id 1) and collect post)))
ob-parse-entries((#<marker at 17593 in sample.org> #<marker at 18752 in sample.org> #<marker at 19251 in sample.org> #<marker at 25625 in sample.org> #<marker at 26385 in sample.org> #<marker at 29032 in sample.org> #<marker at 29704 in sample.org> #<marker at 33200 in sample.org>))
(let* ((start-time (current-time)) (default-directory (file-name-directory file)) (BLOG (ob-parse-blog-headers)) (POSTS (ob-parse-entries (org-map-entries (quote point-marker) (ob:blog-posts-filter BLOG) (quote file-with-archives)))) (ALL-POSTS POSTS) (STATIC (ob-parse-entries (org-map-entries (quote point-marker) (ob:blog-static-filter BLOG) (quote file-with-archives)))) (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) (copy-directory (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* ((start-time (current-time)) (default-directory (file-name-directory file)) (BLOG (ob-parse-blog-headers)) (POSTS (ob-parse-entries (org-map-entries (quote point-marker) (ob:blog-posts-filter BLOG) (quote file-with-archives)))) (ALL-POSTS POSTS) (STATIC (ob-parse-entries (org-map-entries (quote point-marker) (ob:blog-static-filter BLOG) (quote file-with-archives)))) (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) (copy-directory (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* ((start-time (current-time)) (default-directory (file-name-directory file)) (BLOG (ob-parse-blog-headers)) (POSTS (ob-parse-entries (org-map-entries (quote point-marker) (ob:blog-posts-filter BLOG) (quote file-with-archives)))) (ALL-POSTS POSTS) (STATIC (ob-parse-entries (org-map-entries (quote point-marker) (ob:blog-static-filter BLOG) (quote file-with-archives)))) (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) (copy-directory (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("~/.emacs.d/o-blog/example/sample.org")
(if async (org-publish-blog-async file) (org-publish-blog-sync file))
org-publish-blog("~/.emacs.d/o-blog/example/sample.org" nil)
(let (print-length print-level (debug-on-error t)) (org-publish-blog "~/.emacs.d/o-blog/example/sample.org" nil))
eval((let (print-length print-level (debug-on-error t)) (org-publish-blog "~/.emacs.d/o-blog/example/sample.org" nil)) nil)
eval-expression((let (print-length print-level (debug-on-error t)) (org-publish-blog "~/.emacs.d/o-blog/example/sample.org" nil)) nil)
call-interactively(eval-expression t nil)
execute-extended-command(nil)
call-interactively(execute-extended-command nil nil)
Please try removing adoc-mode.
I removed adoc-mode as requested.
Now, this gets interesting because if I run emacs -q -batch -L "~/.emacs.d/o-blog" -L "~/.emacs.d/el-get/htmlize" --eval "(progn (require 'o-blog) (org-publish-blog \"~/.emacs.d/o-blog/example/sample.org\"))"
from command line, I get a nice sample blog with a final message
Blog ~/.emacs.d/o-blog/example/sample.org published in 9.356s
There is a notification about missing adoc-mode, but the program continues nicely after that. See this gist for complete output.
However, if I open sample.org
with emacs and do M-x org-publish-blog
, I end up with no blog and following thing in *Messages*
buffer:
OVERVIEW
Loading vc-git...done
OVERVIEW
Mark set
Exporting...
org-babel-exp processing...
Exporting...
HTML export done, pushed to kill ring and clipboard
OVERVIEW
Mark set
Exporting... [2 times]
HTML export done, pushed to kill ring and clipboard
OVERVIEW
Mark set
Exporting...
org-babel-exp processing... [2 times]
Exporting...
HTML export done, pushed to kill ring and clipboard
OVERVIEW
Mark set
Exporting...
org-babel-exp processing...
Exporting...
HTML export done, pushed to kill ring and clipboard
OVERVIEW
Mark set
Exporting...
org-babel-exp processing...
Exporting...
HTML export done, pushed to kill ring and clipboard
OVERVIEW
funcall: Cannot open load file: adoc-mode/adoc-mode
I can't really figure out where does that difference come from. I have attached the .emacs
file that I am now using, see this another gist.
I tried also opening sample.org
with Emacs 23.3.1 and commanding org-publish-blog
, but that ended with error Wrong type argument: stringp, nil
I got the same error:
face-attribute: Wrong type argument: symbolp, (fixed-pitch adoc-generic)
OK, I'll remove adoc-mode.
I run following commands to test:
mkdir -p ~/dev/.emacs.d
cd ~/dev/.emacs.d
git clone git://github.com/renard/o-blog.git
git clone git://orgmode.org/org-mode.git
mkdir adoc-mode
cd adoc-mode
wget http://sensorflo-emacs.googlecode.com/svn/trunk/adoc-mode/adoc-mode.el
The content of ~/dev/.emacs.d/init.el is:
(add-to-list 'load-path "~/.emacs.d/org-mode/lisp")
(add-to-list 'load-path "~/.emacs.d/org-mode/contrib/lisp")
(add-to-list 'load-path "~/.emacs.d/adoc-mode")
(add-to-list 'load-path "~/.emacs.d/o-blog")
(require 'adoc-mode)
(require 'o-blog)
Then I run:
cd ~/dev
rm -rf .emacs.d/o-blog/example/out
HOME=$(pwd) emacs --debug-init
In emacs I hit following:
C-c C-f ~/.emacs.d/o-blog/example/sample.org RET
M-x org-publish-blog RET
Then
cd ~/dev/.emacs.d/o-blog/example/out
python -m SimpleHTTPServer 8001
And I open htttp://localhost:8001
I got everything running fine
The versions I use:
Do you still have any issue running o-blog using that same configuration?
I first get adoc-mode here: http://sensorflo-emacs.googlecode.com/svn/tags/adoc-mode/latest/adoc-mode.el -- 9b0028457f55d2014fad9665667e168c Then here: 79a0c00295b149dc8a79ed079ef389e9
$ emacs --batch -Q -f batch-byte-compile adoc-mode.el
In toplevel form:
adoc-mode.el:1086: 8:Error: Symbol's function definition is void: adoc-re-one-line-title
But I can compile the file after eval-buffer
. Then got the same error while org-publish-blog
.
I converted the README.asciidoc
to README.md
, the markdown-mode
works fine with o-blog. So, I guess, it might be the problem in adoc-mode
.
Yep In the last version I do include a emacs-lisp file instead of asciidoc one. Thus I close this bug.
I'm getting the following error when trying to publish the example blog:
Symbol's function definition is void: adoc-mode
. Here is the full log from*Messages*
buffer:Here is what I did:
~/.emacs.d/o-blog/example/sample.org
and typedM-x org-publish-blog
I understand that there is some problem with
htmlize.el
, but shouldn't it be readily available with org-mode and usable as-is?I have the following versions of Emacs and org-mode: