emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Sébastien Vauban" <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org>
To: emacs-orgmode-mXXj517/zsQ@public.gmane.org
Subject: wrong-type-argument when publishing to HTML
Date: Wed, 02 Sep 2009 13:44:06 +0200	[thread overview]
Message-ID: <87ab1dk1vd.fsf@mundaneum.com> (raw)

Hello,

A colleague of mine gets the error `(wrong-type-argument stringp nil)' when
executing the command (from a script, under Ubuntu and Emacs 22.2.1 with
Org-mode 6.29c):

--8<---------------cut here---------------start------------->8---
emacs --batch \
	--load ./Org2HTML.el \
	--visit=agile-software-development.org \
	--funcall org-publish-current-file
--8<---------------cut here---------------end--------------->8---

The detailed result is:

--8<---------------cut here---------------start------------->8---
Loading 00debian-vars...
No /etc/mailname. Reverting to default...
Loading /etc/emacs22/site-start.d/50auctex.el (source)...
Loading /usr/share/emacs/22.2/site-lisp/auctex.el (source)...
Loading /usr/share/emacs/22.2/site-lisp/preview-latex.el (source)...
Loading /etc/emacs/site-start.d/50autoconf.el (source)...
Loading /etc/emacs/site-start.d/50dictionaries-common.el (source)...
Loading debian-ispell...
Loading /var/cache/dictionaries-common/emacsen-ispell-default.el (source)...
Loading /var/cache/dictionaries-common/emacsen-ispell-dicts.el (source)...
Loading /etc/emacs/site-start.d/50erlang-mode.el (source)...
Loading /etc/emacs/site-start.d/50latex-cjk-common.el (source)...
Loading cjk-enc...
Loading /etc/emacs/site-start.d/50latex-cjk-thai.el (source)...
Loading /etc/emacs/site-start.d/50lilypond-data.el (source)...
Loading /etc/emacs/site-start.d/50psvn.el (source)...
Loading vc-svn...
Publishing file /home/llg/devel/Internet/source/agile-software-development.org using `org-publish-org-to-html'
Exporting...
Warning: defvar ignored because description is let-bound
Exporting...
Exporting...
Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  string-match(nil "")
  (while (string-match org-maybe-keyword-time-regexp s) (or b (setq b ...)) (setq r (concat r ... " @<span class=\"timestamp-wrapper\">" ... ... "@</span>") s (substring s ...)))
  (let (r b) (while (string-match org-maybe-keyword-time-regexp s) (or b ...) (setq r ... s ...)) (if (not r) s (setq r ...) (unless ... ...) r))
  (catch (quote exit) (let (r b) (while ... ... ...) (if ... s ... ... r)))
  org-html-handle-time-stamps("")
  (setq line (org-html-handle-time-stamps line))
  (catch (quote nextline) (when (and inquote ...) (insert "</pre>\n") (org-open-par) (setq inquote nil)) (when inquote (insert ... "\n") (throw ... nil)) (when (and org-export-with-fixed-width ...) (when ... ... ... ...) (insert ... "\n") (when ... ... ... ...) (throw ... nil)) (org-export-html-close-lists-maybe line) (when (get-text-property 0 ... line) (let ... ... ... ... ...) (throw ... nil)) (when (equal "ORG-BLOCKQUOTE-START" line) (org-close-par-maybe) (insert "<blockquote>\n") (org-open-par) (throw ... nil)) (when (equal "ORG-BLOCKQUOTE-END" line) (org-close-par-maybe) (insert "\n</blockquote>\n") (org-open-par) (throw ... nil)) (when (equal "ORG-VERSE-START" line) (org-close-par-maybe) (insert "\n<p class=\"verse\">\n") (setq inverse t) (throw ... nil)) (when (equal "ORG-VERSE-END" line) (insert "</p>\n") (org-open-par) (setq inverse nil) (throw ... nil)) (when (equal "ORG-CENTER-START" line) (org-close-par-maybe) (insert "\n<div style=\"text-align: center\">") (org-open-par) (throw ... nil)) (when (equal "ORG-CENTER-END" line) (org-close-par-maybe) (insert "\n</div>") (org-open-par) (throw ... nil)) (run-hooks (quote org-export-html-after-blockquotes-hook)) (when inverse (let ... ... ...)) (while (string-match "<<<?\\([^<>]*\\)>>>?\\((INVISIBLE)\\)?[ 	]*\n?" line) (cond ... ... ...)) (setq line (org-html-handle-time-stamps line)) (or (string-match org-table-hline-regexp line) (setq line ...)) (setq start 0) (while (string-match org-bracket-link-analytic-regexp++ line start) (setq start ...) (setq path ...) (setq type ...) (setq path ...) (setq attr ...) (setq desc1 ... desc2 ... descp ... desc ...) (when ... ... ...) (cond ... ... ... ... ... ... ... ...) (setq line ... start ...)) (if (and ... ...) (setq line ...)) (when org-export-with-footnotes (setq start 0) (while ... ...)) (cond (... ... ... ... ... ... ... ...) (... ... ...) (... ... ... ...) (t ... ... ... ... ... ... ...)))
  (while (setq line (pop lines) origline line) (catch (quote nextline) (when ... ... ... ...) (when inquote ... ...) (when ... ... ... ... ...) (org-export-html-close-lists-maybe line) (when ... ... ...) (when ... ... ... ... ...) (when ... ... ... ... ...) (when ... ... ... ... ...) (when ... ... ... ... ...) (when ... ... ... ... ...) (when ... ... ... ... ...) (run-hooks ...) (when inverse ...) (while ... ...) (setq line ...) (or ... ...) (setq start 0) (while ... ... ... ... ... ... ... ... ... ...) (if ... ...) (when org-export-with-footnotes ... ...) (cond ... ... ... ...)))
  (let ((case-fold-search nil) (org-odd-levels-only odd)) (mapc (lambda ... ...) org-export-plist-vars) (setq umax (if arg ... org-export-headline-levels)) (setq umax-toc (if ... ... umax)) (unless body-only (insert ...) (org-export-html-insert-plist-item opt-plist :preamble opt-plist) (when ... ...)) (if (and org-export-with-toc ...) (progn ... ... ... ... ... ... ...)) (setq head-count 0) (org-init-section-numbers) (org-open-par) (while (setq line ... origline line) (catch ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...)) (when inquote (insert "</pre>\n") (org-open-par)) (when in-local-list (while local-list-type ... ... ...) (setq local-list-indent nil in-local-list nil)) (org-html-level-start 1 nil umax (and org-export-with-toc ...) head-count) (when (and ... first-heading-pos) (insert "</div>\n")) (save-excursion (goto-char ...) (while ... ... ...)) (when footnotes (insert ... "\n")) (let (...) (when bib ...)) (unless body-only (when ... ... ... ... ... ... ...) (if org-export-html-with-timestamp ...) (org-export-html-insert-plist-item opt-plist :postamble opt-plist) (insert "\n</div>\n</body>\n</html>\n")) (unless (plist-get opt-plist :buffer-will-be-killed) (normal-mode) (if ... ...)) (goto-char (point-min)) (when thetoc (if ... ... ... ...) (insert "<div id=\"table-of-contents\">\n") (mapc ... thetoc) (insert "</div>\n")) (goto-char (point-min)) (while (re-search-forward "<p>[ \r\n	]*</p>" nil t) (replace-match "")) (goto-char (point-min)) (while (re-search-forward "<li>[ \r\n	]*</li>\n?" nil t) (replace-match "")) (goto-char (point-min)) (while (re-search-forward "</ul>\\s-*<ul>\n?" nil t) (replace-match "")) (goto-char (point-min)) (let (beg end n) (while ... ... ... ... ...)) (or to-buffer (save-buffer)) (goto-char (point-min)) (or (org-export-push-to-kill-ring "HTML") (message "Exporting... done")) (if (eq to-buffer ...) (prog1 ... ...) (current-buffer)))
  (let* ((opt-plist ...) (body-only ...) (style ...) (html-extension ...) (link-validate ...) valid thetoc have-headings first-heading-pos (odd org-odd-levels-only) (region-p ...) (rbeg ...) (rend ...) (subtree-p ...) (level-offset ...) (opt-plist ...) (org-current-export-dir ...) (org-current-export-file buffer-file-name) (level 0) (line "") (origline "") txt todo (umax nil) (umax-toc nil) (filename ...) (current-dir ...) (buffer ...) (org-levels-open ...) (date ...) (author ...) (title ...) (link-up ...) (link-home ...) (dummy ...) (html-table-tag ...) (quote-re0 ...) (quote-re ...) (inquote nil) (infixed nil) (inverse nil) (in-local-list nil) (local-list-type nil) (local-list-indent nil) (llt org-plain-list-ordered-item-terminator) (email ...) (language ...) (keywords ...) (description ...) (lang-words nil) ...) (let (...) (org-unmodified ...)) (message "Exporting...") (setq org-min-level (org-get-min-level lines level-offset)) (setq org-last-level org-min-level) (org-init-section-numbers) (cond (... ...) (date) (t ...)) (setq lang-words (or ... ...)) (set-buffer buffer) (let (...) (erase-buffer)) (fundamental-mode) (org-install-letbind) (and (fboundp ...) (set-buffer-file-coding-system coding-system-for-write)) (let (... ...) (mapc ... org-export-plist-vars) (setq umax ...) (setq umax-toc ...) (unless body-only ... ... ...) (if ... ...) (setq head-count 0) (org-init-section-numbers) (org-open-par) (while ... ...) (when inquote ... ...) (when in-local-list ... ...) (org-html-level-start 1 nil umax ... head-count) (when ... ...) (save-excursion ... ...) (when footnotes ...) (let ... ...) (unless body-only ... ... ... ...) (unless ... ... ...) (goto-char ...) (when thetoc ... ... ... ...) (goto-char ...) (while ... ...) (goto-char ...) (while ... ...) (goto-char ...) (while ... ...) (goto-char ...) (let ... ...) (or to-buffer ...) (goto-char ...) (or ... ...) (if ... ... ...)))
  org-export-as-html(nil nil (:buffer-will-be-killed t :base-directory "./" :recursive t :publishing-directory "../public_html/" :base-extension "org" :publishing-function org-publish-org-to-html :section-numbers nil :table-of-contents nil :author-info nil :creator-info nil :style-include-default nil :style "<link rel=\"stylesheet\" type=\"text/css\" href=\"assets/css/common.css\"/>" :timestamp nil :preamble "\n<div id=\"wrapper\">\n<div id=\"header\"></div>\n<ul id=\"nav\">\n</ul>\n<div id=\"content\" class=\"clearfix\">\n<div id=\"col_1\">\n<h2>Company</h2>\n\n<ul id=\"subnav\">\n    <li><a href=\"index.html\" id=\"current-home\">Home</a></li>\n    <li><a href=\"contact.html\" id=\"current-contact\">Contact</a></li>\n</ul>\n<div class=\"figure\">\n<p><img src=\"assets/images/success.png\"  alt=\"assets/images/success.png\" /></p>\n</div>\n</div>\n\n<div id=\"col_2\">\n<!-- Page published by Emacs Org-mode begins here -->\n" :postamble "\n<!-- Page published by Emacs Org-mode ends here -->\n</div>\n\n</div>\n<div id=\"footer\"><small>All content copyright &copy; 2009 Company, all rights reserved.<br />\n</small></div>\n</div>\n" :auto-preamble nil :auto-postamble nil :auto-index t :index-filename "sitemap.org" :index-title "Sitemap") nil nil "/home/llg/devel/Internet/public_html/")
  funcall(org-export-as-html nil nil (:buffer-will-be-killed t :base-directory "./" :recursive t :publishing-directory "../public_html/" :base-extension "org" :publishing-function org-publish-org-to-html :section-numbers nil :table-of-contents nil :author-info nil :creator-info nil :style-include-default nil :style "<link rel=\"stylesheet\" type=\"text/css\" href=\"assets/css/common.css\"/>" :timestamp nil :preamble "\n<div id=\"wrapper\">\n<div id=\"header\"></div>\n<ul id=\"nav\">\n</ul>\n<div id=\"content\" class=\"clearfix\">\n<div id=\"col_1\">\n<h2>Company</h2>\n\n<ul id=\"subnav\">\n    <li><a href=\"index.html\" id=\"current-home\">Home</a></li>\n    <li><a href=\"contact.html\" id=\"current-contact\">Contact</a></li>\n</ul>\n<div class=\"figure\">\n<p><img src=\"assets/images/success.png\"  alt=\"assets/images/success.png\" /></p>\n</div>\n</div>\n\n<div id=\"col_2\">\n<!-- Page published by Emacs Org-mode begins here -->\n" :postamble "\n<!-- Page published by Emacs Org-mode ends here -->\n</div>\n\n</div>\n<div id=\"footer\"><small>All content copyright &copy; 2009 Company, all rights reserved.<br />\n</small></div>\n</div>\n" :auto-preamble nil :auto-postamble nil :auto-index t :index-filename "sitemap.org" :index-title "Sitemap") nil nil "/home/llg/devel/Internet/public_html/")
  (setq export-buf-or-file (funcall (intern ...) (plist-get plist :headline-levels) nil plist nil nil pub-dir))
  (let* ((plist ...) (init-buf ...) (init-point ...) (init-buf-string ...) export-buf-or-file) (run-hooks (quote org-publish-before-export-hook)) (setq export-buf-or-file (funcall ... ... nil plist nil nil pub-dir)) (when (and ... ...) (set-buffer export-buf-or-file) (and ... ...) (kill-buffer export-buf-or-file)) (set-buffer init-buf) (when (buffer-modified-p init-buf) (erase-buffer) (insert init-buf-string) (save-buffer) (goto-char init-point)) (unless visiting (kill-buffer init-buf)))
  (save-excursion (switch-to-buffer (or visiting ...)) (let* (... ... ... ... export-buf-or-file) (run-hooks ...) (setq export-buf-or-file ...) (when ... ... ... ...) (set-buffer init-buf) (when ... ... ... ... ...) (unless visiting ...)))
  (let ((visiting ...)) (save-excursion (switch-to-buffer ...) (let* ... ... ... ... ... ... ...)))
  org-publish-org-to("html" (:base-directory "./" :recursive t :publishing-directory "../public_html/" :base-extension "org" :publishing-function org-publish-org-to-html :section-numbers nil :table-of-contents nil :author-info nil :creator-info nil :style-include-default nil :style "<link rel=\"stylesheet\" type=\"text/css\" href=\"assets/css/common.css\"/>" :timestamp nil :preamble "\n<div id=\"wrapper\">\n<div id=\"header\"></div>\n<ul id=\"nav\">\n</ul>\n<div id=\"content\" class=\"clearfix\">\n<div id=\"col_1\">\n<h2>Company</h2>\n\n<ul id=\"subnav\">\n    <li><a href=\"index.html\" id=\"current-home\">Home</a></li>\n    <li><a href=\"contact.html\" id=\"current-contact\">Contact</a></li>\n</ul>\n<div class=\"figure\">\n<p><img src=\"assets/images/success.png\"  alt=\"assets/images/success.png\" /></p>\n</div>\n</div>\n\n<div id=\"col_2\">\n<!-- Page published by Emacs Org-mode begins here -->\n" :postamble "\n<!-- Page published by Emacs Org-mode ends here -->\n</div>\n\n</div>\n<div id=\"footer\"><small>All content copyright &copy; 2009 Company, all rights reserved.<br />\n</small></div>\n</div>\n" :auto-preamble nil :auto-postamble nil :auto-index t :index-filename "sitemap.org" :index-title "Sitemap") "/home/llg/devel/Internet/source/agile-software-development.org" "/home/llg/devel/Internet/public_html/")
  org-publish-org-to-html((:base-directory "./" :recursive t :publishing-directory "../public_html/" :base-extension "org" :publishing-function org-publish-org-to-html :section-numbers nil :table-of-contents nil :author-info nil :creator-info nil :style-include-default nil :style "<link rel=\"stylesheet\" type=\"text/css\" href=\"assets/css/common.css\"/>" :timestamp nil :preamble "\n<div id=\"wrapper\">\n<div id=\"header\"></div>\n<ul id=\"nav\">\n</ul>\n<div id=\"content\" class=\"clearfix\">\n<div id=\"col_1\">\n<h2>Company</h2>\n\n<ul id=\"subnav\">\n    <li><a href=\"index.html\" id=\"current-home\">Home</a></li>\n    <li><a href=\"contact.html\" id=\"current-contact\">Contact</a></li>\n</ul>\n<div class=\"figure\">\n<p><img src=\"assets/images/success.png\"  alt=\"assets/images/success.png\" /></p>\n</div>\n</div>\n\n<div id=\"col_2\">\n<!-- Page published by Emacs Org-mode begins here -->\n" :postamble "\n<!-- Page published by Emacs Org-mode ends here -->\n</div>\n\n</div>\n<div id=\"footer\"><small>All content copyright &copy; 2009 Company, all rights reserved.<br />\n</small></div>\n</div>\n" :auto-preamble nil :auto-postamble nil :auto-index t :index-filename "sitemap.org" :index-title "Sitemap") "/home/llg/devel/Internet/source/agile-software-development.org" "/home/llg/devel/Internet/public_html/")
  funcall(org-publish-org-to-html (:base-directory "./" :recursive t :publishing-directory "../public_html/" :base-extension "org" :publishing-function org-publish-org-to-html :section-numbers nil :table-of-contents nil :author-info nil :creator-info nil :style-include-default nil :style "<link rel=\"stylesheet\" type=\"text/css\" href=\"assets/css/common.css\"/>" :timestamp nil :preamble "\n<div id=\"wrapper\">\n<div id=\"header\"></div>\n<ul id=\"nav\">\n</ul>\n<div id=\"content\" class=\"clearfix\">\n<div id=\"col_1\">\n<h2>Company</h2>\n\n<ul id=\"subnav\">\n    <li><a href=\"index.html\" id=\"current-home\">Home</a></li>\n    <li><a href=\"contact.html\" id=\"current-contact\">Contact</a></li>\n</ul>\n<div class=\"figure\">\n<p><img src=\"assets/images/success.png\"  alt=\"assets/images/success.png\" /></p>\n</div>\n</div>\n\n<div id=\"col_2\">\n<!-- Page published by Emacs Org-mode begins here -->\n" :postamble "\n<!-- Page published by Emacs Org-mode ends here -->\n</div>\n\n</div>\n<div id=\"footer\"><small>All content copyright &copy; 2009 Company, all rights reserved.<br />\n</small></div>\n</div>\n" :auto-preamble nil :auto-postamble nil :auto-index t :index-filename "sitemap.org" :index-title "Sitemap") "/home/llg/devel/Internet/source/agile-software-development.org" "/home/llg/devel/Internet/public_html/")
  (progn (funcall publishing-function project-plist filename tmp-pub-dir) (org-publish-update-timestamp filename pub-dir publishing-function))
  (if (org-publish-needed-p filename pub-dir publishing-function tmp-pub-dir) (progn (funcall publishing-function project-plist filename tmp-pub-dir) (org-publish-update-timestamp filename pub-dir publishing-function)))
  (when (org-publish-needed-p filename pub-dir publishing-function tmp-pub-dir) (funcall publishing-function project-plist filename tmp-pub-dir) (org-publish-update-timestamp filename pub-dir publishing-function))
  (if (listp publishing-function) (mapc (lambda ... ...) publishing-function) (when (org-publish-needed-p filename pub-dir publishing-function tmp-pub-dir) (funcall publishing-function project-plist filename tmp-pub-dir) (org-publish-update-timestamp filename pub-dir publishing-function)))
  (let* ((project ...) (project-plist ...) (ftname ...) (publishing-function ...) (base-dir ...) (pub-dir ...) tmp-pub-dir) (setq tmp-pub-dir (file-name-directory ...)) (if (listp publishing-function) (mapc ... publishing-function) (when ... ... ...)))
  org-publish-file("/home/llg/devel/Internet/source/agile-software-development.org")
  (let ((org-publish-use-timestamps-flag ...)) (org-publish-file (buffer-file-name)))
  (save-window-excursion (let (...) (org-publish-file ...)))
  org-publish-current-file(nil)
  call-interactively(org-publish-current-file)
  command-execute(org-publish-current-file)
  command-line-1(("--load" "./Org2HTML.el" "--visit=agile-software-development.org" "--funcall" "org-publish-current-file"))
  command-line()
  normal-top-level()
--8<---------------cut here---------------end--------------->8---


I tried to understand what could be wrong, but don't see anything special with
the time-stamps.

Any idea?

Best regards,
  Seb

PS- Here is the contents of Org2HTML.el:

--8<---------------cut here---------------start------------->8---
;; Org-mode
(require 'org)

;; publish related Org-mode files as a website
(require 'org-publish)

;; association list to control publishing behavior
(setq org-publish-project-alist
      '(("Project"
         :base-directory "./"
         :recursive t
         :publishing-directory "../public_html/"
         :base-extension "org"
         :publishing-function org-publish-org-to-html
         :section-numbers nil
         :table-of-contents nil
         :author-info nil
         :creator-info nil
         :style-include-default nil
         :style "<link rel=\"stylesheet\" type=\"text/css\" href=\"assets/css/common.css\"/>"
         :timestamp nil
         :preamble "
<div id=\"wrapper\">
<div id=\"header\"></div>
<ul id=\"nav\">
</ul>
<div id=\"content\" class=\"clearfix\">
<div id=\"col_1\">
<h2>Company</h2>

<ul id=\"subnav\">
    <li><a href=\"index.html\" id=\"current-home\">Home</a></li>
    <li><a href=\"contact.html\" id=\"current-contact\">Contact</a></li>
</ul>
<div class=\"figure\">
<p><img src=\"assets/images/success.png\"  alt=\"assets/images/success.png\" /></p>
</div>
</div>

<div id=\"col_2\">
<!-- Page published by Emacs Org-mode begins here -->
"
         :postamble "
<!-- Page published by Emacs Org-mode ends here -->
</div>

</div>
<div id=\"footer\"><small>All content copyright &copy; 2009 Company, all rights reserved.<br />
</small></div>
</div>
"
         :auto-preamble nil
         :auto-postamble nil
         :auto-index t                  ; Generate index.org automagically...
         :index-filename "sitemap.org"  ; ... call it sitemap.org ...
         :index-title "Sitemap"         ; ... with title 'Sitemap'.
         )))
--8<---------------cut here---------------end--------------->8---

-- 
Sébastien Vauban



_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode-mXXj517/zsQ@public.gmane.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

             reply	other threads:[~2009-09-02 11:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-02 11:44 Sébastien Vauban [this message]
2009-09-02 15:25 ` wrong-type-argument when publishing to HTML Carsten Dominik
2009-09-03  8:11   ` Sébastien Vauban
2009-09-03  8:19     ` Carsten Dominik
2009-09-03  8:43       ` Sébastien Vauban

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ab1dk1vd.fsf@mundaneum.com \
    --to=wxhgmqzgwmuf-genee64ty+gs+fvcfc7uqw@public.gmane.org \
    --cc=emacs-orgmode-mXXj517/zsQ@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).