sshaw / build-status

Emacs minor mode that monitors and shows a buffer's build status in the mode line.
27 stars 2 forks source link

don't error if network down? #4

Open unhammer opened 7 years ago

unhammer commented 7 years ago

Emacs tells me Failed to update status for /tmp/foo: HTTP/1\.[01] \([0-9]\{3\}\) whenever I open my laptop, since there's a slight delay until wifi connects. I don't think this calls for an something as invasive as an error (which shows even if you haven't looked at a CI-tracked project in hours). How about a special ((string= status "status unavailable") (build-status--propertize "?" status)) or something like that?

unhammer commented 7 years ago

https://github.com/unhammer/build-status/tree/async fixes this by making it all async

sshaw commented 7 years ago

Emacs tells me Failed to update status for /tmp/foo: HTTP/1.[01] ([0-9]{3}) whenever I open my laptop,

That's a bad error message that's caused by a failing search-forward-regexp. Fixed by 01bb9cc.

I don't think this calls for an something as invasive as an error

What's so invasive about it? I think it's important for one to know that a network error is preventing the build status from being updated.

How about a special ((string= status "status unavailable") (build-status--propertize "?" status))

In this context status is the value that would be returned by the (failing) HTTP call mentioned above. So this wouldn't work.

https://github.com/unhammer/build-status/tree/async fixes this by making it all async

I think async is the way to go in general, regardless of this error. I'll take a look at your branch shortly.