Auto-generation feature #97

Closed
koraktor opened this Issue Apr 12, 2010 · 7 comments

Comments

Projects
None yet
2 participants
Contributor

koraktor commented Apr 12, 2010

I just played around with Glyph and I think this is a really cool thing. If it would feature bibliography support I'd use it right away for my master's thesis.
Another feature I started missing really soon is auto-regeneration. LaTeX itself doesn't feature this, but most IDEs offer an option. So I just added a new switch --auto and implemented the feature on top of directory_watcher.

See my patch here: koraktor/glyph@35de090.

Owner

h3rald commented Apr 12, 2010

Thanks a lot!

I thought about auto-regeneration but in the end I didn't implement it because I didn't actually need it, but seeing you already patched the compile command...

Looks good, I'll definitely pull your patch and integrate it, I just need to play with it and test it to see if it works as advertised.

Contributor

koraktor commented Apr 12, 2010

To be honest... this is a bit quick&dirty, but it should work as expected. I just made sure everything is reloaded. So this might be tuned, e.g. only reload macros if macros have changed.
Generation is pretty fast as far as I can tell, so I didn't do any optimization.

PS: I also added the dependency to directory_watcher in koraktor/glyph@3760689.

Owner

h3rald commented Apr 12, 2010

...any chances of having some tests for this, as well? :P
Not worried about optimizing macro reloading... unless you define hundreds of new macros, I don't think it should matter too much!

About the dependency... Not sure whether to add it as a dependency to Glyph or raise an error if you try the switch without having it installed... some people may not want this, so I'd prefer not to force them to install stuff they don't need: I do the same with RedCloth, BlueCloth etc. etc.

Contributor

koraktor commented Apr 12, 2010

I'll try wrapping up some tests today - I just need to find some time. ;)

I'm fine with the dependency being optional - should it be a dev dependency instead?

Owner

h3rald commented Apr 12, 2010

Wow! Wonderful, some tests would be great!

Development dependency... erhm... uhm... well, don't know: I used developer dependencies for those gems I used to build the Glyph gem, so things like Yard and RSpec... so unless directory_watcher is used for more things, I wouldn't list it as a dependency, just yet. But this is a minor issue, of course!

Contributor

koraktor commented Apr 13, 2010

I pushed a new topic branch (rebased on current master) complete with tests.

See the new patch here: koraktor/glyph@19692b6

PS: I changed Glyph::DOCUMENT to a module attribute, so there are no more warnings about an already initialized constant.

Owner

h3rald commented Apr 13, 2010

Awesome, just merged it, thanks a lot!

Closed by 19692b6.

This issue was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment