yasnippet-snippets icon indicating copy to clipboard operation
yasnippet-snippets copied to clipboard

Please document how is report used to generate snippets.html

Open sten0 opened this issue 6 years ago • 2 comments
trafficstars

Hi,

In Debian we have a policy about regenerating everything during package build time. I'm about half-way through learning how to use lein+maven (for network detached builds).

Since the uberjar will be regenerated every time the package will be built, it would be nice if project.clj had a :main namespace that we could run directly :-)

Regards, Nicholas

sten0 avatar Jul 09 '19 18:07 sten0

Ah I didn't even know there was a Debian package tracking this! So well I don't know how useful is this HTML, it was an experiment done with Clojure to get a simple report, and it's not really complete even.

You could generate it automatically but you would need the whole Clojure shebang, which is not really related to Emacs itself.

I think if someone helps me (or I find some time to do it), it would be more useful to do this with Emacs directly. The data is already all there (and there is even yas-describe-tables) I think that getting a a similar HTML report from Elisp would not be too hard, and that would probably be the correct implementation. What do you think @sten0 ?

AndreaCrotti avatar Jul 14 '19 08:07 AndreaCrotti

Hi @AndreaCrotti!

Sorry for the delay, 'busy with life and work.

Yup! :-) I just sent a PR adding installation instructions. BTW, Debian packages of modern elisp libraries use dh-elpa to generate the package that satisfies ELPA/package.el dependencies using .deb packages, using apt as the transport (more reliable than MELPA). If ever you're interested in the details or statistics on the Debian side of things I can provide links.

Cool project! I'm also interested in Clojure (well, in eventually learning Clojure), which is why I found it interesting to explore this challenge. Hm, but given that it sounds like this HTML is temporary it sounds like I should just omit the doc and not generate it for now.

Yes, using yas-describe-tables seems like one of the fastest and most straightforward ways. :-) Another possible candidate might be to do it with org-mode using either an existing yas--describe-foo or possibly copying code into the org file for dynamic generation. The reason I like the idea of an intermediary format is because it would enable such things as snippet reference on an ebook reader or tablet via ox-epub or an org-to-pdf export, html export is easy, and I think org-mode might also be able to pretty-print to dead trees. I'm sorry, I still don't have enough experience to be able to say what the correct implementation is, but my ebook-creation adventures say that in case of a flat HTML file generated with yas-describe-tables, the snippets for each mode should have an easily parsable heading to make it easier for users to generate chapter breaks (one mode => one chapter title) if they manually create and epub using Calibre.

sten0 avatar Aug 01 '19 17:08 sten0