* wrong-type-argument when publishing to HTML
@ 2009-09-02 11:44 Sébastien Vauban
2009-09-02 15:25 ` Carsten Dominik
0 siblings, 1 reply; 5+ messages in thread
From: Sébastien Vauban @ 2009-09-02 11:44 UTC (permalink / raw)
To: emacs-orgmode-mXXj517/zsQ
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 © 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 © 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 © 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 © 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 © 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 © 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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: wrong-type-argument when publishing to HTML
2009-09-02 11:44 wrong-type-argument when publishing to HTML Sébastien Vauban
@ 2009-09-02 15:25 ` Carsten Dominik
2009-09-03 8:11 ` Sébastien Vauban
0 siblings, 1 reply; 5+ messages in thread
From: Carsten Dominik @ 2009-09-02 15:25 UTC (permalink / raw)
To: Sébastien Vauban; +Cc: emacs-orgmode
On Sep 2, 2009, at 1:44 PM, Sébastien Vauban wrote:
> 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---
This looks to me as if the the file being published is not
in org-mode. So my first guess would be that Org2HTML.el misses
the following line:
(add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode))
Remember that --batch processing implies -q, i.e. the .emacs
file will not be evalated. Another solution might be to add
--load ~/.emacs
directly after --batch, but that only works if the .emacs files
does not do seomthing strange. For example, some people have
their .emacs file automatically switch to a certain file or
displaying the agenda or so. That may not be a good idea in batch
mode.
HTH
- Carsten
>
> 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>[
> \n ]*</p>" nil t) (replace-match "")) (goto-char (point-min)) (while
> (re-search-forward "<li>[
> \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 © 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 © 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
> © 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
> © 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
> © 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 © 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@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: wrong-type-argument when publishing to HTML
2009-09-02 15:25 ` Carsten Dominik
@ 2009-09-03 8:11 ` Sébastien Vauban
2009-09-03 8:19 ` Carsten Dominik
0 siblings, 1 reply; 5+ messages in thread
From: Sébastien Vauban @ 2009-09-03 8:11 UTC (permalink / raw)
To: emacs-orgmode-mXXj517/zsQ
Hi Carsten,
Carsten Dominik wrote:
> On Sep 2, 2009, at 1:44 PM, Sébastien Vauban wrote:
>
>> 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---
>> [...]
>> 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")
>> [...]
>> --8<---------------cut here---------------end--------------->8---
>>
>> I tried to understand what could be wrong, but don't see anything special
>> with the time-stamps.
>>
>> 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
>> [...]
>> :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---
>
> This looks to me as if the the file being published is not in org-mode. So
> my first guess would be that Org2HTML.el misses the following line:
>
> (add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode))
>
> Remember that --batch processing implies -q, i.e. the .emacs file will not
> be evalated.
I knew that, but I thought that
--8<---------------cut here---------------start------------->8---
;; Org-mode
(require 'org)
--8<---------------cut here---------------end--------------->8---
would add the association `.org' in `auto-mode-alist' on its own.
Anyway, adding the above `add-to-list' line (just after the `require org')
solved the problem of my colleague. Thanks.
> Another solution might be to add
>
> --load ~/.emacs
>
> directly after --batch, but that only works if the .emacs files does not do
> seomthing strange. For example, some people have their .emacs file
> automatically switch to a certain file or displaying the agenda or so. That
> may not be a good idea in batch mode.
Like you, I would not be in favor of such a solution. My goal is having a kind
of minimal `.emacs' file (this is the goal of Org2HTML.el) that can be used by
anybody using my Makefile.
Best regards,
Seb
--
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Re: wrong-type-argument when publishing to HTML
2009-09-03 8:11 ` Sébastien Vauban
@ 2009-09-03 8:19 ` Carsten Dominik
2009-09-03 8:43 ` Sébastien Vauban
0 siblings, 1 reply; 5+ messages in thread
From: Carsten Dominik @ 2009-09-03 8:19 UTC (permalink / raw)
To: Sébastien Vauban; +Cc: emacs-orgmode
On Sep 3, 2009, at 10:11 AM, Sébastien Vauban wrote:
> Hi Carsten,
>
> Carsten Dominik wrote:
>> On Sep 2, 2009, at 1:44 PM, Sébastien Vauban wrote:
>>
>>> 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---
>>> [...]
>>> 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")
>>> [...]
>>> --8<---------------cut here---------------end--------------->8---
>>>
>>> I tried to understand what could be wrong, but don't see anything
>>> special
>>> with the time-stamps.
>>>
>>> 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
>>> [...]
>>> :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---
>>
>> This looks to me as if the the file being published is not in org-
>> mode. So
>> my first guess would be that Org2HTML.el misses the following line:
>>
>> (add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode))
>>
>> Remember that --batch processing implies -q, i.e. the .emacs file
>> will not
>> be evalated.
>
> I knew that, but I thought that
>
> --8<---------------cut here---------------start------------->8---
> ;; Org-mode
> (require 'org)
> --8<---------------cut here---------------end--------------->8---
>
> would add the association `.org' in `auto-mode-alist' on its own.
No, this is, I think, against Emacs conventions, because
it would overrule user setup - some people might want to
use .org for a different purpose.
In Emacs 23, the default value for auto-mode-alist contains the
regexp for org-mode, but I guess you are not running 23 in this case.
>
> Anyway, adding the above `add-to-list' line (just after the `require
> org')
> solved the problem of my colleague. Thanks.
You are welcome.
- Carsten
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: wrong-type-argument when publishing to HTML
2009-09-03 8:19 ` Carsten Dominik
@ 2009-09-03 8:43 ` Sébastien Vauban
0 siblings, 0 replies; 5+ messages in thread
From: Sébastien Vauban @ 2009-09-03 8:43 UTC (permalink / raw)
To: emacs-orgmode-mXXj517/zsQ
Hi Carsten,
Carsten Dominik wrote:
> On Sep 3, 2009, at 10:11 AM, Sébastien Vauban wrote:
>> Carsten Dominik wrote:
>>> On Sep 2, 2009, at 1:44 PM, Sébastien Vauban wrote:
>>>
>>>> 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---
>>>>
>>>> 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
>>>> [...]
>>>> )))
>>>> --8<---------------cut here---------------end--------------->8---
>>>
>>> This looks to me as if the the file being published is not in org- mode.
>>> So my first guess would be that Org2HTML.el misses the following line:
>>>
>>> (add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode))
>>>
>>> Remember that --batch processing implies -q, i.e. the .emacs file will not
>>> be evalated.
>>
>> I knew that, but I thought that
>>
>> --8<---------------cut here---------------start------------->8---
>> ;; Org-mode
>> (require 'org)
>> --8<---------------cut here---------------end--------------->8---
>>
>> would add the association `.org' in `auto-mode-alist' on its own.
>
> No, this is, I think, against Emacs conventions, because it would overrule
> user setup - some people might want to use .org for a different purpose.
Can you really imagine that? ;-)
OK. I was totally unaware of this fact, that we had to do such an association
(between the `.org' extension and the Org-mode) "manually" ...
> In Emacs 23, the default value for auto-mode-alist contains the regexp for
> org-mode, but I guess you are not running 23 in this case.
... or had to use Emacs 23 -- what I'm doing for a long while already, but not
my colleague (still using Emacs 22).
Well seen!
>> Anyway, adding the above `add-to-list' line (just after the `require org')
>> solved the problem of my colleague. Thanks.
>
> You are welcome.
Thanks again.
Seb
--
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
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-09-03 8:43 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-02 11:44 wrong-type-argument when publishing to HTML Sébastien Vauban
2009-09-02 15:25 ` 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
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.