From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: John Mastro Newsgroups: gmane.emacs.help Subject: Re: prevent function execution on Emacs startup if not connected to internet Date: Thu, 24 Apr 2014 10:09:07 -0700 Message-ID: References: <87wqem25tn.fsf@kuiper.lan.informatimago.com> <53587552.9050706@uw.edu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1398400261 7455 80.91.229.3 (25 Apr 2014 04:31:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 25 Apr 2014 04:31:01 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Apr 25 06:30:55 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WdXmo-0007Bo-2s for geh-help-gnu-emacs@m.gmane.org; Fri, 25 Apr 2014 06:30:54 +0200 Original-Received: from localhost ([::1]:55466 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WdXbi-0006CX-16 for geh-help-gnu-emacs@m.gmane.org; Fri, 25 Apr 2014 00:19:26 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36903) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WdUdH-00012A-Fw for help-gnu-emacs@gnu.org; Thu, 24 Apr 2014 21:09:42 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WdN9M-0002sX-QZ for help-gnu-emacs@gnu.org; Thu, 24 Apr 2014 13:09:29 -0400 Original-Received: from mail-ob0-x22a.google.com ([2607:f8b0:4003:c01::22a]:51484) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WdN9M-0002rT-LK for help-gnu-emacs@gnu.org; Thu, 24 Apr 2014 13:09:28 -0400 Original-Received: by mail-ob0-f170.google.com with SMTP id vb8so2987062obc.15 for ; Thu, 24 Apr 2014 10:09:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=MXSF1QhvZhbp6MPfYKuiF3cmHe46hmfqLsSgZcwvtqQ=; b=Ajl6ZEh+eurO1jtSfk5Nx5zdPPdXtZxBxbqIGa2V2PAX6oF+XnuIUhOuc41fRF0X2u DD0ke3W61z5U+19IyPCNbPisqjBnQhh7snaBMwidxGR62TjqcFdXnZp6DrHQUJ9XEDGn 8tOiXfaHAF9aVzD786RBSET+TADY5/rmbBgbd3kfdyX4wZcHO8XyiuReIMNaBYRrUPX9 udUMtdGyFQww+NwVkkZGTtJbL3XOyvmp1Mg3HKGWkap4r0GL/BKeaRXCjAFnRkYMYh+R Vmt5L+pUDe5IIOT14xYTmHIT9rSMy8XVBBiBn71HjZiGBgB9CSEgavVCFZHVGh7zngB1 rWDA== X-Received: by 10.182.113.227 with SMTP id jb3mr2422184obb.3.1398359367514; Thu, 24 Apr 2014 10:09:27 -0700 (PDT) Original-Received: by 10.76.166.234 with HTTP; Thu, 24 Apr 2014 10:09:07 -0700 (PDT) In-Reply-To: <53587552.9050706@uw.edu> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4003:c01::22a X-Content-Filtered-By: Mailman/MimeDel 2.1.14 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:97369 Archived-At: Hi Brady, Brady Trainor wrote: > So I was able to recreate my issue. Your method worked at these > functions, but then the issue propagates to `require's for packages > not installed. (Every once in a while I switch OS', and simultaneously > am sitting down somewhere without an internet connection.) You could make use of the optional "noerror" argument to `require'. For instance, (require 'the-package nil t). Of course, there will still be errors later if you try to use things from packages that weren't loaded. Best regards, John