emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Bug: Publishing with auto-sitemap is broken [7.7 (release_7.7.497.gae02e)]
@ 2011-10-29 18:13 Bernt Hansen
  2011-10-31 19:23 ` Nicolas Goaziou
  0 siblings, 1 reply; 7+ messages in thread
From: Bernt Hansen @ 2011-10-29 18:13 UTC (permalink / raw)
  To: emacs-orgmode, Nicolas Goaziou

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)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Bug: Publishing with auto-sitemap is broken [7.7 (release_7.7.497.gae02e)]
  2011-10-29 18:13 Bug: Publishing with auto-sitemap is broken [7.7 (release_7.7.497.gae02e)] Bernt Hansen
@ 2011-10-31 19:23 ` Nicolas Goaziou
  2011-10-31 22:05   ` Bernt Hansen
  0 siblings, 1 reply; 7+ messages in thread
From: Nicolas Goaziou @ 2011-10-31 19:23 UTC (permalink / raw)
  To: Bernt Hansen; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 472 bytes --]

Hello,

Bernt Hansen <bernt@norang.ca> writes:

> 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 think reverting changes on headlines in HTML and DocBook exporters is
the best option for now.

Does the following patch work?

Regards,

-- 
Nicolas Goaziou

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Do-not-rely-on-variables-defined-in-Org-buffers-only.patch --]
[-- Type: text/x-patch, Size: 2060 bytes --]

From 0a6d23ac0f865829701f21a1d460cdf0647473c7 Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou <n.goaziou@gmail.com>
Date: Mon, 31 Oct 2011 20:21:06 +0100
Subject: [PATCH] Do not rely on variables defined in Org buffers only for
 export

* lisp/org-html.el (org-export-as-html): Revert changes effectued on
  patch dfcb6faef11a2439b56b18a6289803361d402130.
  `org-heading-keyword-regexp-format' may not be defined during all
  the export stages.
* lisp/org-docbook.el (org-export-as-docbook): Ditto.
---
 lisp/org-docbook.el |    5 ++---
 lisp/org-html.el    |    5 ++---
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/lisp/org-docbook.el b/lisp/org-docbook.el
index 6b10354..5cb9722 100644
--- a/lisp/org-docbook.el
+++ b/lisp/org-docbook.el
@@ -502,9 +502,8 @@ publishing directory."
 	 ;; We will use HTML table formatter to export tables to DocBook
 	 ;; format, so need to set html-table-tag here.
 	 (html-table-tag (plist-get opt-plist :html-table-tag))
-	 (quote-re0   (concat "^ *" org-quote-string "\\( +\\|[ \t]*$\\)"))
-	 (quote-re    (format org-heading-keyword-regexp-format
-			      org-quote-string))
+	 (quote-re0   (concat "^[ \t]*" org-quote-string "\\>"))
+	 (quote-re    (concat "^\\(\\*+\\)\\([ \t]+" org-quote-string "\\>\\)"))
 	 (inquote     nil)
 	 (infixed     nil)
 	 (inverse     nil)
diff --git a/lisp/org-html.el b/lisp/org-html.el
index fa3811f..8908198 100644
--- a/lisp/org-html.el
+++ b/lisp/org-html.el
@@ -1179,9 +1179,8 @@ PUB-DIR is set, use this as the publishing directory."
 			 (plist-get opt-plist :link-home)))
 	 (dummy (setq opt-plist (plist-put opt-plist :title title)))
 	 (html-table-tag (plist-get opt-plist :html-table-tag))
-	 (quote-re0   (concat "^ *" org-quote-string "\\( +\\|[ \t]*$\\)"))
-	 (quote-re    (format org-heading-keyword-regexp-format
-			      org-quote-string))
+	 (quote-re0   (concat "^[ \t]*" org-quote-string "\\>"))
+	 (quote-re    (concat "^\\(\\*+\\)\\([ \t]+" org-quote-string "\\>\\)"))
 	 (inquote     nil)
 	 (infixed     nil)
 	 (inverse     nil)
-- 
1.7.7.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: Bug: Publishing with auto-sitemap is broken [7.7 (release_7.7.497.gae02e)]
  2011-10-31 19:23 ` Nicolas Goaziou
@ 2011-10-31 22:05   ` Bernt Hansen
  2011-11-01 10:47     ` Nicolas Goaziou
  0 siblings, 1 reply; 7+ messages in thread
From: Bernt Hansen @ 2011-10-31 22:05 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode

Nicolas Goaziou <n.goaziou@gmail.com> writes:

> Bernt Hansen <bernt@norang.ca> writes:
>
>> 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 think reverting changes on headlines in HTML and DocBook exporters is
> the best option for now.
>
> Does the following patch work?

Yes, this patch works for me.

Thanks!

Regards,
Bernt

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Bug: Publishing with auto-sitemap is broken [7.7 (release_7.7.497.gae02e)]
  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
  0 siblings, 2 replies; 7+ messages in thread
From: Nicolas Goaziou @ 2011-11-01 10:47 UTC (permalink / raw)
  To: Bernt Hansen; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 768 bytes --]

Hello,

Bernt Hansen <bernt@norang.ca> writes:

> Nicolas Goaziou <n.goaziou@gmail.com> writes:
>
>> Bernt Hansen <bernt@norang.ca> writes:
>>
>>> 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 think reverting changes on headlines in HTML and DocBook exporters is
>> the best option for now.
>>
>> Does the following patch work?
>
> Yes, this patch works for me.

Would you mind dismissing the previous patch and test the following
instead? I think that the approach is better.

Thank you in advance.

Regards,

-- 
Nicolas Goaziou

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Globalize-some-variables-to-make-them-available-in-b.patch --]
[-- Type: text/x-patch, Size: 3939 bytes --]

From e31e89430aa9f1b5de545c3bfd1503acc848d527 Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou <n.goaziou@gmail.com>
Date: Tue, 1 Nov 2011 11:40:11 +0100
Subject: [PATCH] Globalize some variables to make them available in buffers
 not in Org mode

* lisp/org.el (org-heading-regexp, org-heading-keyword-regexp-format,
  org-heading-keyword-maybe-regexp-format): Globalize variables so
  they are accessible even in buffers not in Org mode.
---
 lisp/org.el |   38 ++++++++++++++++----------------------
 1 files changed, 16 insertions(+), 22 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index 318ccfd..c3c7bdf 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -4246,10 +4246,6 @@ collapsed state."
 
 ;;; Variables for pre-computed regular expressions, all buffer local
 
-(defvar org-heading-regexp nil
-  "Matches an headline.
-Stars are put in group 1 and the trimmed body in group 2.")
-(make-variable-buffer-local 'org-heading-regexp)
 (defvar org-drawer-regexp nil
   "Matches first line of a hidden block.")
 (make-variable-buffer-local 'org-drawer-regexp)
@@ -4273,18 +4269,6 @@ group 3: Priority cookie
 group 4: True headline
 group 5: Tags")
 (make-variable-buffer-local 'org-complex-heading-regexp)
-(defvar org-heading-keyword-regexp-format nil
-  "Printf format to make regexp to match an headline with some keyword.
-This regexp will match the headline of any node which has the
-exact keyword that is put into the format.  The keyword isn't in
-any group by default, but the stars and the body are.")
-(make-variable-buffer-local 'org-heading-keyword-regexp-format)
-(defvar org-heading-keyword-maybe-regexp-format nil
-  "Printf format to make regexp to match an headline with some keyword.
-This regexp can match any headline with the specified keyword, or
-a without a keyword.  The keyword isn't in any group by default,
-but the stars and the body are.")
-(make-variable-buffer-local 'org-heading-keyword-maybe-regexp-format)
 (defvar org-complex-heading-regexp-format nil
   "Printf format to make regexp to match an exact headline.
 This regexp will match the headline of any node which has the
@@ -4661,12 +4645,6 @@ means to push this value onto the list in the variable.")
 	    (concat "\\("
 		    (mapconcat 'regexp-quote org-not-done-keywords "\\|")
 		    "\\)")
-	    org-heading-regexp
-	    "^\\(\\*+\\)\\(?: +\\(.*?\\)\\)?[ \t]*$"
-	    org-heading-keyword-regexp-format
-	    "^\\(\\*+\\)\\(?: +%s\\)\\(?: +\\(.*?\\)\\)?[ \t]*$"
-	    org-heading-keyword-maybe-regexp-format
-	    "^\\(\\*+\\)\\(?: +%s\\)?\\(?: +\\(.*?\\)\\)?[ \t]*$"
 	    org-not-done-heading-regexp
 	    (format org-heading-keyword-regexp-format org-not-done-regexp)
 	    org-todo-line-regexp
@@ -4854,6 +4832,22 @@ This variable is set by `org-before-change-function'.
 This is similar to `org-outline-regexp' but additionally makes
 sure that we are at the beginning of the line.")
 
+(defconst org-heading-regexp "^\\(\\*+\\)\\(?: +\\(.*?\\)\\)?[ \t]*$"
+  "Matches an headline, putting stars and text into groups.
+Stars are put in group 1 and the trimmed body in group 2.")
+(defconst org-heading-keyword-regexp-format
+  "^\\(\\*+\\)\\(?: +%s\\)\\(?: +\\(.*?\\)\\)?[ \t]*$"
+  "Printf format for a regexp matching an headline with some keyword.
+This regexp will match the headline of any node which has the
+exact keyword that is put into the format.  The keyword isn't in
+any group by default, but the stars and the body are.")
+(defconst org-heading-keyword-maybe-regexp-format
+  "^\\(\\*+\\)\\(?: +%s\\)?\\(?: +\\(.*?\\)\\)?[ \t]*$"
+  "Printf format for a regexp matching an headline, possibly with some keyword.
+This regexp can match any headline with the specified keyword, or
+without a keyword.  The keyword isn't in any group by default,
+but the stars and the body are.")
+
 ;;;###autoload
 (define-derived-mode org-mode outline-mode "Org"
   "Outline-based notes management and organizer, alias
-- 
1.7.7.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: Bug: Publishing with auto-sitemap is broken [7.7 (release_7.7.497.gae02e)]
  2011-11-01 10:47     ` Nicolas Goaziou
@ 2011-11-01 11:21       ` Bernt Hansen
  2011-11-01 22:08       ` Bernt Hansen
  1 sibling, 0 replies; 7+ messages in thread
From: Bernt Hansen @ 2011-11-01 11:21 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode

Hi Nicolas,

Nicolas Goaziou <n.goaziou@gmail.com> writes:

> Bernt Hansen <bernt@norang.ca> writes:
>
>> Nicolas Goaziou <n.goaziou@gmail.com> writes:
>>
>>> Bernt Hansen <bernt@norang.ca> writes:
>>>
>>>> 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 think reverting changes on headlines in HTML and DocBook exporters is
>>> the best option for now.
>>>
>>> Does the following patch work?
>>
>> Yes, this patch works for me.
>
> Would you mind dismissing the previous patch and test the following
> instead? I think that the approach is better.

Not at all :)  I'll try this after work tonight and report back.

>
> Thank you in advance.
>

And Thank You!

Regards,
Bernt

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Bug: Publishing with auto-sitemap is broken [7.7 (release_7.7.497.gae02e)]
  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
  1 sibling, 1 reply; 7+ messages in thread
From: Bernt Hansen @ 2011-11-01 22:08 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode

Nicolas Goaziou <n.goaziou@gmail.com> writes:

> Hello,
>
> Bernt Hansen <bernt@norang.ca> writes:
>
>> Nicolas Goaziou <n.goaziou@gmail.com> writes:
>>
>>> Bernt Hansen <bernt@norang.ca> writes:
>>>
>>>> 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 think reverting changes on headlines in HTML and DocBook exporters is
>>> the best option for now.
>>>
>>> Does the following patch work?
>>
>> Yes, this patch works for me.
>
> Would you mind dismissing the previous patch and test the following
> instead? I think that the approach is better.
>
> Thank you in advance.

This patch works too - thanks!

-Bernt

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Bug: Publishing with auto-sitemap is broken [7.7 (release_7.7.497.gae02e)]
  2011-11-01 22:08       ` Bernt Hansen
@ 2011-11-02 12:01         ` Nicolas Goaziou
  0 siblings, 0 replies; 7+ messages in thread
From: Nicolas Goaziou @ 2011-11-02 12:01 UTC (permalink / raw)
  To: Bernt Hansen; +Cc: emacs-orgmode

Hello,

Bernt Hansen <bernt@norang.ca> writes:

> This patch works too

I've pushed it to master. Thanks again for reporting the problem and
testing the patches.

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-11-02 12:02 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-29 18:13 Bug: Publishing with auto-sitemap is broken [7.7 (release_7.7.497.gae02e)] Bernt Hansen
2011-10-31 19:23 ` 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

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).