phillord / lentic

Create views of the same content in two Emacs buffers
183 stars 12 forks source link

[Suggest] lentic can use org-publish to generate html #23

Open tumashu opened 9 years ago

tumashu commented 9 years ago

I think we can use org-publish in lentic, which can recursive generate html, the below is my example code:

    https://github.com/tumashu/chinese-pyim/blob/master/chinese-pyim-devtools.el
phillord commented 9 years ago

Nice to see you using lentic. I've just changed the lentic-doc functionality, so that I can do publishing of an arbitrary package (currently, aimed at m-buffer which I thought was the only package other than lentic using lentic to document itself).

I could easily add support for using org-publish. I'm confused in this case though -- why is recursion valueable for you?

tumashu commented 9 years ago

my package chinese-pyim use lentic-doc too, in my opinion , recursion very import, i can use [[ file:sample.org]] instead #+include sample.org

tumashu commented 9 years ago

org-publish can auto convert sample.org to sample.html

tumashu commented 9 years ago

The example:

* Lentic Mode

lentic-mode.el provides end-user functions for creating and manipulating
lentic buffers.

See:  [[file:lentic-mode.org]]

org-puglish can auto convert lentic-mode.org to lentic-mode.html, and the above become a link.

phillord commented 9 years ago

Okay -- so you mean "export everything" rather than recursively?

The lentic-doc package currently checks for a variable with name "feature-doc" -- so "lentic-doc" or "m-buffer-doc". The logic for handling this iff it's a string, treat it as the name of the "main" org file, iff t then just use the orgified file of the package (so lentic.org or m-buffer.org).

I could also add -- iff it's a list, treat it as an org-project-alist and publish (as you have done). Or most generically of all, iff it's a function call it. Would these work for you?

I have to say, though, I prefer my solution! Using org-info.js over a single document is, to me, more convenient than putting "See also" links in.

tumashu commented 9 years ago
I could also add -- iff it's a list, treat it as an org-project-alist and publish (as you have done). Or most generically of all, iff it's a function call it. Would these work for you?

Good idea!

tumashu commented 9 years ago
I have to say, though, I prefer my solution! Using org-info.js over a single document is, to me, more convenient than putting "See also" links in. 

I use lentic with different way, my interesting is like this:

(*.el + lentic + org-webpage  ==> project webpage), 

the below is my example, works very well:

http://tumashu.github.io/chinese-pyim/
https://github.com/tumashu/chinese-pyim
https://github.com/tumashu/chinese-pyim/blob/master/chinese-pyim-devtools.el
phillord commented 9 years ago

It makes sense -- in fact, I do the same thing. I will try and add the org-publish support (or will accept a PR).