From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?S=C3=A9bastien_Vauban?= Subject: Re: wrong-type-argument when publishing to HTML Date: Thu, 03 Sep 2009 10:43:55 +0200 Message-ID: <87my5cquyc.fsf@mundaneum.com> References: <87ab1dk1vd.fsf@mundaneum.com> <74559A82-3F03-49B6-AA50-282D9D9542BF@gmail.com> <873a74sb03.fsf@mundaneum.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: 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-mXXj517/zsQ@public.gmane.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org To: emacs-orgmode-mXXj517/zsQ@public.gmane.org Hi Carsten, Carsten Dominik wrote: > On Sep 3, 2009, at 10:11 AM, S=C3=A9bastien Vauban wrote: >> Carsten Dominik wrote: >>> On Sep 2, 2009, at 1:44 PM, S=C3=A9bastien Vauban wrote: >>> >>>> A colleague of mine gets the error `(wrong-type-argument stringp nil)' >>>> when executing the command (from a script, under Ubuntu and Emacs 22.2= .1 >>>> with Org-mode 6.29c): >>>> >>>> --8<---------------cut here---------------start------------->8--- >>>> emacs --batch \ >>>> --load ./Org2HTML.el \ >>>> --visit=3Dagile-software-development.org \ >>>> --funcall org-publish-current-file >>>> --8<---------------cut here---------------end--------------->8--- >>>> >>>> Here is the contents of Org2HTML.el: >>>> >>>> --8<---------------cut here---------------start------------->8--- >>>> ;; Org-mode >>>> (require 'org) >>>> >>>> ;; publish related Org-mode files as a website >>>> (require 'org-publish) >>>> >>>> ;; association list to control publishing behavior >>>> (setq org-publish-project-alist >>>> '(("Project" >>>> :base-directory "./" >>>> :recursive t >>>> :publishing-directory "../public_html/" >>>> :base-extension "org" >>>> :publishing-function org-publish-org-to-html >>>> [...] >>>> ))) >>>> --8<---------------cut here---------------end--------------->8--- >>> >>> This looks to me as if the the file being published is not in org- mode. >>> So my first guess would be that Org2HTML.el misses the following line: >>> >>> (add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode)) >>> >>> Remember that --batch processing implies -q, i.e. the .emacs file will = not >>> be evalated. >> >> I knew that, but I thought that >> >> --8<---------------cut here---------------start------------->8--- >> ;; Org-mode >> (require 'org) >> --8<---------------cut here---------------end--------------->8--- >> >> would add the association `.org' in `auto-mode-alist' on its own. > > No, this is, I think, against Emacs conventions, because it would overrule > user setup - some people might want to use .org for a different purpose. Can you really imagine that? ;-) OK. I was totally unaware of this fact, that we had to do such an associati= on (between the `.org' extension and the Org-mode) "manually" ... > In Emacs 23, the default value for auto-mode-alist contains the regexp for > org-mode, but I guess you are not running 23 in this case. ... or had to use Emacs 23 -- what I'm doing for a long while already, but = not my colleague (still using Emacs 22). Well seen! >> Anyway, adding the above `add-to-list' line (just after the `require org= ') >> solved the problem of my colleague. Thanks. > > You are welcome. Thanks again. Seb --=20 S=C3=A9bastien Vauban _______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode-mXXj517/zsQ@public.gmane.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode