emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org-publish-after-publishing-hook
@ 2016-09-05 11:28 Michael Welle
  2016-09-05 12:51 ` org-publish-after-publishing-hook Michael Welle
  0 siblings, 1 reply; 2+ messages in thread
From: Michael Welle @ 2016-09-05 11:28 UTC (permalink / raw)
  To: emacs-orgmode

Hello,

I have a hook like follows:

(defun foo (in out)
  (message "o-p-a-p-h in: '%s' out: '%s'" in out))

(add-hook 'org-publish-after-publishing-hook 'foo)


Now I publish a project that is defined in org-publish-project-alist
as follows:

("web-static"
 :base-directory "~/work/ORG/web"
 :publishing-directory "~/public_html/webtest1"
 :base-extension "css\\|gif"
 :recursive t
 :publishing-function org-publish-attachment
 )

The hook triggers and foo is called with two parameters, as expected.


Now a different project:

("bbdbv3"
 :base-directory "~/work/doc/bbdbv3"
 :base-extension "org"
 :publishing-directory "~/public_html/webtest1/bbdbv3"
 :recursive nil
 :publishing-function hmw/org-publish-project
 :headline-levels 4
 :auto-preamble nil
 :auto-sitemap nil
 :html-preamble nil
 :html-postamble nil
 :html-head-include-scripts nil
 :html-head-include-default-style nil
 :html-head "<link rel=\"stylesheet\" type=\"text/css\" href=\"/style.css\"/>"
 )

This time foo is called with the out parameter set to nil. That
behaviour changed between April and now I think. Any hints?

Regards
hmw

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: org-publish-after-publishing-hook
  2016-09-05 11:28 org-publish-after-publishing-hook Michael Welle
@ 2016-09-05 12:51 ` Michael Welle
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Welle @ 2016-09-05 12:51 UTC (permalink / raw)
  To: emacs-orgmode

Hello,

I found the problem. The publishing function must return the file name,
which it should do... except there was a bug in it. I used something
like (fboundp 'foo) as a condition and foo is a variable. I wonder how
that ever did something useful...

Sorry for the noise
hmw

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-09-05 12:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-05 11:28 org-publish-after-publishing-hook Michael Welle
2016-09-05 12:51 ` org-publish-after-publishing-hook Michael Welle

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).