From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sebastian Rose Subject: Re: possible Bug: non-interactive publishing (emacs 22.1) Date: Wed, 09 Jun 2010 23:22:50 +0200 Message-ID: <87fx0vsxxx.fsf@gmx.de> References: <20100609152120.2ab7l1te884sw8ww@webmail.dds.nl> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from [140.186.70.92] (port=50413 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OMSjl-00019x-VD for emacs-orgmode@gnu.org; Wed, 09 Jun 2010 17:23:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OMSjk-0005NF-I4 for emacs-orgmode@gnu.org; Wed, 09 Jun 2010 17:23:01 -0400 Received: from mail.gmx.net ([213.165.64.20]:54480) by eggs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1OMSjk-0005Ms-73 for emacs-orgmode@gnu.org; Wed, 09 Jun 2010 17:23:00 -0400 In-Reply-To: <20100609152120.2ab7l1te884sw8ww@webmail.dds.nl> (orgmode@h-rd.org's message of "Wed, 09 Jun 2010 15:21:20 +0200") 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: "orgmode@h-rd.org" Cc: emacs-orgmode@gnu.org --=-=-= "orgmode@h-rd.org" writes: > Hi Carsten, > > when using org to publish non-interactively under 22.3.1 I get sometimes an > error, depending on which publishing function I call. This does not happen > during interactive calling of the publishing function (i.e. M-x org-publish ). > > no error: > emacs -q -batch -l ../org-init.el --eval='(org-publish-all)' > > with error: > emacs -q -batch -l ../org-init.el --eval='(org-publish "h-rd.org" t)' > > (obviously the project h-rd.org exists, and is published without error and all > components from org-publish-all) > error message: > > Starting emacs > Loading subst-ksc... > Loading subst-gb2312... > Loading subst-big5... > Loading subst-jis... > Debugger entered--Lisp error: (wrong-type-argument listp "h-rd.org") > cdr("h-rd.org") > (plist-get (cdr p) :components) > (setq components (plist-get (cdr p) :components)) > (if (setq components (plist-get ... :components)) (setq rest (append > ... rest) ) (push p > rtn)) > (while (setq p (pop rest)) (if (setq components ...) (setq rest ...) (push p > r tn))) > (let ((rest projects-alist) rtn p components) (while (setq p ...) (if ... ... > ...)) (nreverse (org-publish-delete-dups ...))) > org-publish-expand-projects(("h-rd.org")) > (mapc (lambda (project) (let* ... ... ... ... ... ...)) > (org-publish-expand-pr > ojects projects)) > org-publish-projects(("h-rd.org")) > (let* ((org-publish-use-timestamps-flag ...)) (org-publish-projects (list > proj ect))) > (save-window-excursion (let* (...) (org-publish-projects ...))) > org-publish("h-rd.org" t) > eval((org-publish "h-rd.org" t)) > command-line-1(("-l" "../org-init.el" "--eval=(org-publish \"h-rd.org\" t)")) > command-line() > normal-top-level() > > emacs finished > > > greetings. And here is a fix for publishing in batch-mode. Please test. It works here, but I use emacs 24 only currently... --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=org-publish-batch-mode.patch diff --git a/lisp/org-publish.el b/lisp/org-publish.el index fc18a9a..3f24863 100644 --- a/lisp/org-publish.el +++ b/lisp/org-publish.el @@ -756,7 +756,12 @@ Default for SITEMAP-FILENAME is 'sitemap.org'." (save-window-excursion (let* ((org-publish-use-timestamps-flag (if force nil org-publish-use-timestamps-flag))) - (org-publish-projects (list project))))) + (org-publish-projects + (if (stringp project) + ;; If this function is called in batch mode, + ;; project is still a string here. + (list (assoc project org-publish-project-alist)) + (list project)))))) ;;;###autoload (defun org-publish-all (&optional force) --=-=-= Best wishes Sebastian --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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 --=-=-=--