From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bernt Hansen Subject: Bug: Publishing with auto-sitemap is broken [7.7 (release_7.7.497.gae02e)] Date: Sat, 29 Oct 2011 14:13:14 -0400 Message-ID: <87sjmbmzt1.fsf@norang.ca> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([140.186.70.92]:48805) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RKDPL-0005vE-In for emacs-orgmode@gnu.org; Sat, 29 Oct 2011 14:13:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RKDPJ-0004Ne-8W for emacs-orgmode@gnu.org; Sat, 29 Oct 2011 14:13:27 -0400 Received: from mho-03-ewr.mailhop.org ([204.13.248.66]:33069 helo=mho-01-ewr.mailhop.org) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RKDPJ-0004Mb-56 for emacs-orgmode@gnu.org; Sat, 29 Oct 2011 14:13:25 -0400 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org, Nicolas Goaziou Hi Nicolas. Publishing with an automatically generated index file is broken for me. With org-publish-projects set with=20 :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) (re= gion-p ...) (rbeg ...) (rend ...) (subtree-p ...) (level-offset ...) (opt-p= list ...) (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-level= s-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 ...) (l= anguage ...) (keywords ...) (description ...) (num ...) (lang-words nil) (h= ead-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 (...) (er= ase-buffer)) (fundamental-mode) (org-install-letbind) (and (fboundp ...) (s= et-buffer-file-coding-system coding-system-for-write)) (let (... ...) (mapc= ... org-export-plist-vars) (setq umax ...) (setq umax-toc ...) (unless bod= y-only ... ... ...) (if ... ...) (setq head-count 0) (org-init-section-numb= ers) (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 o= rg-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/htdo= cs/tmp" :recursive t :section-numbers nil :table-of-contents nil :base-exte= nsion "org" :publishing-function (org-publish-org-to-html org-publish-org-t= o-org) :style "" :plain-source t :htmlized-source t :style-in= clude-default nil :auto-sitemap t :sitemap-filename "index.html" :sitemap-t= itle "Test Publishing Area" :sitemap-style "tree" :author-info t :creator-i= nfo 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-dire= ctory "/tmp/publish/" :publishing-directory "/ssh:www-data@www:~/www.norang= .ca/htdocs/tmp" :recursive t :section-numbers nil :table-of-contents nil :b= ase-extension "org" :publishing-function (org-publish-org-to-html org-publi= sh-org-to-org) :style "" :plain-source t :htmlized-source t := style-include-default nil :auto-sitemap t :sitemap-filename "index.html" :s= itemap-title "Test Publishing Area" :sitemap-style "tree" :author-info t :c= reator-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 :headli= ne-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)) (s= etq export-buf-or-file (funcall ... ... nil plist nil ... pub-dir)) (when (= and ... ...) (set-buffer export-buf-or-file) (progn ... ...) (kill-buffer e= xport-buf-or-file)) (set-buffer init-buf) (when (buffer-modified-p init-buf= ) (erase-buffer) (insert init-buf-string) (save-buffer) (goto-char init-poi= nt)) (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-f= ile ...) (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 :sect= ion-numbers nil :table-of-contents nil :base-extension "org" :publishing-fu= nction (org-publish-org-to-html org-publish-org-to-org) :style "" :plain-source t :htmlized-source t :style-include-default nil :auto-= sitemap t :sitemap-filename "index.html" :sitemap-title "Test Publishing Ar= ea" :sitemap-style "tree" :author-info t :creator-info t) "/tmp/publish/ind= ex.html" "/ssh:www-data@www:/var/www/www.norang.ca/htdocs/tmp/") | (let ((org-export-preprocess-after-headline-targets-hook ...)) (org-pub= lish-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-di= rectory "/ssh:www-data@www:~/www.norang.ca/htdocs/tmp" :recursive t :sectio= n-numbers nil :table-of-contents nil :base-extension "org" :publishing-func= tion (org-publish-org-to-html org-publish-org-to-org) :style "" :plain-source t :htmlized-source t :style-include-default nil :auto-site= map t :sitemap-filename "index.html" :sitemap-title "Test Publishing Area" = :sitemap-style "tree" :author-info t :creator-info t) "/tmp/publish/index.h= tml" "/ssh:www-data@www:/var/www/www.norang.ca/htdocs/tmp/") | funcall(org-publish-org-to-html (:base-directory "/tmp/publish/" :publi= shing-directory "/ssh:www-data@www:~/www.norang.ca/htdocs/tmp" :recursive t= :section-numbers nil :table-of-contents nil :base-extension "org" :publish= ing-function (org-publish-org-to-html org-publish-org-to-org) :style "" :plain-source t :htmlized-source t :style-include-default nil :a= uto-sitemap t :sitemap-filename "index.html" :sitemap-title "Test Publishin= g 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-upda= te-timestamp filename pub-dir f)) | (if (org-publish-needed-p filename pub-dir f tmp-pub-dir) (progn (funca= ll f project-plist filename tmp-pub-dir) (org-publish-update-timestamp file= name 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-timesta= mp 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-ti= mestamp filename pub-dir f))) (org-publish-org-to-html org-publish-org-to-o= rg)) | (if (listp publishing-function) (mapc (lambda ... ...) publishing-funct= ion) (when (org-publish-needed-p filename pub-dir publishing-function tmp-p= ub-dir) (funcall publishing-function project-plist filename tmp-pub-dir) (o= rg-publish-update-timestamp filename pub-dir publishing-function))) | (let* ((project ...) (project-plist ...) (ftname ...) (publishing-funct= ion ...) (base-dir ...) (pub-dir ...) tmp-pub-dir) (unless no-cache (org-pu= blish-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/htd= ocs/tmp" :recursive t :section-numbers nil :table-of-contents nil :base-ext= ension "org" :publishing-function (org-publish-org-to-html org-publish-org-= to-org) :style "" :plain-source t :htmlized-source t :style-i= nclude-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 ...) (sitema= p-filename ...) (sitemap-function ...) (org-sitemap-date-format ...) (org-s= itemap-file-entry-format ...) (preparation-function ...) (completion-functi= on ...) (files ...) file) (when preparation-function (run-hooks ...)) (if s= itemap-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-fu= nction ...) (org-publish-write-cache-file)))(("tmp-org" :base-directory "/t= mp/publish/" :publishing-directory "/ssh:www-data@www:~/www.norang.ca/htdoc= s/tmp" :recursive t :section-numbers nil :table-of-contents nil :base-exten= sion "org" :publishing-function (org-publish-org-to-html org-publish-org-to= -org) :style "" :plain-source t :htmlized-source t :style-inc= lude-default nil :auto-sitemap t :sitemap-filename "index.html" :sitemap-ti= tle "Test Publishing Area" :sitemap-style "tree" :author-info t :creator-in= fo t)) | mapc((lambda (project) (org-publish-initialize-cache (car project)) (le= t* (... ... ... ... ... ... ... ... ... ... file) (when preparation-functio= n ...) (if sitemap-p ...) (while ... ...) (when ... ... ...) (when completi= on-function ...) (org-publish-write-cache-file))) (("tmp-org" :base-directo= ry "/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 "" :plain-source t :htmlized-source t :sty= le-include-default nil :auto-sitemap t :sitemap-filename "index.html" :site= map-title "Test Publishing Area" :sitemap-style "tree" :author-info t :crea= tor-info t) ("tmp-extra" :base-directory "/tmp/publish/" :publishing-direct= ory "/ssh:www-data@www:~/www.norang.ca/htdocs/tmp" :base-extension "css\\|p= df\\|png\\|jpg\\|gif" :publishing-function org-publish-attachment :recursiv= e 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 pro= ject) (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=3D\"http://validator.w3.org/check?uri=3Dreferer\">Validate XHTML 1.0= ")) (org-publish-current-project force)) | bh/save-then-publish(nil) | call-interactively(bh/save-then-publish nil nil) `---- This is from=20 (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 | Date: Thu Aug 25 01:58:29 2011 +0200 |=20 | Provide more consistent regexps for headlines |=20=20=20=20=20 | * 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. |=20=20=20=20=20 | 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. |=20 | :040000 040000 c95587ff389224683249bba25c443b29b83b8885 b2ad639be9e4672ce= 873d8bc27e59888b805235b 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)