emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Publish-current-file error
@ 2010-02-02 22:30 Chao Lu
       [not found] ` <12521.1265150160@alphaville.usa.hp.com>
  0 siblings, 1 reply; 5+ messages in thread
From: Chao Lu @ 2010-02-02 22:30 UTC (permalink / raw)
  To: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 360 bytes --]

Dear all,

Today I was trying to publish a single org file using
org-publish-current-file, however, org refused to do so, the error message
is

====
let*: Wrong type argument: stringp, nil
====

I believe the org-publish function work well, for I could get the
pre-defined project published smoothly. So do anyone has met similar
problem?

All the best,

Chao

[-- Attachment #1.2: Type: text/html, Size: 406 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

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

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

* Re: Publish-current-file error
       [not found] ` <12521.1265150160@alphaville.usa.hp.com>
@ 2010-02-02 22:47   ` Chao Lu
       [not found]     ` <12934.1265151708@alphaville.usa.hp.com>
  0 siblings, 1 reply; 5+ messages in thread
From: Chao Lu @ 2010-02-02 22:47 UTC (permalink / raw)
  To: nicholas.dokos; +Cc: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 7010 bytes --]

Hey nick,

My Emacs is GNU Emacs 23.1.90.1 (i386-mingw-nt5.1.2600).
Org: Org-mode version 6.34c.

I just start a new org file, say, PHY.org, type very simple words, then
tried
M-x org-publish-current-file.

The *backtrace* tells:
--------
Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  file-name-as-directory(nil)
  (let* ((project-plist ...) (base-dir ...) (include-list ...) (recurse ...)
(extension ...) (match ...)) (setq org-publish-temp-files nil)
(org-publish-get-base-files-1 base-dir recurse match exclude-regexp
exclude-regexp) (mapc (lambda ... ...) include-list) org-publish-temp-files)
  org-publish-get-base-files(("options" :section-numbers nil
:table-of-contents nil :style "<script
type=\"text/javascript\">\n                /* <![CDATA[ */\n
org_html_manager.set(" TOC ", 1);\n                org_html_manager.set("
LOCAL_TOC ", 1);\n                org_html_manager.set(" VIEW_BUTTONS ", "
true ");\n                org_html_manager.set(" MOUSE_HINT ", " underline
"); // or background-color like '#eeeeee'\n
org_html_manager.setup ();\n                /* ]]> */\n
</script>") nil)
  (and p (org-publish-get-base-files p exclude))
  (let* ((exclude ...) (files ...)) (mapc (lambda ... ...) files))
  (lambda (p) (let* (... ...) (mapc ... files)))(("options" :section-numbers
nil :table-of-contents nil :style "<script
type=\"text/javascript\">\n                /* <![CDATA[ */\n
org_html_manager.set(" TOC ", 1);\n                org_html_manager.set("
LOCAL_TOC ", 1);\n                org_html_manager.set(" VIEW_BUTTONS ", "
true ");\n                org_html_manager.set(" MOUSE_HINT ", " underline
"); // or background-color like '#eeeeee'\n
org_html_manager.setup ();\n                /* ]]> */\n
</script>"))
  mapc((lambda (p) (let* (... ...) (mapc ... files))) (("org-notes"
:base-directory "~/.emacs.d/org/org/" :base-extension "org" :recursive t
:publishing-function org-publish-org-to-html :publishing-directory
"~/.emacs.d/org/public_html/" :headline-levels 4 :footnotes t :language
"utf-8" :auto-index t :index-filename "index.org" :index-title "LooChao's
Homepage" :auto-preamble t :auto-postamble t :postamble "<div
id='hosted'>\n<table>\n<tr>\n<td><a
href='http://www.gnu.org/software/emacs/'><img
src='./theme/emacs-logo.png' alt='Emacs' title ='Powered by GNU/Emacs'
style='width:30px;'/></a></td>\n<td><a href='http://orgmode.org/'><img
src='./theme/org-logo-unicorn.png' alt='Org' title='Powered by Emacs
Org-mode'  style='width:30px;'/></a></td>\n<td><a href='
http://www.princeton.edu'><img src='./theme/PUTiger-logo.gif'
alt='Princeton' title='Hosted by Princeton'
style='width:30px;'/></a></td>\n</tr>\n</table>\n</div>" :style "<link
rel=\"stylesheet\" href=\"./theme/org.css\"  type=\"text/css\">
</link>\n         <script type=\"text/javascript\"
src=\"theme/org-info.js\"></script>\n     <script type=\"text/javascript\"
src=\"http://orgmode.org/org-info.js\"></script>") ("org-static"
:base-directory "~/.emacs.d/org/org/" :base-extension
"css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf" :publishing-directory
"~/.emacs.d/org/public_html/" :recursive t :publishing-function
org-publish-attachment) ("options" :section-numbers nil :table-of-contents
nil :style "<script type=\"text/javascript\">\n                /* <![CDATA[
*/\n                org_html_manager.set(" TOC ", 1);\n
org_html_manager.set(" LOCAL_TOC ", 1);\n
org_html_manager.set(" VIEW_BUTTONS ", " true ");\n
org_html_manager.set(" MOUSE_HINT ", " underline "); // or background-color
like '#eeeeee'\n                org_html_manager.setup ();\n
/* ]]> */\n                </script>")))
  (let (all-files) (mapc (lambda ... ...) (org-publish-expand-projects
projects-alist)) all-files)
  org-publish-get-files((("org-notes" :base-directory "~/.emacs.d/org/org/"
:base-extension "org" :recursive t :publishing-function
org-publish-org-to-html :publishing-directory "~/.emacs.d/org/public_html/"
:headline-levels 4 :footnotes t :language "utf-8" :auto-index t
:index-filename "index.org" :index-title "LooChao's Homepage" :auto-preamble
t :auto-postamble t :postamble "<div id='hosted'>\n<table>\n<tr>\n<td><a
href='http://www.gnu.org/software/emacs/'><img src='./theme/emacs-logo.png'
alt='Emacs' title ='Powered by GNU/Emacs'
style='width:30px;'/></a></td>\n<td><a href='http://orgmode.org/'><img
src='./theme/org-logo-unicorn.png' alt='Org' title='Powered by Emacs
Org-mode'  style='width:30px;'/></a></td>\n<td><a href='
http://www.princeton.edu'><img src='./theme/PUTiger-logo.gif'
alt='Princeton' title='Hosted by Princeton'
style='width:30px;'/></a></td>\n</tr>\n</table>\n</div>" :style "<link
rel=\"stylesheet\" href=\"./theme/org.css\"  type=\"text/css\">
</link>\n         <script type=\"text/javascript\"
src=\"theme/org-info.js\"></script>\n     <script type=\"text/javascript\"
src=\"http://orgmode.org/org-info.js\"></script>") ("org-static"
:base-directory "~/.emacs.d/org/org/" :base-extension
"css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf" :publishing-directory
"~/.emacs.d/org/public_html/" :recursive t :publishing-function
org-publish-attachment) ("org" :components ("org-notes" "org-static"))
("options" :section-numbers nil :table-of-contents nil :style "<script
type=\"text/javascript\">\n                /* <![CDATA[ */\n
org_html_manager.set(" TOC ", 1);\n                org_html_manager.set("
LOCAL_TOC ", 1);\n                org_html_manager.set(" VIEW_BUTTONS ", "
true ");\n                org_html_manager.set(" MOUSE_HINT ", " underline
"); // or background-color like '#eeeeee'\n
org_html_manager.setup ();\n                /* ]]> */\n
</script>")))
  (setq org-publish-files-alist (org-publish-get-files
org-publish-project-alist))
  (progn (setq org-publish-files-alist (org-publish-get-files
org-publish-project-alist)))
  (if (or refresh (not org-publish-files-alist)) (progn (setq
org-publish-files-alist ...)))
  (when (or refresh (not org-publish-files-alist)) (setq
org-publish-files-alist (org-publish-get-files org-publish-project-alist)))
  org-publish-initialize-files-alist()
  org-publish-current-file(nil)
  call-interactively(org-publish-current-file t nil)
  execute-extended-command(nil)
  call-interactively(execute-extended-command nil nil)
----------------------

Anything else I could do?

Thanks a lot,

Chao

On Tue, Feb 2, 2010 at 5:36 PM, Nick Dokos <nicholas.dokos@hp.com> wrote:

> Chao Lu <loochao@gmail.com> wrote:
>
>
> > Today I was trying to publish a single org file using
> > org-publish-current-file, however, org refused to do so, the error
> message
> > is
> >
> > ====
> > let*: Wrong type argument: stringp, nil
> > ====
> >
> > I believe the org-publish function work well, for I could get the
> > pre-defined project published smoothly. So do anyone has met similar
> > problem?
> >
>
> Please set debug-on-error to t and after recreating the error, post the
> resulting backtrace. See the "Feedback" section of the Org manual for more
> details on how to report problems.
>
> HTH,
> Nick
>

[-- Attachment #1.2: Type: text/html, Size: 9718 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

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

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

* Re: Publish-current-file error
       [not found]     ` <12934.1265151708@alphaville.usa.hp.com>
@ 2010-02-02 23:13       ` Chao Lu
  2010-02-02 23:38         ` Nick Dokos
  2010-02-03  0:10         ` Carsten Dominik
  0 siblings, 2 replies; 5+ messages in thread
From: Chao Lu @ 2010-02-02 23:13 UTC (permalink / raw)
  To: nicholas.dokos; +Cc: emacs-orgmode, Carsten Dominik


[-- Attachment #1.1: Type: text/plain, Size: 3000 bytes --]

Hey Nick,

Thanks a lot for your detailed explanation, now I'm pretty clear about the
error. But I just get the idea why we could not publish arbitrary org file
as html to current directory, I guess it could be kind of troublesome that
every time to set up the project first?

What do you think?

Chao

On Tue, Feb 2, 2010 at 6:01 PM, Nick Dokos <nicholas.dokos@hp.com> wrote:

> Chao Lu <loochao@gmail.com> wrote:
>
> > I just start a new org file, say, PHY.org, type very simple words, then
> > tried
> > M-x org-publish-current-file.
> >
> > The *backtrace* tells:
> > --------
> > Debugger entered--Lisp error: (wrong-type-argument stringp nil)
> >   file-name-as-directory(nil)
>
> ... and as you can see, the problem is that file-name-as-directory is
> called
> with a nil argument, whereas it expects a string.
>
> >   (let* ((project-plist ...) (base-dir ...) (include-list ...) (recurse
> ...)
> > (extension ...) (match ...)) (setq org-publish-temp-files nil)
> > (org-publish-get-base-files-1 base-dir recurse match exclude-regexp
> > exclude-regexp) (mapc (lambda ... ...) include-list)
> org-publish-temp-files)
>
> >   org-publish-get-base-files(("options" :section-numbers nil
> > :table-of-contents nil :style "<script
> > type=\"text/javascript\">\n                /* <![CDATA[ */\n
> > org_html_manager.set(" TOC ", 1);\n                org_html_manager.set("
> > LOCAL_TOC ", 1);\n                org_html_manager.set(" VIEW_BUTTONS ",
> "
> > true ");\n                org_html_manager.set(" MOUSE_HINT ", "
> underline
> > "); // or background-color like '#eeeeee'\n
> > org_html_manager.setup ();\n                /* ]]> */\n
> > </script>") nil)
>
> ... and this tells us that org-publish-get-base-files got called and
> somewhere in the execution of the let* form, it got the error.
> So you look at that let* form in org-publish-get-base-files and you
> see this:
>
>  (let* ((project-plist (cdr project))
>         (base-dir (file-name-as-directory
>                    (plist-get project-plist :base-directory)))
>         ...
>
> which tells me that you *have* to have a project-plist and it *has*
> to have a :base-directory property in order to be able to publish.
> You just cannot take an arbitrary org file and publish it without
> providing the publishing framework for it.
>
> HTH,
> Nick
>
>
> > >
> > > > Today I was trying to publish a single org file using
> > > > org-publish-current-file, however, org refused to do so, the error
> > > message
> > > > is
> > > >
> > > > ====
> > > > let*: Wrong type argument: stringp, nil
> > > > ====
> > > >
> > > > I believe the org-publish function work well, for I could get the
> > > > pre-defined project published smoothly. So do anyone has met similar
> > > > problem?
> > > >
> > >
> > > Please set debug-on-error to t and after recreating the error, post the
> > > resulting backtrace. See the "Feedback" section of the Org manual for
> more
> > > details on how to report problems.
> > >
> > > HTH,
> > > Nick
>

[-- Attachment #1.2: Type: text/html, Size: 4032 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

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

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

* Re: Publish-current-file error
  2010-02-02 23:13       ` Chao Lu
@ 2010-02-02 23:38         ` Nick Dokos
  2010-02-03  0:10         ` Carsten Dominik
  1 sibling, 0 replies; 5+ messages in thread
From: Nick Dokos @ 2010-02-02 23:38 UTC (permalink / raw)
  To: Chao Lu; +Cc: emacs-orgmode, Carsten Dominik

Chao Lu <loochao@gmail.com> wrote:

> Thanks a lot for your detailed explanation, now I'm pretty clear about the
> error. But I just get the idea why we could not publish arbitrary org file
> as html to current directory, I guess it could be kind of troublesome that
> every time to set up the project first?
> 
> What do you think?
> 

Assuming you do a good job of implementing it, Carsten will happily
accept patches. :-)

Cheers,
Nick

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

* Re: Publish-current-file error
  2010-02-02 23:13       ` Chao Lu
  2010-02-02 23:38         ` Nick Dokos
@ 2010-02-03  0:10         ` Carsten Dominik
  1 sibling, 0 replies; 5+ messages in thread
From: Carsten Dominik @ 2010-02-03  0:10 UTC (permalink / raw)
  To: Chao Lu; +Cc: emacs-orgmode


On Feb 3, 2010, at 12:13 AM, Chao Lu wrote:

> Hey Nick,
>
> Thanks a lot for your detailed explanation, now I'm pretty clear  
> about the error. But I just get the idea why we could not publish  
> arbitrary org file as html to current directory, I guess it could be  
> kind of troublesome that every time to set up the project first?

That process is called "exporting", not "publishing", it needs no  
further
setup and is described in the manual.

- Carsten

>
> What do you think?
>
> Chao
>
> On Tue, Feb 2, 2010 at 6:01 PM, Nick Dokos <nicholas.dokos@hp.com>  
> wrote:
> Chao Lu <loochao@gmail.com> wrote:
>
> > I just start a new org file, say, PHY.org, type very simple words,  
> then
> > tried
> > M-x org-publish-current-file.
> >
> > The *backtrace* tells:
> > --------
> > Debugger entered--Lisp error: (wrong-type-argument stringp nil)
> >   file-name-as-directory(nil)
>
> ... and as you can see, the problem is that file-name-as-directory  
> is called
> with a nil argument, whereas it expects a string.
>
> >   (let* ((project-plist ...) (base-dir ...) (include-list ...)  
> (recurse ...)
> > (extension ...) (match ...)) (setq org-publish-temp-files nil)
> > (org-publish-get-base-files-1 base-dir recurse match exclude-regexp
> > exclude-regexp) (mapc (lambda ... ...) include-list) org-publish- 
> temp-files)
>
> >   org-publish-get-base-files(("options" :section-numbers nil
> > :table-of-contents nil :style "<script
> > type=\"text/javascript\">\n                /* <![CDATA[ */\n
> > org_html_manager.set(" TOC ", 1);\n                 
> org_html_manager.set("
> > LOCAL_TOC ", 1);\n                org_html_manager.set("  
> VIEW_BUTTONS ", "
> > true ");\n                org_html_manager.set(" MOUSE_HINT ", "  
> underline
> > "); // or background-color like '#eeeeee'\n
> > org_html_manager.setup ();\n                /* ]]> */\n
> > </script>") nil)
>
> ... and this tells us that org-publish-get-base-files got called and
> somewhere in the execution of the let* form, it got the error.
> So you look at that let* form in org-publish-get-base-files and you
> see this:
>
>  (let* ((project-plist (cdr project))
>         (base-dir (file-name-as-directory
>                    (plist-get project-plist :base-directory)))
>         ...
>
> which tells me that you *have* to have a project-plist and it *has*
> to have a :base-directory property in order to be able to publish.
> You just cannot take an arbitrary org file and publish it without
> providing the publishing framework for it.
>
> HTH,
> Nick
>
>
> > >
> > > > Today I was trying to publish a single org file using
> > > > org-publish-current-file, however, org refused to do so, the  
> error
> > > message
> > > > is
> > > >
> > > > ====
> > > > let*: Wrong type argument: stringp, nil
> > > > ====
> > > >
> > > > I believe the org-publish function work well, for I could get  
> the
> > > > pre-defined project published smoothly. So do anyone has met  
> similar
> > > > problem?
> > > >
> > >
> > > Please set debug-on-error to t and after recreating the error,  
> post the
> > > resulting backtrace. See the "Feedback" section of the Org  
> manual for more
> > > details on how to report problems.
> > >
> > > HTH,
> > > Nick
>

- Carsten

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

end of thread, other threads:[~2010-02-03  0:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-02 22:30 Publish-current-file error Chao Lu
     [not found] ` <12521.1265150160@alphaville.usa.hp.com>
2010-02-02 22:47   ` Chao Lu
     [not found]     ` <12934.1265151708@alphaville.usa.hp.com>
2010-02-02 23:13       ` Chao Lu
2010-02-02 23:38         ` Nick Dokos
2010-02-03  0:10         ` Carsten Dominik

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