* Problems with org-publish w/ #+INCLUDE:
@ 2011-10-16 11:05 daniel
2011-10-16 16:28 ` Nick Dokos
0 siblings, 1 reply; 5+ messages in thread
From: daniel @ 2011-10-16 11:05 UTC (permalink / raw
To: emacs-orgmode
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=us-ascii, Size: 5281 bytes --]
Hi!
And another problem after an upgrade vom V6.something to a 7.7
release: Org-mode version 7.7 (release_7.7.380.g54d7df). When I use the
org-publish to produce a set of HTML pages I run into a error. Here is
an example:
I have a file "index.org":
--8<--
#+TITLE: Foo!
#+AUTHOR: Daniel
#+EMAIL: daniel@monkey
#+DATE: 2011-10-14 Fr
#+INCLUDE: include.org
Export it!
--8<--
Then I have a file "include.org" with all the options etc. (option
template included via C-c C-e t):
--8<--
#+DESCRIPTION:
#+KEYWORDS:
#+LANGUAGE: en
#+OPTIONS: H:3 num:t toc:t \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t
#+OPTIONS: TeX:t LaTeX:t skip:nil d:nil todo:t pri:nil tags:not-in-toc
#+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js
#+EXPORT_SELECT_TAGS: export
#+EXPORT_EXCLUDE_TAGS: noexport
#+LINK_UP:
#+LINK_HOME:
#+XSLT:
#+BEGIN_HTML
<h1>Bar</h1>
#+END_HTML
--8<--
Then I set the org-publish-project-alist:
--8<--
(require 'org-publish)
(setq org-publish-project-alist
(list (list "foo"
:base-directory "/home/dbr/tmp/omtests"
:base-extension "org"
:publishing-directory "/home/dbr/tmp/omtests/pub"
:publishing-function 'org-publish-org-to-html)))
--8<--
Org-publish is from the 7.7 distribution directory. Then I visit
index.org and do a C-c C-e P and run in the following error:
--8<--
Debugger entered--Lisp error: (wrong-type-argument integerp nil)
lsh(nil 16)
org-publish-cache-ctime-of-src("/home/dbr/tmp/omtests/include.org\n\nExport")
org-publish-cache-file-needs-publishing("/home/dbr/tmp/omtests/index.org" "/home/dbr/tmp/omtests/pub/" org-publish-org-to-html)
org-publish-needed-p("/home/dbr/tmp/omtests/index.org" "/home/dbr/tmp/omtests/pub/" org-publish-org-to-html "/home/dbr/tmp/omtests/pub/")
org-publish-file("/home/dbr/tmp/omtests/index.org" ("foo" :base-directory "/home/dbr/tmp/omtests" :base-extension "org" :publishing-directory "/home/dbr/tmp/omtests/pub" :publishing-function org-publish-org-to-html) t)
#[(project) "\b@!\bAÇ \"Ç \"Ç \"\0\x1c \"#ÍÇ \"-\x0e\x1f \"8\x0e!\" \"\x15 \"\x1d\b\n\"#\x1e$\x15XÔ!\va\r\b\f\"#A#@$xÖ$\b#aÇ \"Ù \"!ÛÇ \"\"\b#\x1dÔ! .\v" [project project-plist exclude-regexp sitemap-p sitemap-filename sitemap-function org-publish-initialize-cache plist-get :exclude :auto-sitemap :sitemap-filename "sitemap.org" :sitemap-function org-publish-org-sitemap :sitemap-date-format :sitemap-file-entry-format :preparation-function :completion-function org-publish-get-base-files nil run-hooks preparation-function org-publish-file t :makeindex org-publish-index-generate-theindex :base-directory expand-file-name "theindex.org" completion-function org-publish-write-cache-file org-publish-sitemap-date-format org-sitemap-date-format org-publish-sitemap-file-entry-format org-sitemap-file-entry-format files file] 6](("foo" :base-directory "/home/dbr/tmp/omtests" :base-extension "org" :publishing-directory "/home/dbr/tmp/omtests/pub" :publishing-function org-publish-org-to-html))
mapc(#[(project) "\b@!\bAÇ \"Ç \"Ç \"\0\x1c \"#ÍÇ \"-\x0e\x1f \"8\x0e!\" \"\x15 \"\x1d\b\n\"#\x1e$\x15XÔ!\va\r\b\f\"#A#@$xÖ$\b#aÇ \"Ù \"!ÛÇ \"\"\b#\x1dÔ! .\v" [project project-plist exclude-regexp sitemap-p sitemap-filename sitemap-function org-publish-initialize-cache plist-get :exclude :auto-sitemap :sitemap-filename "sitemap.org" :sitemap-function org-publish-org-sitemap :sitemap-date-format :sitemap-file-entry-format :preparation-function :completion-function org-publish-get-base-files nil run-hooks preparation-function org-publish-file t :makeindex org-publish-index-generate-theindex :base-directory expand-file-name "theindex.org" completion-function org-publish-write-cache-file org-publish-sitemap-date-format org-sitemap-date-format org-publish-sitemap-file-entry-format org-sitemap-file-entry-format files file] 6] (("foo" :base-directory "/home/dbr/tmp/omtests" :base-extension "org" :publishing-directory "/home/dbr/tmp/omtests/pub" :publishing-function org-publish-org-to-html)))
org-publish-projects((("foo" :base-directory "/home/dbr/tmp/omtests" :base-extension "org" :publishing-directory "/home/dbr/tmp/omtests/pub" :publishing-function org-publish-org-to-html)))
byte-code("\b?
\0 Ä\n;\0\n\v\"C\0\nC!)" [force org-publish-use-timestamps-flag project org-publish-project-alist org-publish-projects assoc] 4)
org-publish(("foo" :base-directory "/home/dbr/tmp/omtests" :base-extension "org" :publishing-directory "/home/dbr/tmp/omtests/pub" :publishing-function org-publish-org-to-html))
byte-code("Ä \"\b?
\v \0Ç \"\n!*" [force org-publish-use-timestamps-flag project org-publish-get-project-from-filename buffer-file-name up error "File %s is not part of any known project" org-publish] 4)
org-publish-current-project(nil)
call-interactively(org-publish-current-project)
org-export(nil)
call-interactively(org-export nil nil)
--8<--
It seemed that due to the #+INCLUDE tag the
org-publish-cache-file-need-publishing gets a bit confused with the
filename and tries to call org-publish-cache-ctime-of-src with the file
name plus a string "\n\nExport" which are the next three lines of the
org file index.org.
Am I doing something wrong?
Kind regards, Daniel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Problems with org-publish w/ #+INCLUDE:
2011-10-16 11:05 Problems with org-publish w/ #+INCLUDE: daniel
@ 2011-10-16 16:28 ` Nick Dokos
2011-10-16 18:00 ` Carsten Dominik
0 siblings, 1 reply; 5+ messages in thread
From: Nick Dokos @ 2011-10-16 16:28 UTC (permalink / raw
To: daniel; +Cc: nicholas.dokos, emacs-orgmode
daniel@dbrunner.de wrote:
> Hi!
>
> And another problem after an upgrade vom V6.something to a 7.7
> release: Org-mode version 7.7 (release_7.7.380.g54d7df). When I use the
> org-publish to produce a set of HTML pages I run into a error. Here is
> an example:
>
An *exemplary* bug report: an ECM to reproduce the problem and a
backtrace - what more can one ask for? Thank you!
I could not reproduce the problem at first, but it turned out that I had
gone back to org 7.6 to test something and forgot to move forward again.
On Org-mode version 7.7 (release_7.7.349.g3d835.dirty), I can reproduce
it: the first time I publish the project I get the error. If I force
republication, the error does not arise again - I haven't looked at why
that is, but the initial failure seems to be caused by a change in the
regexp on line 1109 of org-publish.el: if you look at the argument of
org-publish-cache-ctime-of-src in the backtrace, you can see that it's
not just the #+INCLUDE: filename, but some additional lines in the
including file as well.
I haven't checked yet but it would seem that the following commit
introduced the problem:
--8<---------------cut here---------------start------------->8---
commit 920cf53e686daea4f406aa237b48fe2ef4730426
Author: Jon Anders Skorpen <jonas@ifi.uio.no>
Date: Sat Jul 16 17:22:07 2011 +0000
org-publish: Fix regexp for include files
* org-publish.el (org-publish-cache-file-needs-publishing): Regexp did
not find includes with double quoted file names.
TINYCHANGE
diff --git a/lisp/org-publish.el b/lisp/org-publish.el
index b8e932d..9654a6d 100644
--- a/lisp/org-publish.el
+++ b/lisp/org-publish.el
@@ -1108,7 +1108,7 @@ (defun org-publish-cache-file-needs-publishing (filename &optional pub-dir pub-f
(when (equal (file-name-extension filename) "org")
(find-file (expand-file-name filename))
(goto-char (point-min))
- (while (re-search-forward "^#\\+INCLUDE: \\(.+\\)[ ^\t]*$" nil t)
+ (while (re-search-forward "^#\\+INCLUDE:[ \t]+\"?\\([^ \t\"]*\\)\"?[ \t]*.*$" nil t)
(let* ((included-file (expand-file-name (match-string 1))))
(add-to-list 'included-files-ctime
(org-publish-cache-ctime-of-src included-file) t)))))
--8<---------------cut here---------------end--------------->8---
Nick
> I have a file "index.org":
>
> --8<--
> #+TITLE: Foo!
> #+AUTHOR: Daniel
> #+EMAIL: daniel@monkey
> #+DATE: 2011-10-14 Fr
> #+INCLUDE: include.org
>
> Export it!
> --8<--
>
> Then I have a file "include.org" with all the options etc. (option
> template included via C-c C-e t):
>
> --8<--
> #+DESCRIPTION:
> #+KEYWORDS:
> #+LANGUAGE: en
> #+OPTIONS: H:3 num:t toc:t \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t
> #+OPTIONS: TeX:t LaTeX:t skip:nil d:nil todo:t pri:nil tags:not-in-toc
> #+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http:/=
> /orgmode.org/org-info.js
> #+EXPORT_SELECT_TAGS: export
> #+EXPORT_EXCLUDE_TAGS: noexport
> #+LINK_UP:=20=20=20
> #+LINK_HOME:=20
> #+XSLT:
>
> #+BEGIN_HTML
> <h1>Bar</h1>
> #+END_HTML
> --8<--
>
> Then I set the org-publish-project-alist:
>
> --8<--
> (require 'org-publish)
> (setq org-publish-project-alist
> (list (list "foo"
> :base-directory "/home/dbr/tmp/omtests"
> :base-extension "org"
> :publishing-directory "/home/dbr/tmp/omtests/pub"
> :publishing-function 'org-publish-org-to-html)))
> --8<--
>
> Org-publish is from the 7.7 distribution directory. Then I visit
> index.org and do a C-c C-e P and run in the following error:
>
> --8<--
> Debugger entered--Lisp error: (wrong-type-argument integerp nil)
> lsh(nil 16)
> org-publish-cache-ctime-of-src("/home/dbr/tmp/omtests/include.org\n\nExpo=
> rt")
> org-publish-cache-file-needs-publishing("/home/dbr/tmp/omtests/index.org"=
> "/home/dbr/tmp/omtests/pub/" org-publish-org-to-html)
> org-publish-needed-p("/home/dbr/tmp/omtests/index.org" "/home/dbr/tmp/omt=
> ests/pub/" org-publish-org-to-html "/home/dbr/tmp/omtests/pub/")
> org-publish-file("/home/dbr/tmp/omtests/index.org" ("foo" :base-directory=
> "/home/dbr/tmp/omtests" :base-extension "org" :publishing-directory "/home=
> /dbr/tmp/omtests/pub" :publishing-function org-publish-org-to-html) t)
> #[(project) "\b@!=88\bA=C7 \"=C7 \"=C7 \"=86=00=1C \"=86#=CD=C7 \"=86-=0E=
> =1F \"=868=0E!\" \"=15 \"=1D\b\n\"#=1E$=15=83X=D4!=88=0B=83a=0D\b\f\"=88#=89=
> A#@=89$=83x=D6$\b#=88=82a=C7 \"=83=92=D9 \"!=88=DB=C7 \"\"\b#=88=1D=83=9B=D4!=
> =88 .=0B=87" [project project-plist exclude-regexp sitemap-p sitemap-filena=
> me sitemap-function org-publish-initialize-cache plist-get :exclude :auto-s=
> itemap :sitemap-filename "sitemap.org" :sitemap-function org-publish-org-si=
> temap :sitemap-date-format :sitemap-file-entry-format :preparation-function=
> :completion-function org-publish-get-base-files nil run-hooks preparation-=
> function org-publish-file t :makeindex org-publish-index-generate-theindex =
> :base-directory expand-file-name "theindex.org" completion-function org-pub=
> lish-write-cache-file org-publish-sitemap-date-format org-sitemap-date-form=
> at org-publish-sitemap-file-entry-format org-sitemap-file-entry-format file=
> s file] 6](("foo" :base-directory "/home/dbr/tmp/omtests" :base-extension "=
> org" :publishing-directory "/home/dbr/tmp/omtests/pub" :publishing-function=
> org-publish-org-to-html))
> mapc(#[(project) "\b@!=88\bA=C7 \"=C7 \"=C7 \"=86=00=1C \"=86#=CD=C7 \"=86-=
> =0E=1F \"=868=0E!\" \"=15 \"=1D\b\n\"#=1E$=15=83X=D4!=88=0B=83a=0D\b\f\"=88#=
> =89A#@=89$=83x=D6$\b#=88=82a=C7 \"=83=92=D9 \"!=88=DB=C7 \"\"\b#=88=1D=83=9B=
> =D4!=88 .=0B=87" [project project-plist exclude-regexp sitemap-p sitemap-fi=
> lename sitemap-function org-publish-initialize-cache plist-get :exclude :au=
> to-sitemap :sitemap-filename "sitemap.org" :sitemap-function org-publish-or=
> g-sitemap :sitemap-date-format :sitemap-file-entry-format :preparation-func=
> tion :completion-function org-publish-get-base-files nil run-hooks preparat=
> ion-function org-publish-file t :makeindex org-publish-index-generate-thein=
> dex :base-directory expand-file-name "theindex.org" completion-function org=
> -publish-write-cache-file org-publish-sitemap-date-format org-sitemap-date-=
> format org-publish-sitemap-file-entry-format org-sitemap-file-entry-format =
> files file] 6] (("foo" :base-directory "/home/dbr/tmp/omtests" :base-extens=
> ion "org" :publishing-directory "/home/dbr/tmp/omtests/pub" :publishing-fun=
> ction org-publish-org-to-html)))
> org-publish-projects((("foo" :base-directory "/home/dbr/tmp/omtests" :bas=
> e-extension "org" :publishing-directory "/home/dbr/tmp/omtests/pub" :publis=
> hing-function org-publish-org-to-html)))
> byte-code("\b?=85=00 =C4\n;=83=00\n=0B\"C=82=00\nC!)=87" [force org-publis=
> h-use-timestamps-flag project org-publish-project-alist org-publish-project=
> s assoc] 4)
> org-publish(("foo" :base-directory "/home/dbr/tmp/omtests" :base-extensio=
> n "org" :publishing-directory "/home/dbr/tmp/omtests/pub" :publishing-funct=
> ion org-publish-org-to-html))
> byte-code("=C4 \"\b?=85=0B =89=84=00=C7 \"=88\n!*=87" [force org-publish-u=
> se-timestamps-flag project org-publish-get-project-from-filename buffer-fil=
> e-name up error "File %s is not part of any known project" org-publish] 4)
> org-publish-current-project(nil)
> call-interactively(org-publish-current-project)
> org-export(nil)
> call-interactively(org-export nil nil)
> --8<--
>
> It seemed that due to the #+INCLUDE tag the
> org-publish-cache-file-need-publishing gets a bit confused with the
> filename and tries to call org-publish-cache-ctime-of-src with the file
> name plus a string "\n\nExport" which are the next three lines of the
> org file index.org.=20
>
> Am I doing something wrong?=20
>
>
> Kind regards, Daniel
>
>
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: Problems with org-publish w/ #+INCLUDE:
2011-10-16 16:28 ` Nick Dokos
@ 2011-10-16 18:00 ` Carsten Dominik
2011-10-16 19:42 ` Daniel Brunner
2011-10-16 22:20 ` Nick Dokos
0 siblings, 2 replies; 5+ messages in thread
From: Carsten Dominik @ 2011-10-16 18:00 UTC (permalink / raw
To: nicholas.dokos; +Cc: emacs-orgmode, daniel
On 16.10.2011, at 18:28, Nick Dokos wrote:
> daniel@dbrunner.de wrote:
>
>> Hi!
>>
>> And another problem after an upgrade vom V6.something to a 7.7
>> release: Org-mode version 7.7 (release_7.7.380.g54d7df). When I use the
>> org-publish to produce a set of HTML pages I run into a error. Here is
>> an example:
>>
>
> An *exemplary* bug report: an ECM to reproduce the problem and a
> backtrace - what more can one ask for? Thank you!
>
> I could not reproduce the problem at first, but it turned out that I had
> gone back to org 7.6 to test something and forgot to move forward again.
> On Org-mode version 7.7 (release_7.7.349.g3d835.dirty), I can reproduce
> it: the first time I publish the project I get the error. If I force
> republication, the error does not arise again - I haven't looked at why
> that is, but the initial failure seems to be caused by a change in the
> regexp on line 1109 of org-publish.el: if you look at the argument of
> org-publish-cache-ctime-of-src in the backtrace, you can see that it's
> not just the #+INCLUDE: filename, but some additional lines in the
> including file as well.
>
> I haven't checked yet but it would seem that the following commit
> introduced the problem:
This should be fixed now, please verify.
- Carsten
>
> --8<---------------cut here---------------start------------->8---
> commit 920cf53e686daea4f406aa237b48fe2ef4730426
> Author: Jon Anders Skorpen <jonas@ifi.uio.no>
> Date: Sat Jul 16 17:22:07 2011 +0000
>
> org-publish: Fix regexp for include files
>
> * org-publish.el (org-publish-cache-file-needs-publishing): Regexp did
> not find includes with double quoted file names.
>
> TINYCHANGE
>
> diff --git a/lisp/org-publish.el b/lisp/org-publish.el
> index b8e932d..9654a6d 100644
> --- a/lisp/org-publish.el
> +++ b/lisp/org-publish.el
> @@ -1108,7 +1108,7 @@ (defun org-publish-cache-file-needs-publishing (filename &optional pub-dir pub-f
> (when (equal (file-name-extension filename) "org")
> (find-file (expand-file-name filename))
> (goto-char (point-min))
> - (while (re-search-forward "^#\\+INCLUDE: \\(.+\\)[ ^\t]*$" nil t)
> + (while (re-search-forward "^#\\+INCLUDE:[ \t]+\"?\\([^ \t\"]*\\)\"?[ \t]*.*$" nil t)
> (let* ((included-file (expand-file-name (match-string 1))))
> (add-to-list 'included-files-ctime
> (org-publish-cache-ctime-of-src included-file) t)))))
> --8<---------------cut here---------------end--------------->8---
>
> Nick
>
>
>> I have a file "index.org":
>>
>> --8<--
>> #+TITLE: Foo!
>> #+AUTHOR: Daniel
>> #+EMAIL: daniel@monkey
>> #+DATE: 2011-10-14 Fr
>> #+INCLUDE: include.org
>>
>> Export it!
>> --8<--
>>
>> Then I have a file "include.org" with all the options etc. (option
>> template included via C-c C-e t):
>>
>> --8<--
>> #+DESCRIPTION:
>> #+KEYWORDS:
>> #+LANGUAGE: en
>> #+OPTIONS: H:3 num:t toc:t \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t
>> #+OPTIONS: TeX:t LaTeX:t skip:nil d:nil todo:t pri:nil tags:not-in-toc
>> #+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http:/=
>> /orgmode.org/org-info.js
>> #+EXPORT_SELECT_TAGS: export
>> #+EXPORT_EXCLUDE_TAGS: noexport
>> #+LINK_UP:=20=20=20
>> #+LINK_HOME:=20
>> #+XSLT:
>>
>> #+BEGIN_HTML
>> <h1>Bar</h1>
>> #+END_HTML
>> --8<--
>>
>> Then I set the org-publish-project-alist:
>>
>> --8<--
>> (require 'org-publish)
>> (setq org-publish-project-alist
>> (list (list "foo"
>> :base-directory "/home/dbr/tmp/omtests"
>> :base-extension "org"
>> :publishing-directory "/home/dbr/tmp/omtests/pub"
>> :publishing-function 'org-publish-org-to-html)))
>> --8<--
>>
>> Org-publish is from the 7.7 distribution directory. Then I visit
>> index.org and do a C-c C-e P and run in the following error:
>>
>> --8<--
>> Debugger entered--Lisp error: (wrong-type-argument integerp nil)
>> lsh(nil 16)
>> org-publish-cache-ctime-of-src("/home/dbr/tmp/omtests/include.org\n\nExpo=
>> rt")
>> org-publish-cache-file-needs-publishing("/home/dbr/tmp/omtests/index.org"=
>> "/home/dbr/tmp/omtests/pub/" org-publish-org-to-html)
>> org-publish-needed-p("/home/dbr/tmp/omtests/index.org" "/home/dbr/tmp/omt=
>> ests/pub/" org-publish-org-to-html "/home/dbr/tmp/omtests/pub/")
>> org-publish-file("/home/dbr/tmp/omtests/index.org" ("foo" :base-directory=
>> "/home/dbr/tmp/omtests" :base-extension "org" :publishing-directory "/home=
>> /dbr/tmp/omtests/pub" :publishing-function org-publish-org-to-html) t)
>> #[(project) "\b@!=88\bA=C7 \"=C7 \"=C7 \"=86=00=1C \"=86#=CD=C7 \"=86-=0E=
>> =1F \"=868=0E!\" \"=15 \"=1D\b\n\"#=1E$=15=83X=D4!=88=0B=83a=0D\b\f\"=88#=89=
>> A#@=89$=83x=D6$\b#=88=82a=C7 \"=83=92=D9 \"!=88=DB=C7 \"\"\b#=88=1D=83=9B=D4!=
>> =88 .=0B=87" [project project-plist exclude-regexp sitemap-p sitemap-filena=
>> me sitemap-function org-publish-initialize-cache plist-get :exclude :auto-s=
>> itemap :sitemap-filename "sitemap.org" :sitemap-function org-publish-org-si=
>> temap :sitemap-date-format :sitemap-file-entry-format :preparation-function=
>> :completion-function org-publish-get-base-files nil run-hooks preparation-=
>> function org-publish-file t :makeindex org-publish-index-generate-theindex =
>> :base-directory expand-file-name "theindex.org" completion-function org-pub=
>> lish-write-cache-file org-publish-sitemap-date-format org-sitemap-date-form=
>> at org-publish-sitemap-file-entry-format org-sitemap-file-entry-format file=
>> s file] 6](("foo" :base-directory "/home/dbr/tmp/omtests" :base-extension "=
>> org" :publishing-directory "/home/dbr/tmp/omtests/pub" :publishing-function=
>> org-publish-org-to-html))
>> mapc(#[(project) "\b@!=88\bA=C7 \"=C7 \"=C7 \"=86=00=1C \"=86#=CD=C7 \"=86-=
>> =0E=1F \"=868=0E!\" \"=15 \"=1D\b\n\"#=1E$=15=83X=D4!=88=0B=83a=0D\b\f\"=88#=
>> =89A#@=89$=83x=D6$\b#=88=82a=C7 \"=83=92=D9 \"!=88=DB=C7 \"\"\b#=88=1D=83=9B=
>> =D4!=88 .=0B=87" [project project-plist exclude-regexp sitemap-p sitemap-fi=
>> lename sitemap-function org-publish-initialize-cache plist-get :exclude :au=
>> to-sitemap :sitemap-filename "sitemap.org" :sitemap-function org-publish-or=
>> g-sitemap :sitemap-date-format :sitemap-file-entry-format :preparation-func=
>> tion :completion-function org-publish-get-base-files nil run-hooks preparat=
>> ion-function org-publish-file t :makeindex org-publish-index-generate-thein=
>> dex :base-directory expand-file-name "theindex.org" completion-function org=
>> -publish-write-cache-file org-publish-sitemap-date-format org-sitemap-date-=
>> format org-publish-sitemap-file-entry-format org-sitemap-file-entry-format =
>> files file] 6] (("foo" :base-directory "/home/dbr/tmp/omtests" :base-extens=
>> ion "org" :publishing-directory "/home/dbr/tmp/omtests/pub" :publishing-fun=
>> ction org-publish-org-to-html)))
>> org-publish-projects((("foo" :base-directory "/home/dbr/tmp/omtests" :bas=
>> e-extension "org" :publishing-directory "/home/dbr/tmp/omtests/pub" :publis=
>> hing-function org-publish-org-to-html)))
>> byte-code("\b?=85=00 =C4\n;=83=00\n=0B\"C=82=00\nC!)=87" [force org-publis=
>> h-use-timestamps-flag project org-publish-project-alist org-publish-project=
>> s assoc] 4)
>> org-publish(("foo" :base-directory "/home/dbr/tmp/omtests" :base-extensio=
>> n "org" :publishing-directory "/home/dbr/tmp/omtests/pub" :publishing-funct=
>> ion org-publish-org-to-html))
>> byte-code("=C4 \"\b?=85=0B =89=84=00=C7 \"=88\n!*=87" [force org-publish-u=
>> se-timestamps-flag project org-publish-get-project-from-filename buffer-fil=
>> e-name up error "File %s is not part of any known project" org-publish] 4)
>> org-publish-current-project(nil)
>> call-interactively(org-publish-current-project)
>> org-export(nil)
>> call-interactively(org-export nil nil)
>> --8<--
>>
>> It seemed that due to the #+INCLUDE tag the
>> org-publish-cache-file-need-publishing gets a bit confused with the
>> filename and tries to call org-publish-cache-ctime-of-src with the file
>> name plus a string "\n\nExport" which are the next three lines of the
>> org file index.org.=20
>>
>> Am I doing something wrong?=20
>>
>>
>> Kind regards, Daniel
>>
>>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Problems with org-publish w/ #+INCLUDE:
2011-10-16 18:00 ` Carsten Dominik
@ 2011-10-16 19:42 ` Daniel Brunner
2011-10-16 22:20 ` Nick Dokos
1 sibling, 0 replies; 5+ messages in thread
From: Daniel Brunner @ 2011-10-16 19:42 UTC (permalink / raw
To: emacs-orgmode
Carsten Dominik <carsten.dominik@gmail.com> writes:
(...)
>
> This should be fixed now, please verify.
>
> - Carsten
>
Hi,
thanks for the fast fix. I tested it with the test case and with my
working environment and the fix seems to work! Thanks a lot!
Best wishes, Daniel.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Problems with org-publish w/ #+INCLUDE:
2011-10-16 18:00 ` Carsten Dominik
2011-10-16 19:42 ` Daniel Brunner
@ 2011-10-16 22:20 ` Nick Dokos
1 sibling, 0 replies; 5+ messages in thread
From: Nick Dokos @ 2011-10-16 22:20 UTC (permalink / raw
To: Carsten Dominik; +Cc: emacs-orgmode, nicholas.dokos, daniel
Carsten Dominik <carsten.dominik@gmail.com> wrote:
> > I haven't checked yet but it would seem that the following commit
> > introduced the problem:
>
> This should be fixed now, please verify.
>
Works fine for me.
Thanks,
Nick
> - Carsten
>
> >=20
> > --8<---------------cut here---------------start------------->8---
> > commit 920cf53e686daea4f406aa237b48fe2ef4730426
> > Author: Jon Anders Skorpen <jonas@ifi.uio.no>
> > Date: Sat Jul 16 17:22:07 2011 +0000
> >=20
> > org-publish: Fix regexp for include files
> >=20
> > * org-publish.el (org-publish-cache-file-needs-publishing): Regexp =
> did
> > not find includes with double quoted file names.
> >=20
> > TINYCHANGE
> >=20
> > diff --git a/lisp/org-publish.el b/lisp/org-publish.el
> > index b8e932d..9654a6d 100644
> > --- a/lisp/org-publish.el
> > +++ b/lisp/org-publish.el
> > @@ -1108,7 +1108,7 @@ (defun org-publish-cache-file-needs-publishing =
> (filename &optional pub-dir pub-f
> > (when (equal (file-name-extension filename) "org")
> > (find-file (expand-file-name filename))
> > (goto-char (point-min))
> > - (while (re-search-forward "^#\\+INCLUDE: \\(.+\\)[ ^\t]*$" nil =
> t)
> > + (while (re-search-forward "^#\\+INCLUDE:[ \t]+\"?\\([^ =
> \t\"]*\\)\"?[ \t]*.*$" nil t)
> > (let* ((included-file (expand-file-name (match-string 1))))
> > (add-to-list 'included-files-ctime
> > (org-publish-cache-ctime-of-src included-file) =
> t)))))
> > --8<---------------cut here---------------end--------------->8---
> >=20
> > Nick
> >=20
> >=20
> >> I have a file "index.org":
> >>=20
> >> --8<--
> >> #+TITLE: Foo!
> >> #+AUTHOR: Daniel
> >> #+EMAIL: daniel@monkey
> >> #+DATE: 2011-10-14 Fr
> >> #+INCLUDE: include.org
> >>=20
> >> Export it!
> >> --8<--
> >>=20
> >> Then I have a file "include.org" with all the options etc. (option
> >> template included via C-c C-e t):
> >>=20
> >> --8<--
> >> #+DESCRIPTION:
> >> #+KEYWORDS:
> >> #+LANGUAGE: en
> >> #+OPTIONS: H:3 num:t toc:t \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t
> >> #+OPTIONS: TeX:t LaTeX:t skip:nil d:nil todo:t pri:nil =
> tags:not-in-toc
> >> #+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 =
> path:http:/=3D
> >> /orgmode.org/org-info.js
> >> #+EXPORT_SELECT_TAGS: export
> >> #+EXPORT_EXCLUDE_TAGS: noexport
> >> #+LINK_UP:=3D20=3D20=3D20
> >> #+LINK_HOME:=3D20
> >> #+XSLT:
> >>=20
> >> #+BEGIN_HTML
> >> <h1>Bar</h1>
> >> #+END_HTML
> >> --8<--
> >>=20
> >> Then I set the org-publish-project-alist:
> >>=20
> >> --8<--
> >> (require 'org-publish)
> >> (setq org-publish-project-alist
> >> (list (list "foo"
> >> :base-directory "/home/dbr/tmp/omtests"
> >> :base-extension "org"
> >> :publishing-directory "/home/dbr/tmp/omtests/pub"
> >> :publishing-function 'org-publish-org-to-html)))
> >> --8<--
> >>=20
> >> Org-publish is from the 7.7 distribution directory. Then I visit
> >> index.org and do a C-c C-e P and run in the following error:
> >>=20
> >> --8<--
> >> Debugger entered--Lisp error: (wrong-type-argument integerp nil)
> >> lsh(nil 16)
> >> =
> org-publish-cache-ctime-of-src("/home/dbr/tmp/omtests/include.org\n\nExpo=3D=
>
> >> rt")
> >> =
> org-publish-cache-file-needs-publishing("/home/dbr/tmp/omtests/index.org"=3D=
>
> >> "/home/dbr/tmp/omtests/pub/" org-publish-org-to-html)
> >> org-publish-needed-p("/home/dbr/tmp/omtests/index.org" =
> "/home/dbr/tmp/omt=3D
> >> ests/pub/" org-publish-org-to-html "/home/dbr/tmp/omtests/pub/")
> >> org-publish-file("/home/dbr/tmp/omtests/index.org" ("foo" =
> :base-directory=3D
> >> "/home/dbr/tmp/omtests" :base-extension "org" :publishing-directory =
> "/home=3D
> >> /dbr/tmp/omtests/pub" :publishing-function org-publish-org-to-html) =
> t)
> >> #[(project) "=08@!=3D88=08A=3DC7 \"=3DC7 \"=3DC7 \"=3D86=3D00=3D1C =
> \"=3D86#=3DCD=3DC7 \"=3D86-=3D0E=3D
> >> =3D1F \"=3D868=3D0E!\" \"=3D15 =
> \"=3D1D=08\n\"#=3D1E$=3D15=3D83X=3DD4!=3D88=3D0B=3D83a=3D0D=08\f\"=3D88#=3D=
> 89=3D
> >> A#@=3D89$=3D83x=3DD6$=08#=3D88=3D82a=3DC7 \"=3D83=3D92=3DD9 =
> \"!=3D88=3DDB=3DC7 \"\"=08#=3D88=3D1D=3D83=3D9B=3DD4!=3D
> >> =3D88 .=3D0B=3D87" [project project-plist exclude-regexp sitemap-p =
> sitemap-filena=3D
> >> me sitemap-function org-publish-initialize-cache plist-get :exclude =
> :auto-s=3D
> >> itemap :sitemap-filename "sitemap.org" :sitemap-function =
> org-publish-org-si=3D
> >> temap :sitemap-date-format :sitemap-file-entry-format =
> :preparation-function=3D
> >> :completion-function org-publish-get-base-files nil run-hooks =
> preparation-=3D
> >> function org-publish-file t :makeindex =
> org-publish-index-generate-theindex =3D
> >> :base-directory expand-file-name "theindex.org" completion-function =
> org-pub=3D
> >> lish-write-cache-file org-publish-sitemap-date-format =
> org-sitemap-date-form=3D
> >> at org-publish-sitemap-file-entry-format =
> org-sitemap-file-entry-format file=3D
> >> s file] 6](("foo" :base-directory "/home/dbr/tmp/omtests" =
> :base-extension "=3D
> >> org" :publishing-directory "/home/dbr/tmp/omtests/pub" =
> :publishing-function=3D
> >> org-publish-org-to-html))
> >> mapc(#[(project) "=08@!=3D88=08A=3DC7 \"=3DC7 \"=3DC7 =
> \"=3D86=3D00=3D1C \"=3D86#=3DCD=3DC7 \"=3D86-=3D
> >> =3D0E=3D1F \"=3D868=3D0E!\" \"=3D15 =
> \"=3D1D=08\n\"#=3D1E$=3D15=3D83X=3DD4!=3D88=3D0B=3D83a=3D0D=08\f\"=3D88#=3D=
>
> >> =3D89A#@=3D89$=3D83x=3DD6$=08#=3D88=3D82a=3DC7 \"=3D83=3D92=3DD9 =
> \"!=3D88=3DDB=3DC7 \"\"=08#=3D88=3D1D=3D83=3D9B=3D
> >> =3DD4!=3D88 .=3D0B=3D87" [project project-plist exclude-regexp =
> sitemap-p sitemap-fi=3D
> >> lename sitemap-function org-publish-initialize-cache plist-get =
> :exclude :au=3D
> >> to-sitemap :sitemap-filename "sitemap.org" :sitemap-function =
> org-publish-or=3D
> >> g-sitemap :sitemap-date-format :sitemap-file-entry-format =
> :preparation-func=3D
> >> tion :completion-function org-publish-get-base-files nil run-hooks =
> preparat=3D
> >> ion-function org-publish-file t :makeindex =
> org-publish-index-generate-thein=3D
> >> dex :base-directory expand-file-name "theindex.org" =
> completion-function org=3D
> >> -publish-write-cache-file org-publish-sitemap-date-format =
> org-sitemap-date-=3D
> >> format org-publish-sitemap-file-entry-format =
> org-sitemap-file-entry-format =3D
> >> files file] 6] (("foo" :base-directory "/home/dbr/tmp/omtests" =
> :base-extens=3D
> >> ion "org" :publishing-directory "/home/dbr/tmp/omtests/pub" =
> :publishing-fun=3D
> >> ction org-publish-org-to-html)))
> >> org-publish-projects((("foo" :base-directory "/home/dbr/tmp/omtests" =
> :bas=3D
> >> e-extension "org" :publishing-directory "/home/dbr/tmp/omtests/pub" =
> :publis=3D
> >> hing-function org-publish-org-to-html)))
> >> byte-code("=08?=3D85=3D00 =3DC4\n;=3D83=3D00\n=3D0B\"C=3D82=3D00\nC!=
> )=3D87" [force org-publis=3D
> >> h-use-timestamps-flag project org-publish-project-alist =
> org-publish-project=3D
> >> s assoc] 4)
> >> org-publish(("foo" :base-directory "/home/dbr/tmp/omtests" =
> :base-extensio=3D
> >> n "org" :publishing-directory "/home/dbr/tmp/omtests/pub" =
> :publishing-funct=3D
> >> ion org-publish-org-to-html))
> >> byte-code("=3DC4 \"=08?=3D85=3D0B =3D89=3D84=3D00=3DC7 =
> \"=3D88\n!*=3D87" [force org-publish-u=3D
> >> se-timestamps-flag project org-publish-get-project-from-filename =
> buffer-fil=3D
> >> e-name up error "File %s is not part of any known project" =
> org-publish] 4)
> >> org-publish-current-project(nil)
> >> call-interactively(org-publish-current-project)
> >> org-export(nil)
> >> call-interactively(org-export nil nil)
> >> --8<--
> >>=20
> >> It seemed that due to the #+INCLUDE tag the
> >> org-publish-cache-file-need-publishing gets a bit confused with the
> >> filename and tries to call org-publish-cache-ctime-of-src with the =
> file
> >> name plus a string "\n\nExport" which are the next three lines of the
> >> org file index.org.=3D20
> >>=20
> >> Am I doing something wrong?=3D20
> >>=20
> >>=20
> >> Kind regards, Daniel
> >>=20
> >>=20
> >=20
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-10-16 22:20 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-16 11:05 Problems with org-publish w/ #+INCLUDE: daniel
2011-10-16 16:28 ` Nick Dokos
2011-10-16 18:00 ` Carsten Dominik
2011-10-16 19:42 ` Daniel Brunner
2011-10-16 22:20 ` Nick Dokos
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.