renard/o-blog — Issue #1: Getting (wrong-type-argument characterp nil)
Author: paulprovost
Created: 2012-01-25 15:40:08+00:00
State: open

Hi!
Trying out o-blog for the first time. I followed the manual installation, and got an error ((wrong-type-argument characterp nil)) when publishing the sample. I trimmed down my init file to

```
(add-to-list 'load-path "~/local/site-lisp/")
(add-to-list 'load-path "~/local/site-lisp/org/lisp/")
(add-to-list 'load-path "~/local/site-lisp/org/contrib/lisp/")
(add-to-list 'load-path "~/local/site-lisp/remember/")
(add-to-list 'load-path "~/.emacs.d/o-blog")

(require 'o-blog)

(require 'org-install)
(require 'org-protocol)
```
Started emacs with -q -l . Opened sample.org and ran M-x org-publish-blog. Here's the trace.

```
Debugger entered--Lisp error: (wrong-type-argument characterp nil)
char-to-string(nil)
(downcase (char-to-string (car ...)))
(list (downcase (char-to-string ...)))
(nconc ret (list (downcase ...)))
(setq ret (nconc ret (list ...)))
(progn (setq ret (nconc ret ...)))
(if (or (member gc ...) (= 45 c)) (progn (setq ret ...)) (if (member gc ...) (progn ...)))
(while (< (setq --cl-idx-- ...) (length --cl-vec--)) (setq c (aref --cl-vec-- --cl-idx--)) (setf gc (get-char-code-property c ...)) (if (or ... ...) (progn ...) (if ... ...)))
(let* ((--cl-vec-- s) (--cl-idx-- -1) (c nil) (gc nil) (ret nil) (ret nil)) (while (< ... ...) (setq c ...) (setf gc ...) (if ... ... ...)) (replace-regexp-in-string "--+" "-" (replace-regexp-in-string "^-+\\|-+$" "" ...)))
(catch (quote --cl-block-nil--) (let* (... ... ... ... ... ...) (while ... ... ... ...) (replace-regexp-in-string "--+" "-" ...)))
(cl-block-wrapper (catch (quote --cl-block-nil--) (let* ... ... ...)))
(block nil (let* (... ... ... ... ... ...) (while ... ... ... ...) (replace-regexp-in-string "--+" "-" ...)))
(loop for c across s with gc with ret do (setf gc (get-char-code-property c ...)) if (or (member gc ...) (= 45 c)) collect (downcase (char-to-string ...)) into ret else if (member gc (quote ...)) collect "-" into ret finally return (replace-regexp-in-string "--+" "-" (replace-regexp-in-string "^-+\\|-+$" "" ...)))
ob:sanitize-string("usage")
(make-ob:tags :name td :safe (ob:sanitize-string td))
(cons (make-ob:tags :name td :safe (ob:sanitize-string td)) --cl-var--)
(setq --cl-var-- (cons (make-ob:tags :name td :safe ...) --cl-var--))
(push (make-ob:tags :name td :safe (ob:sanitize-string td)) --cl-var--)
(while (consp --cl-var--) (setq tn (car --cl-var--)) (setf td (replace-regexp-in-string "_" " " ...)) (push (make-ob:tags :name td :safe ...) --cl-var--) (setq --cl-var-- (cdr --cl-var--)))
(let* ((--cl-var-- ...) (tn nil) (td nil) (--cl-var-- nil)) (while (consp --cl-var--) (setq tn ...) (setf td ...) (push ... --cl-var--) (setq --cl-var-- ...)) (nreverse --cl-var--))
(catch (quote --cl-block-nil--) (let* (... ... ... ...) (while ... ... ... ... ...) (nreverse --cl-var--)))
(cl-block-wrapper (catch (quote --cl-block-nil--) (let* ... ... ...)))
(block nil (let* (... ... ... ...) (while ... ... ... ... ...) (nreverse --cl-var--)))
(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)))
(let* ((title ...) (tags ...) (timestamp ...) (year ...) (month ...) (day ...) (category ...) (page ...) (filename ...) (filepath ...) (htmlfile ...) (content ...) (linked-files ...)) (when page (setq htmlfile page filename ... filepath ...)) (loop for f in linked-files do (let ... ... ...)) (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 ... ...) :content content :content-html (ob-export-string-to-html content) :category category))
(progn (let* (... ... ... ... ... ... ... ... ... ... ... ... ...) (when page ...) (loop for f in linked-files do ...) (make-ob:post :title title :tags tags :timestamp timestamp :year year :month month :day day :filename filename :filepath filepath :path-to-root ... :htmlfile htmlfile :template ... :content content :content-html ... :category category)))
(if (search-forward-regexp org-complex-heading-regexp (point-at-eol) t) (progn (let* ... ... ... ...)))
(when (search-forward-regexp org-complex-heading-regexp (point-at-eol) t) (let* (... ... ... ... ... ... ... ... ... ... ... ... ...) (when page ...) (loop for f in linked-files do ...) (make-ob:post :title title :tags tags :timestamp timestamp :year year :month month :day day :filename filename :filepath filepath :path-to-root ... :htmlfile htmlfile :template ... :content content :content-html ... :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 ...) (ob-parse-entry)))
(nconc posts (list (with-current-buffer ... ... ...)))
(setq posts (nconc posts (list ...)))
(while (consp --cl-var--) (setq marker (car --cl-var--)) (setq posts (nconc posts ...)) (setq --cl-var-- (cdr --cl-var--)))
(let* ((--cl-var-- markers) (marker nil) (posts nil) (posts nil)) (while (consp --cl-var--) (setq marker ...) (setq posts ...) (setq --cl-var-- ...)) (loop for post in (sort posts ...) with id = 0 do (setf ... id) and do (incf id 1) and collect post))
(catch (quote --cl-block-nil--) (let* (... ... ... ...) (while ... ... ... ...) (loop for post in ... with id = 0 do ... and do ... and collect post)))
(cl-block-wrapper (catch (quote --cl-block-nil--) (let* ... ... ...)))
(block nil (let* (... ... ... ...) (while ... ... ... ...) (loop for post in ... with id = 0 do ... and do ... and collect post)))
(loop for marker in markers with posts = nil collect (with-current-buffer (marker-buffer marker) (goto-char ...) (ob-parse-entry)) into posts finally return (loop for post in (sort posts ...) with id = 0 do (setf ... id) and do (incf id 1) and collect post))
(save-excursion (loop for marker in markers with posts = nil collect (with-current-buffer ... ... ...) into posts finally return (loop for post in ... with id = 0 do ... and do ... and collect post)))
ob-parse-entries((# # # # #))
(let* ((start-time ...) (default-directory ...) (BLOG ...) (POSTS ...) (ALL-POSTS POSTS) (STATIC ...) (SNIPPETS ...) (TAGS ...)) (ob-write-static) (ob-write-posts) (ob-write-tags) (ob-write-index) (copy-directory (format "%s/%s" ... ...) (ob:blog-publish-dir BLOG)) (run-hooks (quote o-blog-after-publish-hook)) (message (format "Blog %s published in %ss" file ...)))
(save-current-buffer (set-buffer (or ... ...)) (run-hooks (quote o-blog-before-publish-hook)) (let* (... ... ... ... ... ... ... ...) (ob-write-static) (ob-write-posts) (ob-write-tags) (ob-write-index) (copy-directory ... ...) (run-hooks ...) (message ...)))
(with-current-buffer (or (get-file-buffer file) (find-file file)) (run-hooks (quote o-blog-before-publish-hook)) (let* (... ... ... ... ... ... ... ...) (ob-write-static) (ob-write-posts) (ob-write-tags) (ob-write-index) (copy-directory ... ...) (run-hooks ...) (message ...)))
org-publish-blog-sync("/home/paul/.emacs.d/o-blog/example/sample.org")
(if async (org-publish-blog-async file) (org-publish-blog-sync file))
org-publish-blog("/home/paul/.emacs.d/o-blog/example/sample.org" nil)
eval((org-publish-blog "/home/paul/.emacs.d/o-blog/example/sample.org" nil))
repeat-complex-command(1)
call-interactively(repeat-complex-command nil nil)
```

Please help!