emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Bernt Hansen <bernt@norang.ca>
To: emacs-orgmode@gnu.org, Nicolas Goaziou <n.goaziou@gmail.com>
Subject: Bug: Publishing with auto-sitemap is broken [7.7 (release_7.7.497.gae02e)]
Date: Sat, 29 Oct 2011 14:13:14 -0400	[thread overview]
Message-ID: <87sjmbmzt1.fsf@norang.ca> (raw)

Hi Nicolas.

Publishing with an automatically generated index file is broken for me.

With org-publish-projects set with 

	       :auto-sitemap t
	       :sitemap-filename "index.html"
	       :sitemap-title "Test Publishing Area"
	       :sitemap-style "tree"

I get the following backtrace:

,----
| Debugger entered--Lisp error: (wrong-type-argument stringp nil)
|   format(nil "FOOBAR")
|   (let* ((opt-plist ...) (body-only ...) (style ...) (html-extension ...) 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 ...) (auto-insert nil) (buffer ...) (org-levels-open ...) (date ...) (author ...) (html-validation-link ...) (title ...) (link-up ...) (link-home ...) (dummy ...) (html-table-tag ...) (quote-re0 ...) (quote-re ...) (inquote nil) (infixed nil) (inverse nil) (email ...) (language ...) (keywords ...) (description ...) (num ...) (lang-words nil) (head-count 0) cnt ...) (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 ... ...) (org-html-level-start 1 nil umax ... head-count opt-plist) (when ... ...) (save-excursion ... ...) (when footnotes ...) (let ... ...) (unless body-only ... ...) (if org-export-html-with-timestamp ...) (unless body-only ...) (unless ... ... ...) (goto-char ...) (when thetoc ... ... ...) (goto-char ...) (while ... ...) (goto-char ...) (goto-char ...) (let ... ...) (goto-char ...) (when ... ...) (remove-text-properties ... ... ...) (run-hooks ...) (or to-buffer ...) (goto-char ...) (or ... ...) (if ... ... ...)))
|   org-export-as-html(nil nil (:buffer-will-be-killed t :base-directory "/tmp/publish/" :publishing-directory "/ssh:www-data@www:~/www.norang.ca/htdocs/tmp" :recursive t :section-numbers nil :table-of-contents nil :base-extension "org" :publishing-function (org-publish-org-to-html org-publish-org-to-org) :style "<link rel=\"stylesheet\" href=\"http://doc.norang.ca/org.css\" type=\"text/css\" />" :plain-source t :htmlized-source t :style-include-default nil :auto-sitemap t :sitemap-filename "index.html" :sitemap-title "Test Publishing Area" :sitemap-style "tree" :author-info t :creator-info t) nil nil "/ssh:www-data@www:/var/www/www.norang.ca/htdocs/tmp/")
|   funcall(org-export-as-html nil nil (:buffer-will-be-killed t :base-directory "/tmp/publish/" :publishing-directory "/ssh:www-data@www:~/www.norang.ca/htdocs/tmp" :recursive t :section-numbers nil :table-of-contents nil :base-extension "org" :publishing-function (org-publish-org-to-html org-publish-org-to-org) :style "<link rel=\"stylesheet\" href=\"http://doc.norang.ca/org.css\" type=\"text/css\" />" :plain-source t :htmlized-source t :style-include-default nil :auto-sitemap t :sitemap-filename "index.html" :sitemap-title "Test Publishing Area" :sitemap-style "tree" :author-info t :creator-info t) nil nil "/ssh:www-data@www:/var/www/www.norang.ca/htdocs/tmp/")
|   (setq export-buf-or-file (funcall (intern ...) (plist-get plist :headline-levels) nil plist nil (plist-get plist :body-only) 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 ... pub-dir)) (when (and ... ...) (set-buffer export-buf-or-file) (progn ... ...) (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 (org-pop-to-buffer-same-window (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 (org-pop-to-buffer-same-window ...) (let* ... ... ... ... ... ... ...)))
|   org-publish-org-to("html" (:base-directory "/tmp/publish/" :publishing-directory "/ssh:www-data@www:~/www.norang.ca/htdocs/tmp" :recursive t :section-numbers nil :table-of-contents nil :base-extension "org" :publishing-function (org-publish-org-to-html org-publish-org-to-org) :style "<link rel=\"stylesheet\" href=\"http://doc.norang.ca/org.css\" type=\"text/css\" />" :plain-source t :htmlized-source t :style-include-default nil :auto-sitemap t :sitemap-filename "index.html" :sitemap-title "Test Publishing Area" :sitemap-style "tree" :author-info t :creator-info t) "/tmp/publish/index.html" "/ssh:www-data@www:/var/www/www.norang.ca/htdocs/tmp/")
|   (let ((org-export-preprocess-after-headline-targets-hook ...)) (org-publish-org-to "html" plist filename pub-dir))
|   (org-publish-with-aux-preprocess-maybe (org-publish-org-to "html" plist filename pub-dir))
|   org-publish-org-to-html((:base-directory "/tmp/publish/" :publishing-directory "/ssh:www-data@www:~/www.norang.ca/htdocs/tmp" :recursive t :section-numbers nil :table-of-contents nil :base-extension "org" :publishing-function (org-publish-org-to-html org-publish-org-to-org) :style "<link rel=\"stylesheet\" href=\"http://doc.norang.ca/org.css\" type=\"text/css\" />" :plain-source t :htmlized-source t :style-include-default nil :auto-sitemap t :sitemap-filename "index.html" :sitemap-title "Test Publishing Area" :sitemap-style "tree" :author-info t :creator-info t) "/tmp/publish/index.html" "/ssh:www-data@www:/var/www/www.norang.ca/htdocs/tmp/")
|   funcall(org-publish-org-to-html (:base-directory "/tmp/publish/" :publishing-directory "/ssh:www-data@www:~/www.norang.ca/htdocs/tmp" :recursive t :section-numbers nil :table-of-contents nil :base-extension "org" :publishing-function (org-publish-org-to-html org-publish-org-to-org) :style "<link rel=\"stylesheet\" href=\"http://doc.norang.ca/org.css\" type=\"text/css\" />" :plain-source t :htmlized-source t :style-include-default nil :auto-sitemap t :sitemap-filename "index.html" :sitemap-title "Test Publishing Area" :sitemap-style "tree" :author-info t :creator-info t) "/tmp/publish/index.html" "/ssh:www-data@www:/var/www/www.norang.ca/htdocs/tmp/")
|   (progn (funcall f project-plist filename tmp-pub-dir) (org-publish-update-timestamp filename pub-dir f))
|   (if (org-publish-needed-p filename pub-dir f tmp-pub-dir) (progn (funcall f project-plist filename tmp-pub-dir) (org-publish-update-timestamp filename pub-dir f)))
|   (when (org-publish-needed-p filename pub-dir f tmp-pub-dir) (funcall f project-plist filename tmp-pub-dir) (org-publish-update-timestamp filename pub-dir f))
|   (lambda (f) (when (org-publish-needed-p filename pub-dir f tmp-pub-dir) (funcall f project-plist filename tmp-pub-dir) (org-publish-update-timestamp filename pub-dir f)))(org-publish-org-to-html)
|   mapc((lambda (f) (when (org-publish-needed-p filename pub-dir f tmp-pub-dir) (funcall f project-plist filename tmp-pub-dir) (org-publish-update-timestamp filename pub-dir f))) (org-publish-org-to-html org-publish-org-to-org))
|   (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) (unless no-cache (org-publish-initialize-cache ...)) (setq tmp-pub-dir (file-name-directory ...)) (if (listp publishing-function) (mapc ... publishing-function) (when ... ... ...)) (unless no-cache (org-publish-write-cache-file)))
|   org-publish-file("/tmp/publish/index.html" ("tmp-org" :base-directory "/tmp/publish/" :publishing-directory "/ssh:www-data@www:~/www.norang.ca/htdocs/tmp" :recursive t :section-numbers nil :table-of-contents nil :base-extension "org" :publishing-function (org-publish-org-to-html org-publish-org-to-org) :style "<link rel=\"stylesheet\" href=\"http://doc.norang.ca/org.css\" type=\"text/css\" />" :plain-source t :htmlized-source t :style-include-default nil :auto-sitemap t :sitemap-filename "index.html" :sitemap-title "Test Publishing Area" :sitemap-style "tree" :author-info t :creator-info t) t)
|   (while (setq file (pop files)) (org-publish-file file project t))
|   (let* ((project-plist ...) (exclude-regexp ...) (sitemap-p ...) (sitemap-filename ...) (sitemap-function ...) (org-sitemap-date-format ...) (org-sitemap-file-entry-format ...) (preparation-function ...) (completion-function ...) (files ...) file) (when preparation-function (run-hooks ...)) (if sitemap-p (funcall sitemap-function project sitemap-filename)) (while (setq file ...) (org-publish-file file project t)) (when (plist-get project-plist :makeindex) (org-publish-index-generate-theindex ...) (org-publish-file ... project t)) (when completion-function (run-hooks ...)) (org-publish-write-cache-file))
|   (lambda (project) (org-publish-initialize-cache (car project)) (let* (... ... ... ... ... ... ... ... ... ... file) (when preparation-function ...) (if sitemap-p ...) (while ... ...) (when ... ... ...) (when completion-function ...) (org-publish-write-cache-file)))(("tmp-org" :base-directory "/tmp/publish/" :publishing-directory "/ssh:www-data@www:~/www.norang.ca/htdocs/tmp" :recursive t :section-numbers nil :table-of-contents nil :base-extension "org" :publishing-function (org-publish-org-to-html org-publish-org-to-org) :style "<link rel=\"stylesheet\" href=\"http://doc.norang.ca/org.css\" type=\"text/css\" />" :plain-source t :htmlized-source t :style-include-default nil :auto-sitemap t :sitemap-filename "index.html" :sitemap-title "Test Publishing Area" :sitemap-style "tree" :author-info t :creator-info t))
|   mapc((lambda (project) (org-publish-initialize-cache (car project)) (let* (... ... ... ... ... ... ... ... ... ... file) (when preparation-function ...) (if sitemap-p ...) (while ... ...) (when ... ... ...) (when completion-function ...) (org-publish-write-cache-file))) (("tmp-org" :base-directory "/tmp/publish/" :publishing-directory "/ssh:www-data@www:~/www.norang.ca/htdocs/tmp" :recursive t :section-numbers nil :table-of-contents nil :base-extension "org" :publishing-function (org-publish-org-to-html org-publish-org-to-org) :style "<link rel=\"stylesheet\" href=\"http://doc.norang.ca/org.css\" type=\"text/css\" />" :plain-source t :htmlized-source t :style-include-default nil :auto-sitemap t :sitemap-filename "index.html" :sitemap-title "Test Publishing Area" :sitemap-style "tree" :author-info t :creator-info t) ("tmp-extra" :base-directory "/tmp/publish/" :publishing-directory "/ssh:www-data@www:~/www.norang.ca/htdocs/tmp" :base-extension "css\\|pdf\\|png\\|jpg\\|gif" :publishing-function org-publish-attachment :recursive t :author nil)))
|   org-publish-projects((("tmp" :components ("tmp-org" "tmp-extra"))))
|   (let* ((org-publish-use-timestamps-flag ...)) (org-publish-projects (if ... ... ...)))
|   (save-window-excursion (let* (...) (org-publish-projects ...)))
|   org-publish(("tmp" :components ("tmp-org" "tmp-extra")))
|   (let ((project ...) (org-publish-use-timestamps-flag ...)) (if (not project) (error "File %s is not part of any known project" ...)) (org-publish project))
|   (save-window-excursion (let (... ...) (if ... ...) (org-publish project)))
|   org-publish-current-project(nil)
|   (let ((org-export-html-style-extra) (org-export-html-validation-link "<a href=\"http://validator.w3.org/check?uri=referer\">Validate XHTML 1.0</a>")) (org-publish-current-project force))
|   bh/save-then-publish(nil)
|   call-interactively(bh/save-then-publish nil nil)
`----

This is from 

	 (quote-re    (format org-heading-keyword-regexp-format
			      org-quote-string))

at line 1183 in org-html.el.
I have org-quote- string set as follows

,----
| (setq org-quote-string "FOOBAR")
`----

since I wanted to use QUOTE as a keyword (which is the default string
for this)

git bisect identifies the following commit as the cause of this problem.

,----
| dfcb6faef11a2439b56b18a6289803361d402130 is the first bad commit
| commit dfcb6faef11a2439b56b18a6289803361d402130
| Author: Nicolas Goaziou <n.goaziou@gmail.com>
| Date:   Thu Aug 25 01:58:29 2011 +0200
| 
|     Provide more consistent regexps for headlines
|     
|     * lisp/org-agenda.el (org-search-view): Simplify regexp.
|     (org-agenda-get-todos): Use new format string.
|     * lisp/org-archive.el (org-archive-all-done): Simplify regexp.
|     * lisp/org-ascii.el (org-export-as-ascii): More accurate regexp.
|     * lisp/org-colview-xemacs.el (org-columns-capture-view): Use new
|       format string and new string.
|     * lisp/org-colview.el (org-columns-capture-view): Use new format
|       string and new string.
|     * lisp/org-docbook.el (org-export-as-docbook): More accurate
|       regexp.  Also use new regexp to match generic headlines.
|     * lisp/org-exp.el (org-export-protect-quoted-subtrees): More accurate
|       regexp.  Also use new regexp to match generic headlines.
|     * lisp/org-html.el (org-export-as-html): More accurate regexp.  Also
|       use new regexp to match generic headlines.
|     * lisp/org-mouse.el (org-mouse-match-todo-keyword): Removed unused
|       and now erroneous function.
|     * lisp/org.el (org-heading-regexp, org-heading-keyword-regexp-format):
|       New variables.
|     (org-set-regexps-and-options): Create regexps according to the
|     following rule: use spaces only to separate elements from an headline,
|     while allowing mixed tabs and spaces for any indentation job.
|     (org-nl-done-regexp, org-looking-at-done-regexp): Removed variables.
|     (org-set-font-lock-defaults): Fontify again headlines with a keyword
|     and no other text.  Use new format strings.
|     (org-get-heading, org-toggle-comment, org-prepare-agenda-buffers,
|     org-toggle-fixed-width-section): Use new format string.
|     (org-todo): More accurate regexps.
|     (org-point-at-end-of-empty-headline): Simplify regexp.
|     (org-insert-heading): Headline can sometimes be nil.
|     
|     This patch attempts to reduce the number of hard-coded headlines, by
|     providing two format strings and one generic string to cover most of
|     the cases of headline construction.
| 
| :040000 040000 c95587ff389224683249bba25c443b29b83b8885 b2ad639be9e4672ce873d8bc27e59888b805235b M	lisp
`----

Publishing works fine for me if I don't have an auto-generated index.

Regards,
Bernt


Emacs  : GNU Emacs 23.2.1 (i486-pc-linux-gnu, GTK+ Version 2.20.0)
 of 2010-12-11 on raven, modified by Debian
Package: Org-mode version 7.7 (release_7.7.497.gae02e)

             reply	other threads:[~2011-10-29 18:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-29 18:13 Bernt Hansen [this message]
2011-10-31 19:23 ` Bug: Publishing with auto-sitemap is broken [7.7 (release_7.7.497.gae02e)] Nicolas Goaziou
2011-10-31 22:05   ` Bernt Hansen
2011-11-01 10:47     ` Nicolas Goaziou
2011-11-01 11:21       ` Bernt Hansen
2011-11-01 22:08       ` Bernt Hansen
2011-11-02 12:01         ` Nicolas Goaziou

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=87sjmbmzt1.fsf@norang.ca \
    --to=bernt@norang.ca \
    --cc=emacs-orgmode@gnu.org \
    --cc=n.goaziou@gmail.com \
    /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).