emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Function for html-preamble and html-postamble in org-publish
@ 2011-12-11 23:38 Bill Jackson
  2011-12-12 15:30 ` Bastien
  0 siblings, 1 reply; 2+ messages in thread
From: Bill Jackson @ 2011-12-11 23:38 UTC (permalink / raw)
  To: emacs-orgmode

In version 7.7, a function provided to org-publish via :html-preamble or 
:html-postamble no longer accepts a property list of export options.  I 
do not know if this change is a bug, or if it is deliberate.

I pass functions to :html-preamble and :html-postamble to integrate 
generated HTML pages into a web site.  In previous versions of org-mode, 
such functions took a single argument as documented in 
org-export-html-premable: "The function takes the property list of 
export options as its only argument."  In version 7.7 this appears to 
have changed in org-html.el, org-export-as-html, lines 1,340 and 1,791 
(they no longer pass opt-plist), without any change to documentation.  
Further changes to this code have been made in the git repository.

I was able to restore the previous behavior simply by editing 
org-html.el to again pass opt-plist on the two lines, but am interested 
in what the future direction is for customizing the HTML output for 
org-publish.  Was this change unintentional, a deliberate minor change, 
or is org-publish or org-html undergoing significant re-design?  If this 
was deliberate, is there an alternate method for customization functions 
to access the property list?

Thanks for any insight,
Bill

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

* Re: Function for html-preamble and html-postamble in org-publish
  2011-12-11 23:38 Function for html-preamble and html-postamble in org-publish Bill Jackson
@ 2011-12-12 15:30 ` Bastien
  0 siblings, 0 replies; 2+ messages in thread
From: Bastien @ 2011-12-12 15:30 UTC (permalink / raw)
  To: Bill Jackson; +Cc: emacs-orgmode

Hi Bill,

Bill Jackson <wj2@jacksonhost.com> writes:

> In version 7.7, a function provided to org-publish via :html-preamble or
> :html-postamble no longer accepts a property list of export options.  I do
> not know if this change is a bug, or if it is deliberate.

This is deliberate: I think the average user should not worry about
handling opt-plist if she doesn't know what it is for.  

Still, as the manual says, you can use opt-plist within your function.

Can you use it so?

There was a problem with inserting the output string of the function,
I just fixed this.  Let me know if things are fine on your side.

> I was able to restore the previous behavior simply by editing org-html.el
> to again pass opt-plist on the two lines, but am interested in what the
> future direction is for customizing the HTML output for org-publish.  Was
> this change unintentional, a deliberate minor change, or is org-publish or
> org-html undergoing significant re-design?  If this was deliberate, is
> there an alternate method for customization functions to access the
> property list?

Well, this area is definitely going to evolve in the next few months.  I
try not to break anything in the meantime.

Best,

-- 
 Bastien

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

end of thread, other threads:[~2011-12-12 15:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-11 23:38 Function for html-preamble and html-postamble in org-publish Bill Jackson
2011-12-12 15:30 ` Bastien

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