From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Publish-current-file error Date: Wed, 3 Feb 2010 01:10:32 +0100 Message-ID: References: <3cbb63d01002021430l179200fei70be0d36c6bbb1cb@mail.gmail.com> <12521.1265150160@alphaville.usa.hp.com> <3cbb63d01002021447l61bb747m97af29bde7e368b5@mail.gmail.com> <12934.1265151708@alphaville.usa.hp.com> <3cbb63d01002021513s7df5589eu852d6fa0e5e3ee7b@mail.gmail.com> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NcSpL-0006e3-MY for emacs-orgmode@gnu.org; Tue, 02 Feb 2010 19:10:39 -0500 Received: from [199.232.76.173] (port=55055 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NcSpL-0006do-CT for emacs-orgmode@gnu.org; Tue, 02 Feb 2010 19:10:39 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NcSpK-0004MO-6x for emacs-orgmode@gnu.org; Tue, 02 Feb 2010 19:10:39 -0500 Received: from mail-ew0-f228.google.com ([209.85.219.228]:56455) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NcSpJ-0004M6-R3 for emacs-orgmode@gnu.org; Tue, 02 Feb 2010 19:10:38 -0500 Received: by ewy28 with SMTP id 28so752656ewy.8 for ; Tue, 02 Feb 2010 16:10:35 -0800 (PST) In-Reply-To: <3cbb63d01002021513s7df5589eu852d6fa0e5e3ee7b@mail.gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Chao Lu Cc: emacs-orgmode@gnu.org 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 > wrote: > Chao Lu 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 "") 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