emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Error when publishing to HTML
@ 2011-02-17 20:33 Sébastien Vauban
  2011-02-18 10:02 ` Manuel Giraud
  0 siblings, 1 reply; 3+ messages in thread
From: Sébastien Vauban @ 2011-02-17 20:33 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hello,

I've got a couple of files located at `~/src/web-in-org/org/'. They make part
of the following project:

#+begin_src emacs-lisp
(add-to-list 'org-publish-project-alist
             '(("orgfiles"
                :base-directory "~/src/web-in-org/org/"
                :base-extension "org"
                :publishing-directory "~/src/web-in-org/public_html/"
                :publishing-function org-publish-org-to-html
                :section-numbers nil
                :table-of-contents nil
                :auto-sitemap t
                :sitemap-title "Sitemap"
                :style "<link rel=\"stylesheet\" href=\"css/worg.css\" type=\"text/css\"/>")
               ("css"
                :base-directory "~/src/web-in-org/org/css/"
                :base-extension "css"
                :publishing-directory "~/src/web-in-org/public_html/css/"
                :publishing-function org-publish-attachment)
               ("mysite"
                :components ("orgfiles" "css"))))
#+end_src

`org-publish-project-alist' being nil before this, the above is its final
value as well.

Though, when publishing that project (with `C-c C-e P') from any Org file
located in that directory, I now have:

--8<---------------cut here---------------start------------->8---
Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  file-name-as-directory(nil)
  (expand-file-name (file-name-as-directory (plist-get ... :base-directory)))
  (let* ((r ...) (b ...) (x ...) (e ...) (i ...) (xm ...)) (when (or ... ...) (setq project-name ...) (throw ... project-name)))
  (if (plist-get (cdr prj) :components) nil (let* (... ... ... ... ... ...) (when ... ... ...)))
  (unless (plist-get (cdr prj) :components) (let* (... ... ... ... ... ...) (when ... ... ...)))
  (while --cl-dolist-temp-- (setq prj (car --cl-dolist-temp--)) (unless (plist-get ... :components) (let* ... ...)) (setq --cl-dolist-temp-- (cdr --cl-dolist-temp--)))
  (let ((--cl-dolist-temp-- org-publish-project-alist) prj) (while --cl-dolist-temp-- (setq prj ...) (unless ... ...) (setq --cl-dolist-temp-- ...)) nil)
  (catch (quote --cl-block-nil--) (let (... prj) (while --cl-dolist-temp-- ... ... ...) nil))
  (cl-block-wrapper (catch (quote --cl-block-nil--) (let ... ... nil)))
  (block nil (let (... prj) (while --cl-dolist-temp-- ... ... ...) nil))
  (dolist (prj org-publish-project-alist) (unless (plist-get ... :components) (let* ... ...)))
  (catch (quote p-found) (dolist (prj org-publish-project-alist) (unless ... ...)))
  (let* ((filename ...) project-name) (catch (quote p-found) (dolist ... ...)) (when up (dolist ... ...)) (assoc project-name org-publish-project-alist))
  org-publish-get-project-from-filename("c:/home/sva/src/web-in-org/org/org-mode.org" up)
  (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)
  call-interactively(org-publish-current-project)
  (if (and bg (nth 2 ass) (not ...) (not ...)) (let (...) (set-process-sentinel p ...) (message "Background process \"%s\": started" p)) (if subtree-p (progn ... ...)) (call-interactively (nth 1 ass)) (when (and bpos ...) (let ... ... ... ... ...)))
  (let* ((bg ...) (subtree-p ...) (help "[t]   insert the export option template\n[v]   limit export to visible part of outline tree\n[1]   switch buffer/subtree export\n[SPC] publish enclosing subtree (with LaTeX_CLASS or EXPORT_FILE_NAME prop)\n\n[a/n/u] export as ASCII/Latin-1/UTF-8         [A/N/U] to temporary buffer\n\n[h] export as HTML      [H] to temporary buffer   [R] export region\n[b] export as HTML and open in browser\n\n[l] export as LaTeX     [L] to temporary buffer\n[p] export as LaTeX and process to PDF            [d] ... and open PDF file\n\n[D] export as DocBook   [V] export as DocBook, process to PDF, and open\n\n[j] export as TaskJuggler                         [J] ... and open\n\n[m] export as Freemind mind map\n[x] export as XOXO\n[g] export using Wes Hardaker's generic exporter\n\n[i] export current file as iCalendar file\n[I] export all agenda files as iCalendar files   [c] ...as one combined file\n\n[F] publish current file          [P] publish current project\n[X] publish a project...          [E] publish every projects") (cmds ...) r1 r2 ass (cpos ...) (cbuf ...) bpos) (save-excursion (save-window-excursion ... ... ... ... ... ...)) (redisplay) (and bpos (goto-char bpos)) (setq r2 (if ... ... r1)) (unless (setq ass ...) (error "No command associated with key %c" r1)) (if (and bg ... ... ...) (let ... ... ...) (if subtree-p ...) (call-interactively ...) (when ... ...)))
  org-export(nil)
  call-interactively(org-export nil nil)
--8<---------------cut here---------------end--------------->8---

I see it's located at line 520 of org-publish.el, but I don't understand the
above error. Any hint?

Side question: I thought I could eval a lot on the backtrace itself. But, in
the above, I only can "read" the value of `prj' on the 4th line of the
backtrace (for info, yes, it is equal to the above value of
`org-publish-project-alist'). I can't eval expressions such as `(plist-get
... :base-directory)' because of the 3 dots inside it. Or can I somehow?

Best regards,
  Seb

-- 
Sébastien Vauban


_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode-mXXj517/zsQ@public.gmane.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: Error when publishing to HTML
  2011-02-17 20:33 Error when publishing to HTML Sébastien Vauban
@ 2011-02-18 10:02 ` Manuel Giraud
  2011-02-18 10:32   ` Sébastien Vauban
  0 siblings, 1 reply; 3+ messages in thread
From: Manuel Giraud @ 2011-02-18 10:02 UTC (permalink / raw)
  To: Sébastien Vauban; +Cc: emacs-orgmode

Sébastien Vauban <wxhgmqzgwmuf@spammotel.com> writes:

> #+begin_src emacs-lisp
> (add-to-list 'org-publish-project-alist
>              '(("orgfiles"
>                 :base-directory "~/src/web-in-org/org/"
>                 :base-extension "org"
>                 :publishing-directory "~/src/web-in-org/public_html/"
>                 :publishing-function org-publish-org-to-html
>                 :section-numbers nil
>                 :table-of-contents nil
>                 :auto-sitemap t
>                 :sitemap-title "Sitemap"
>                 :style "<link rel=\"stylesheet\" href=\"css/worg.css\" type=\"text/css\"/>")
>                ("css"
>                 :base-directory "~/src/web-in-org/org/css/"
>                 :base-extension "css"
>                 :publishing-directory "~/src/web-in-org/public_html/css/"
>                 :publishing-function org-publish-attachment)
>                ("mysite"
>                 :components ("orgfiles" "css"))))
> #+end_src

Ok, I think I found your problem here: your add-to-list create a too
much nested list here. You could either do:

#+begin_src emacs-lisp
(setq org-publish-project-alist nil)
(add-to-list 'org-publish-project-alist
             '("orgfiles"
                :base-directory "~/src/web-in-org/org/"
                :base-extension "org"
                :publishing-directory "~/src/web-in-org/public_html/"
                :publishing-function org-publish-org-to-html
                :section-numbers nil
                :table-of-contents nil
                :auto-sitemap t
                :sitemap-title "Sitemap"
                :style "<link rel=\"stylesheet\" href=\"css/worg.css\" type=\"text/css\"/>"))

(add-to-list 'org-publish-project-alist
             '("css"
                :base-directory "~/src/web-in-org/org/css/"
                :base-extension "css"
                :publishing-directory "~/src/web-in-org/public_html/css/"
                :publishing-function org-publish-attachment))

(add-to-list  'org-publish-project-alist
              '("mysite"
                :components ("orgfiles" "css"))
#+end_src

or (as shown in documentation examples):

#+begin_src emacs-lisp
(setq org-publish-project-alist
             '(("orgfiles"
                :base-directory "~/src/web-in-org/org/"
                :base-extension "org"
                :publishing-directory "~/src/web-in-org/public_html/"
                :publishing-function org-publish-org-to-html
                :section-numbers nil
                :table-of-contents nil
                :auto-sitemap t
                :sitemap-title "Sitemap"
                :style "<link rel=\"stylesheet\" href=\"css/worg.css\" type=\"text/css\"/>")
               ("css"
                :base-directory "~/src/web-in-org/org/css/"
                :base-extension "css"
                :publishing-directory "~/src/web-in-org/public_html/css/"
                :publishing-function org-publish-attachment)
               ("mysite"
                :components ("orgfiles" "css"))))
#+end_src

Best regards,
-- 
Manuel Giraud

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

* Re: Error when publishing to HTML
  2011-02-18 10:02 ` Manuel Giraud
@ 2011-02-18 10:32   ` Sébastien Vauban
  0 siblings, 0 replies; 3+ messages in thread
From: Sébastien Vauban @ 2011-02-18 10:32 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hi Manuel,

Manuel Giraud wrote:
> Sébastien Vauban <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org> writes:
>> #+begin_src emacs-lisp
>> (add-to-list 'org-publish-project-alist
>>              '(("orgfiles"
>>                 :base-directory "~/src/web-in-org/org/"
>>                 :base-extension "org"
>>                 :publishing-directory "~/src/web-in-org/public_html/"
>>                 :publishing-function org-publish-org-to-html
>>                 :section-numbers nil
>>                 :table-of-contents nil
>>                 :auto-sitemap t
>>                 :sitemap-title "Sitemap"
>>                 :style "<link rel=\"stylesheet\" href=\"css/worg.css\" type=\"text/css\"/>")
>>                ("css"
>>                 :base-directory "~/src/web-in-org/org/css/"
>>                 :base-extension "css"
>>                 :publishing-directory "~/src/web-in-org/public_html/css/"
>>                 :publishing-function org-publish-attachment)
>>                ("mysite"
>>                 :components ("orgfiles" "css"))))
>> #+end_src
>
> Ok, I think I found your problem here: your add-to-list create a too much
> nested list here.

That was it. THANKS A LOT for your (successful) investigation...

Stupid of me... OK, that's an easy mistake to make. BTW, would you see a
better report mechanism in such cases? I definitely won't be the only one to
make it.

Best regards,
  Seb

-- 
Sébastien Vauban


_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode-mXXj517/zsQ@public.gmane.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

end of thread, other threads:[~2011-02-18 10:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-17 20:33 Error when publishing to HTML Sébastien Vauban
2011-02-18 10:02 ` Manuel Giraud
2011-02-18 10:32   ` Sébastien Vauban

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