-
Notifications
You must be signed in to change notification settings - Fork 164
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
live preview async timer #69
base: master
Are you sure you want to change the base?
live preview async timer #69
Conversation
c6027a5
to
cf3b6a7
Compare
That's really weird; the CI is complaining that emacs wasn't compiled with libxml2? That was definitely working previously. Not sure what's up. |
Maybe this is a problem with Emacs version manager? There is a seemingly-related open issue... This is what I use on Travis for installing Emacs. CC: @syohex |
Thanks for checking this out; it is weird that libxml2 isn't there (although it was in other builds; maybe that build was on a different server, and it's arbitrary whether or not the build server has libxml2 compiled in? Cause it definitely didn't have this issue before (the previous test failures were for different issues). To mitigate this, one thing we could do is, in addition to |
That is very strange. I thought the error was due to some new functionality, not things that were already there before. Independent of whether the CI server is happy with it, the tests pass locally on my end. I'm still playing around with everything. Very cool so far--thanks! I'll also think about how to best handle the error. |
Absolutely! Tell me if there any more types of tests you'd like me to add. I'll have less time than in the past few weeks because I'm back at school, but I should have plenty to fix things up. |
I suppose above lines should also check |
Oops, I pushed that one too fast. It doesn't pass on 24.3, which I'm working on. 24.4 and 24.5 still don't have libxml2, for some reason. Sorry about that, fixing now. |
The test failures were due to not checking for What I just added in 6702e69 is thoroughly described in the commit message, but it essentially ensures that an eww buffer window, if it exists, is selected when |
I suppose tests on Emacs 24.5 are failed by network issue. So they may be passed by rerunning tests. You can rerun tests by some commit and push(For example, squashing some commits). |
048833a
to
610574e
Compare
Ok, I've also just ensured that the first eww (or whatever) window displayed has the correct display width, in addition to any subsequent exports. I added testing for that case, and squashed the commits. The CI test on 24.3 failed during the async exports test; this doesn't happen on my local machine, so it's likely a nondeterministic result of not choosing a long enough delay for the async testing. I think To sum up:
|
FYI I forced the failing test to run again and it passed. I've had an issue with asynchronous live preview that I haven't been able to reliably reproduce. Sometimes the Markdown process seems to hang and the buffer stops updating. Many times it's after the initial preview, with no subsequent updates. When this happens, I check the output html file and it is empty (0 bytes), while the Markdown process is still running. Another thing: currently it doesn't handle the Edit: Regarding the EVM issue, I prefer to have the CI tests pass even when those tests don't run (as you have done). The alternative--having them always fail (due to the libxml2 issue)--is uninformative. At least this way if a patch introduces a regression in tests that do run, we'll know. I view the CI server as a compliment to running the tests locally as well, not a substitute for it. |
Ok, I'll try to reproduce that, and I'll check out |
#62 is cleanly merged into this, which has the lexical-binding stuff done independently. Is that what you're looking for? |
Yes. I missed that closed PR. This PR implements multiple features, enabling lexical-binding and live preview. It is difficult to review big PR. |
Ok, I'll update #62 and reopen it when I address the other comments made in this thread. |
Thanks |
610574e
to
f353c8f
Compare
d2397d6
to
f2898c7
Compare
This takes the
*-live-preview-*
functionality and turns it all async with an idle timer, as you suggested. Instead of using themarkdown-do-sync-or-async
macro as in the previous attempt, I just rewrote the code that invokes markdown into a single small function.This requires
lexical-binding
to be on to use sentinels, so it has #62 merged into it.lexical-binding
is supported since emacs 24.1, but if that's an issue, I can probably refactor those out into buffer-localdefvar
s.I closed #56 because this is really far better than that.
This pull request makes the preview process a lot faster and is more convenient than having to explicitly save on each preview; however, the defcustom
markdown-live-preview-do-sync
, when turned on, maintains the previous functionality.