From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?S=C3=A9bastien_Vauban?= Subject: wrong-type-argument when publishing to HTML Date: Wed, 02 Sep 2009 13:44:06 +0200 Message-ID: <87ab1dk1vd.fsf@mundaneum.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org To: emacs-orgmode-mXXj517/zsQ@public.gmane.org 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=3Dagile-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>") 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 "\n") (org-= open-par) (setq inquote nil)) (when inquote (insert ... "\n") (throw ... ni= l)) (when (and org-export-with-fixed-width ...) (when ... ... ... ...) (ins= ert ... "\n") (when ... ... ... ...) (throw ... nil)) (org-export-html-clos= e-lists-maybe line) (when (get-text-property 0 ... line) (let ... ... ... .= .. ...) (throw ... nil)) (when (equal "ORG-BLOCKQUOTE-START" line) (org-clo= se-par-maybe) (insert "
\n") (org-open-par) (throw ... nil)) (wh= en (equal "ORG-BLOCKQUOTE-END" line) (org-close-par-maybe) (insert "\n\n") (org-open-par) (throw ... nil)) (when (equal "ORG-VERSE-START"= line) (org-close-par-maybe) (insert "\n

\n") (setq inv= erse t) (throw ... nil)) (when (equal "ORG-VERSE-END" line) (insert "

\n= ") (org-open-par) (setq inverse nil) (throw ... nil)) (when (equal "ORG-CEN= TER-START" line) (org-close-par-maybe) (insert "\n
") (org-open-par) (throw ... nil)) (when (equal "ORG-CENTER-END"= line) (org-close-par-maybe) (insert "\n
") (org-open-par) (throw ... = nil)) (run-hooks (quote org-export-html-after-blockquotes-hook)) (when inve= rse (let ... ... ...)) (while (string-match "<<]*\\)>>>?\\((INVISI= BLE)\\)?[ ]*\n?" line) (cond ... ... ...)) (setq line (org-html-handle-tim= e-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 st= art 0) (while ... ...)) (cond (... ... ... ... ... ... ... ...) (... ... ..= .) (... ... ... ...) (t ... ... ... ... ... ... ...))) (while (setq line (pop lines) origline line) (catch (quote nextline) (whe= n ... ... ... ...) (when inquote ... ...) (when ... ... ... ... ...) (org-e= xport-html-close-lists-maybe line) (when ... ... ...) (when ... ... ... ...= ...) (when ... ... ... ... ...) (when ... ... ... ... ...) (when ... ... .= .. ... ...) (when ... ... ... ... ...) (when ... ... ... ... ...) (run-hook= s ...) (when inverse ...) (while ... ...) (setq line ...) (or ... ...) (set= q start 0) (while ... ... ... ... ... ... ... ... ... ...) (if ... ...) (wh= en 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-lev= els)) (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 l= ine ... origline line) (catch ... ... ... ... ... ... ... ... ... ... ... .= .. ... ... ... ... ... ... ... ... ... ...)) (when inquote (insert "\= 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 ni= l umax (and org-export-with-toc ...) head-count) (when (and ... first-headi= ng-pos) (insert "\n")) (save-excursion (goto-char ...) (while ... ...= ...)) (when footnotes (insert ... "\n")) (let (...) (when bib ...)) (unles= s body-only (when ... ... ... ... ... ... ...) (if org-export-html-with-tim= estamp ...) (org-export-html-insert-plist-item opt-plist :postamble opt-pli= st) (insert "\n\n\n\n")) (unless (plist-get opt-plist := buffer-will-be-killed) (normal-mode) (if ... ...)) (goto-char (point-min)) = (when thetoc (if ... ... ... ...) (insert "
= \n") (mapc ... thetoc) (insert "
\n")) (goto-char (point-min)) (while = (re-search-forward "

[ =0D\n ]*

" nil t) (replace-match "")) (goto-cha= r (point-min)) (while (re-search-forward "
  • [ =0D\n ]*
  • \n?" nil t) (r= eplace-match "")) (goto-char (point-min)) (while (re-search-forward "\= \s-*
      \n?" nil t) (replace-match "")) (goto-char (point-min)) (let (beg e= nd 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-od= d-levels-only) (region-p ...) (rbeg ...) (rend ...) (subtree-p ...) (level-= offset ...) (opt-plist ...) (org-current-export-dir ...) (org-current-expor= t-file buffer-file-name) (level 0) (line "") (origline "") txt todo (umax n= il) (umax-toc nil) (filename ...) (current-dir ...) (buffer ...) (org-level= s-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) (emai= l ...) (language ...) (keywords ...) (description ...) (lang-words nil) ...= ) (let (...) (org-unmodified ...)) (message "Exporting...") (setq org-min-l= evel (org-get-min-level lines level-offset)) (setq org-last-level org-min-l= evel) (org-init-section-numbers) (cond (... ...) (date) (t ...)) (setq lang= -words (or ... ...)) (set-buffer buffer) (let (...) (erase-buffer)) (fundam= ental-mode) (org-install-letbind) (and (fboundp ...) (set-buffer-file-codin= g-system coding-system-for-write)) (let (... ...) (mapc ... org-export-plis= t-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-ht= ml-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-o= f-contents nil :author-info nil :creator-info nil :style-include-default ni= l :style "" :timestamp nil :preamble "\n
      \n
      \n
        \n
      \n
      \n
      \n

      Company

      \n\n\n
      \n

      3D\"assets/images/success.png\"

      \n
      \n
      \n\n\n\n"= :postamble "\n\n
      \= n\n
      \n
      All content copyright © 2009 Co= mpany, all rights reserved.
      \n
      \n\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-direct= ory "./" :recursive t :publishing-directory "../public_html/" :base-extensi= on "org" :publishing-function org-publish-org-to-html :section-numbers nil = :table-of-contents nil :author-info nil :creator-info nil :style-include-de= fault nil :style "" :timestamp nil :preamble "\n
      \n
      \n
        \n
      \n
      \n
      \n

      Company

      \n\n\n
      \n

      3D\"assets/images/success.png\"

      \n
      \n\n\n
      \n\n" :postamble "\n\= n
      \n\n
      \n
      All content copyright ©= 2009 Company, all rights reserved.
      \n
      \n
      \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)) (set= q export-buf-or-file (funcall ... ... nil plist nil nil pub-dir)) (when (an= d ... ...) (set-buffer export-buf-or-file) (and ... ...) (kill-buffer expor= t-buf-or-file)) (set-buffer init-buf) (when (buffer-modified-p init-buf) (e= rase-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 v= isiting ...))) (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-inf= o nil :creator-info nil :style-include-default nil :style "" :timesta= mp nil :preamble "\n
      \n
      \n\n
    \n
    \n
    \n

    Company

    \n\n\n
    \n

    3D\"assets=

    \n
    \n
    \n\n
    \n\n" :postamble "\n\n
    \n\n
    \n
    All content copyright © 2009 Company, all rights reserv= ed.
    \n
    \n\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-di= rectory "../public_html/" :base-extension "org" :publishing-function org-pu= blish-org-to-html :section-numbers nil :table-of-contents nil :author-info = nil :creator-info nil :style-include-default nil :style "" :timestamp= nil :preamble "\n
    \n
    \n
      \n
    \n
    \n
    \n

    Company

    \n\n\n
    \n

    3D\"assets/im=

    \n
    \n
    \n\n
    \n\n" :postamble "\n\n
    \n\n
    \n
    All content copyright © 2009 Company, all rights reserved.=
    \n
    \n
    \n" :auto-preamble nil :auto-postamble nil :a= uto-index t :index-filename "sitemap.org" :index-title "Sitemap") "/home/ll= g/devel/Internet/source/agile-software-development.org" "/home/llg/devel/In= ternet/public_html/") funcall(org-publish-org-to-html (:base-directory "./" :recursive t :publi= shing-directory "../public_html/" :base-extension "org" :publishing-functio= n org-publish-org-to-html :section-numbers nil :table-of-contents nil :auth= or-info nil :creator-info nil :style-include-default nil :style "" := timestamp nil :preamble "\n
    \n
    \n
      \n
    \n
    \= n
    \n

    Company

    \n\n\n
    \n

    3D\"a=

    \n
    \n
    \n\n
    \n= \n" :postamble "\n\n
    \n\n
    \n
    All content copyright © 2009 Company, all rights = reserved.
    \n
    \n
    \n" :auto-preamble nil :auto-postamb= le 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-di= r) (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-functio= n) (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-functio= n ...) (base-dir ...) (pub-dir ...) tmp-pub-dir) (setq tmp-pub-dir (file-na= me-directory ...)) (if (listp publishing-function) (mapc ... publishing-fun= ction) (when ... ... ...))) org-publish-file("/home/llg/devel/Internet/source/agile-software-developm= ent.org") (let ((org-publish-use-timestamps-flag ...)) (org-publish-file (buffer-fi= le-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=3Dagile-software-develo= pment.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 w= ith 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 "" :timestamp nil :preamble "

    Company

    3D\"assets/images/success.=

    " :postamble "
    All content copyright © 2009 Company, all = rights reserved.
    " :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--- --=20 S=C3=A9bastien 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