From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nathan Neff Subject: Re: Org-jekyll - org-publish-initialize-files-alist Date: Wed, 30 Jun 2010 09:27:41 -0500 Message-ID: References: <87bpas7ngq.fsf@gmx.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Received: from [140.186.70.92] (port=45314 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OTyGY-0004Ub-HP for emacs-orgmode@gnu.org; Wed, 30 Jun 2010 10:27:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OTyGN-0000uR-FB for emacs-orgmode@gnu.org; Wed, 30 Jun 2010 10:27:53 -0400 Received: from mail-fx0-f41.google.com ([209.85.161.41]:64356) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OTyGN-0000u9-8V for emacs-orgmode@gnu.org; Wed, 30 Jun 2010 10:27:43 -0400 Received: by fxm17 with SMTP id 17so597407fxm.0 for ; Wed, 30 Jun 2010 07:27:42 -0700 (PDT) In-Reply-To: <87bpas7ngq.fsf@gmx.de> 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: Sebastian Rose Cc: emacs-orgmode On Wed, Jun 30, 2010 at 6:45 AM, Sebastian Rose wro= te: > Nathan Neff writes: >> Some time ago, I set up a blog using org-jekyll. =A0I recently tried >> to publish my blog, but when I run: >> >> org-jekyll-export-blog >> >> I get the message: =A0Symbol's function definition is void: >> org-publish-initialize-files-alist >> >> I grepped for this function, and noticed that it is now defined in >> org-protocol.el >> using (declare-function org-publish-initilialize-files-alist "org-publis= h"), >> whereas before, the function was declared in org-publish.el >> >> Can anyone help with this problem? >> >> I tried putting this in my emacs, but it didn't work: >> (require 'org-protocol.el) >> (require 'org-publish) >> (require 'org-jekyll) >> >> Thanks, >> --Nate > > > Nathan, > > I cannot find a file named org-jekyll.el or similar. > > But I guess `org-publish-initialize-files-alist' is just called to find > a project the current files belongs to. > If that is the case, you simply remove the call to that function and use > > =A0(let ((project > =A0 =A0 =A0 =A0 (org-publish-get-project-from-filename buffer-file-name))= ) > =A0 .... > > > If you encounter any problems, I'll be glad to help. > > > > =A0 Sebastian > Thanks for your replies -- I don't know too much about the inner workings o= f org-jekyll, so I might forward this to the author. In the meantine, if anyone wants to take a poke at this, I would appreciate it. I can always revert to a prior version of org when I want to publish, so I'm not being held back. Below is the code where org-publish-initialize-files-alist is called in org-jekyll. It looks like in both cases, the code is trying to figure out what project the current file belongs to. Can anyone suggest a fix? I don't mean to push this on anyone, but I really don't know lisp that well. (defun org-jekyll-export-current-entry () (interactive) (save-excursion (org-publish-initialize-files-alist) ; <----------------here (let ((project-name (cdr (assoc (expand-file-name (buffer-file-name)) org-publish-files-alist)))) (org-back-to-heading t) (org-jekyll-export-entry project-name)))) And another time here: (defun org-jekyll-export-blog () "Export all entries in project files that have a :blog: keyword and an :on: datestamp. Property drawers are exported as front-matters, outline entry title is the exported document title. " (interactive) (save-excursion (org-publish-initialize-files-alist) ;; < -------------- here (setq org-jekyll-new-buffers nil) (mapc (lambda (jfile-project) (let ((jfile (car jfile-project)) (project (cdr jfile-project))) (if (string=3D (file-name-extension jfile) "org") (with-current-buffer (org-get-jekyll-file-buffer jfile) (org-map-entries (lambda () (org-jekyll-export-entry project= )) "blog|BLOG"))))) (org-publish-get-files (org-publish-expand-projects (list (org-publish-get-project-from-filename (buffer-file-name) 'up))))) (org-release-buffers org-jekyll-new-buffers)))