diff options
author | Marek Paśnikowski <marek@marekpasnikowski.pl> | 2024-01-20 11:52:47 +0100 |
---|---|---|
committer | Marek Paśnikowski <marek@marekpasnikowski.pl> | 2024-01-20 11:52:47 +0100 |
commit | 25d14f5078495f20085c22f82a2b98e6fd39b739 (patch) | |
tree | d698bd1da7e576b318c56ec5dfc804b6e69dc1ae /www/www.org | |
parent | a88401dcbce6b4d6742eaec1033609c13f912a32 (diff) |
Fix misunderstood instancing of publishing-object
The recently introduced test suite uncovered a fatal error in my understanding
of how to correctly manage instances of objects.
Diffstat (limited to 'www/www.org')
-rw-r--r-- | www/www.org | 45 |
1 files changed, 25 insertions, 20 deletions
diff --git a/www/www.org b/www/www.org index c51bf76..55b2441 100644 --- a/www/www.org +++ b/www/www.org @@ -25,27 +25,31 @@ many other properties of a project. ( print "publish-test-1" ) - ( publish :data-projects ( list "test.pl" "example.org" ) ) + ( let ( ( publication-instance ( publication-object ) ) ) + ( publish publication-instance + :data-projects ( list "test.pl" "example.org" ) ) ) ( print "publish-test-2" ) - ( publish + ( let ( ( publication-instance ( publication-object ) ) ) + ( publish publication-instance - :data-projects - ( list "test.pl" + :data-projects + ( list "test.pl" - :property1 - "value1" + :property1 + "value1" - :property2 - "value2" ) ) + :property2 + "value2" ) ) ) ( print "publish-test-3" ) - ( publish "test.pl" + ( let ( ( publication-instance ( publication-object ) ) ) + ( publish publication-instance "test.pl" - :components - ( list "example.pl" "example.org" ) ) + :components + ( list "example.pl" "example.org" ) ) ) #+END_SRC *** [[https://orgmode.org/manual/Project-alist.html][The variable =org-publish-project-alist=]] @@ -99,19 +103,20 @@ are also published, in the sequence given. ( print success-report ) ( ) ) ) ) ) - ( setq publication-instance ( publication-object ) ) + ( defun object-compose ( publication-instance ) + ( plist-get publication-instance :object-compose ) ) - ( setq object-compose ( plist-get publication-instance :object-compose ) ) + ( defun object-projects ( publication-instance ) + ( plist-get publication-instance :object-get-projects ) ) - ( setq object-projects ( plist-get publication-instance :object-get-projects ) ) + ( defun object-report ( publication-instance ) + ( plist-get publication-instance :object-report ) ) - ( setq object-report ( plist-get publication-instance :object-report ) ) - - ( defun publish ( &rest project-data ) + ( defun publish ( publication-instance &rest project-data ) ( let ( ( data-projects ( plist-get project-data :data-projects ) ) ) - ( funcall object-projects data-projects ) - ( funcall object-compose ) - ( funcall object-report ) + ( funcall ( object-projects publication-instance ) data-projects ) + ( funcall ( object-compose publication-instance ) ) + ( funcall ( object-report publication-instance ) ) ( ) ) ) #+END_SRC |