Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support auto reloading #114

Open
wenlibin02 opened this issue Dec 31, 2016 · 6 comments
Open

Support auto reloading #114

wenlibin02 opened this issue Dec 31, 2016 · 6 comments

Comments

@wenlibin02
Copy link

Could you add the support for auto reloading by specifying an option?

@visit1985
Copy link
Owner

I can see the advantage of that, compared to the current method of hitting r all the time to reload it while creating the presentation.

But, I don't have time to work on enhancements of mdp at the moment. If you want to implement it (or find somebody who does it for you), feel free to do so and submit a pull request. I'd be happy to review it. Otherwise I'd simply leave this issue open until someone finds the time to work on it.

P.S.: We also need to consider the case that you can pipe your markdown into mdp. In this case you can't reload, since there is no file to work on.

@Kazhuu
Copy link

Kazhuu commented Sep 23, 2018

I would like to take a try at this. I actually checked Linux inotify kernel API and thought that would be good for this. Implementing this will take some time from me but I really would like to try. Any other ideas?

@visit1985
Copy link
Owner

@kazooiebombchu, sounds great. I've thought about inotify too, but we need to ensure that this is an optional feature for Linux then. It's important, that it doesn't break builds for other platforms. Maybe this requires introduction of autoconf scripts to the project, but I'm not familiar with that.

@Kazhuu
Copy link

Kazhuu commented Oct 5, 2018

I also looked into this fswatch but I wasn't sure does this support all needed platforms though. At least what I understood it seemed to be (Linux kernel, OS-X and FreeBSD, not sure about Cygwin)? I'm not familiar with autoconf either but what I read people seem to favor something like CMake over autoconf. Any ideas about using the fswatch library? If it doesn't work then only solution might be using autoconf or something similar to provide different builds.

@wenlibin02
Copy link
Author

Originally I thought the program can repeatedly send a simulated key ‘r’ to do this job.

@Kazhuu
Copy link

Kazhuu commented Oct 13, 2018

I don't think that would be really good way to do this. It sounds little bit of a 'hack' and I'm not sure do you run into some kind of write collisions with this method because when mdp and your editor are trying to access the same file at the same time. In that sense for me inotify or something similar sounds better approach.

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

No branches or pull requests

3 participants