emms-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [emms-help] [bug?] libre.fm scrobbing when offline


From: Yoni Rabkin
Subject: Re: [emms-help] [bug?] libre.fm scrobbing when offline
Date: Mon, 16 Mar 2015 21:13:36 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)


> I don't know much about networking.  You could catch the error, or if you
> want it more explicitly do something like.  
>
> (condition-case nil
>         (url-retrieve-synchronously "http://www.gnu.org";)
>         (error nil))
>
> (condition-case nil
>         (url-retrieve-synchronously 
> "www.nonexisting.domain.somewhere.out.there123")
>         (error nil))
>
> You'd probably need to clean up the buffer as well.
>
> http://www.gnu.org/software/emacs/manual/html_node/elisp/Handling-Errors.html

All of those would hang Emacs. It makes more sense to asynchronously ask
something like ping to do it and check back on that. I'm sure that there
is a canonical way for Emacs to check if it has an Internet connection,
and I even remember reading a conversation about this issue on
emacs-devel... who knows how long ago that was.

-- 
   "Cut your own wood and it will warm you twice"



reply via email to

[Prev in Thread] Current Thread [Next in Thread]