Re: [O] What Happened to org-export-html-extension?

2013-04-05 Thread Ian Barton

On 03/04/13 12:26, Bastien wrote:

Hi Ian,

Ian Barton li...@wilkesley.net writes:


Thanks for the clear explanation. Using my own function works, but this
does seem to be a regression. Defining your own extension is useful e.g. if
you want to emit .php files.


Indeed.  I fixed this regression, and using either :html-extension in
publication projects or (setq org-html-extension php) globally will
work now.

Thanks for reporting this,


And thanks for fixing it!

Ian.




Re: [O] What Happened to org-export-html-extension?

2013-04-03 Thread Bastien
Hi Ian,

Ian Barton li...@wilkesley.net writes:

 Thanks for the clear explanation. Using my own function works, but this
 does seem to be a regression. Defining your own extension is useful e.g. if
 you want to emit .php files.

Indeed.  I fixed this regression, and using either :html-extension in
publication projects or (setq org-html-extension php) globally will
work now.

Thanks for reporting this,

-- 
 Bastien



[O] What Happened to org-export-html-extension?

2013-03-31 Thread Ian Barton
I am trying to publish a project where the files have a custom extension 
using the new exporter:


  (org-ianbarton
  :base-directory 
~/Documents/emacs/web_sites/ianbarton/org/_posts

  :base-extension org
  :publishing-directory 
~/Documents/emacs/web_sites/ianbarton/pelican/blog/content

  :recursive t
  :publishing-function org-html-publish-to-html
  :headline-levels 4 ; Just the default for this 
project.

  :auto-preamble t
  :auto-index f
  :html-extension yml
  :auto-preamble t
  :body-only t
)

However, all files are published with an .html extension. My Emacs 
customize interface claims that org-export-html-extension doesn't exist. 
Grepping the source for org-export-html-extension doesn't find anything. 
So has the variable been renamed to something else?


Ian.



Re: [O] What Happened to org-export-html-extension?

2013-03-31 Thread Suvayu Ali
Hello Ian,

On Sun, Mar 31, 2013 at 10:43:21AM +0100, Ian Barton wrote:
 
 However, all files are published with an .html extension. My Emacs customize
 interface claims that org-export-html-extension doesn't exist. Grepping the
 source for org-export-html-extension doesn't find anything. So has the
 variable been renamed to something else?

All variables and functions called org-export or org-e- have been
renamed to org-backend-oldname.  So org-export-html-extension is
now, org-html-extension.

Hope this helps,

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] What Happened to org-export-html-extension?

2013-03-31 Thread Ian Barton

On 31/03/13 11:01, Suvayu Ali wrote:

Hello Ian,

On Sun, Mar 31, 2013 at 10:43:21AM +0100, Ian Barton wrote:


However, all files are published with an .html extension. My Emacs customize
interface claims that org-export-html-extension doesn't exist. Grepping the
source for org-export-html-extension doesn't find anything. So has the
variable been renamed to something else?


All variables and functions called org-export or org-e- have been
renamed to org-backend-oldname.  So org-export-html-extension is
now, org-html-extension.

Hope this helps,

Thanks, it does and it doesn't. I have set the variable, but still get 
files with a .html extension.


I can reproduce the problem with the following minimal emacs:

(add-to-list 'load-path ~/.emacs.d/src/lisp)
(require 'org)

(require 'ox-html)

(setq org-publish-project-alist
  '(

   ;; ... add all the components here (see below)...
  (org-ianbarton
  :base-directory 
~/Documents/emacs/web_sites/ianbarton/org/_posts

  :base-extension org
  :publishing-directory 
~/Documents/emacs/web_sites/ianbarton/pelican/blog/content

  :recursive t
  :publishing-function org-html-publish-to-html
  :headline-levels 4 ; Just the default for this 
project.

  :auto-preamble t
  :auto-index f
  :org-html-extension yml
  :auto-preamble t
  :body-only t
)

  (org-static-ian
  :base-directory 
~/Documents/emacs/web_sites/ianbarton/org/_posts
  :base-extension 
css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf\\|php
  :publishing-directory 
~/Documents/emacs/web_sites/ianbarton/pelican/blog/content

  :recursive t
  :publishing-function org-ox-publish-attachment)


(ianbarton :components (org-ianbarton org-static-ian))



  ))




Re: [O] What Happened to org-export-html-extension?

2013-03-31 Thread Sean O'Halpin
Hi,

org-html-publish-to-html is defined in ox-html.el and looks like this
(sans doc):

  (defun org-html-publish-to-html (plist filename pub-dir)
(org-publish-org-to 'html filename .html plist pub-dir))

You could define your own publishing function, e.g.

  (defun my-org-html-publish-to-html (plist filename pub-dir)
(org-publish-org-to 'html filename .yml plist pub-dir))

and refer to that in your org-publish-project-alist.

org-html-extension is used in org-html-export-to-html which calls
org-export-to-file, which is the same function org-publish-org-to
calls (so org-html-extension is bypassed).

There's also the export option :html-extension but it doesn't look
like it's used to name published files.

Regards,
Sean



Re: [O] What Happened to org-export-html-extension?

2013-03-31 Thread Ian Barton



org-html-publish-to-html is defined in ox-html.el and looks like this
(sans doc):

   (defun org-html-publish-to-html (plist filename pub-dir)
 (org-publish-org-to 'html filename .html plist pub-dir))

You could define your own publishing function, e.g.

   (defun my-org-html-publish-to-html (plist filename pub-dir)
 (org-publish-org-to 'html filename .yml plist pub-dir))

and refer to that in your org-publish-project-alist.

org-html-extension is used in org-html-export-to-html which calls
org-export-to-file, which is the same function org-publish-org-to
calls (so org-html-extension is bypassed).

There's also the export option :html-extension but it doesn't look
like it's used to name published files.



Thanks for the clear explanation. Using my own function works, but this 
does seem to be a regression. Defining your own extension is useful e.g. 
if you want to emit .php files.


Ian.