emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: David O'Toole <dto@gnu.org>
To: Ed Hirgelt <ehirgelt@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: [Orgmode] Re: Problem with org-publish-get-plists
Date: Wed, 06 Sep 2006 16:31:55 -0400	[thread overview]
Message-ID: <m3irk0butg.fsf@gnu.org> (raw)
In-Reply-To: <44d0d9630608251058s4e61f9c7mfec5b01389367630@mail.gmail.com> (Ed Hirgelt's message of "Fri, 25 Aug 2006 10:58:11 -0700")


Sorry for the late reply. 

I have incorporated your bugfix into the latest version of
org-publish.el and will publish the updated code on my website
shortly. 

Thanks so much for your debugging!

"Ed Hirgelt" <ehirgelt@gmail.com> writes:

> I was having problems publishing with 2 projects in the project list.
> I tracked it down to the org-publish-files hash table.  All the files
> from both projects were mapped to the same project, the last one.
> This was caused by org-publish-get-plists.  Below is the modified
> version that seems to work nicely for me.
>
> The trick as that plists was getting appended to each time through the
> loop which is great for the return value, but the loop over the
> content of plists assumed that project applied to all.  This change
> uses single to be the current element in plists. The return value
> remains the same.
>
> Hope this helps.
>
> Thanks,
> Ed
> -----------------------------------------------------------------
>
> (defun org-publish-get-plists (&optional project-name)
>  "Return a list of property lists for project PROJECT-NAME.
> When argument is not given, return all property lists for all projects."
>  (let ((alist (if project-name
> 		   (list (assoc project-name org-publish-project-alist))
> 		 org-publish-project-alist))
> 	(project nil)
> 	(plists nil)
> 	(single nil)
> 	(components nil))
>
>    ;;
>    ;;
>    (while (setq project (pop alist))
>      ;; what kind of project is it?
>      (if (setq components (plist-get (cdr project) :components))
> 	  ;; meta project. annotate each plist with name of enclosing project
> 	  (setq single
> 		(apply 'append
> 		       (mapcar 'org-publish-get-plists components)))
> 	;; normal project
> 	(setq single (list (cdr project))))
>      ;;
>      (setq plists (append plists single))
>      (dolist (p single)
> 	(let* ((exclude (plist-get p :exclude))
> 	       (files (org-publish-get-base-files p exclude)))
> 	  (dolist (f files)
> 	    (puthash (file-truename f) (car project) org-publish-files)))))
>    plists))
>
>
> -- 
> Ed Hirgelt
>
> Discovery consists of seeing what everybody has seen
> and thinking what nobody has thought.
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>

-- 
David O'Toole 
dto@gnu.org
http://dto.freeshell.org/notebook/

      reply	other threads:[~2006-09-06 20:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-25 17:58 Problem with org-publish-get-plists Ed Hirgelt
2006-09-06 20:31 ` David O'Toole [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3irk0butg.fsf@gnu.org \
    --to=dto@gnu.org \
    --cc=ehirgelt@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).