From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nix Newsgroups: gmane.emacs.devel Subject: Re: Better startup error handling Date: Sat, 28 Apr 2012 13:04:44 +0100 Message-ID: <87wr50uko3.fsf@spindle.srvr.nix> References: <83d36wfcf1.fsf@gnu.org> <834ns7g9r8.fsf@gnu.org> <87ty06nnxp.fsf@catnip.gol.com> <87vckmm2z7.fsf@catnip.gol.com> <87ehr9vp0r.fsf@destructor.i-did-not-set--mail-host-address--so-tickle-me> <87ehr9n8nh.fsf@catnip.gol.com> <87y5phu8o3.fsf@destructor.i-did-not-set--mail-host-address--so-tickle-me> <878vhhn6oq.fsf@catnip.gol.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1335614697 27297 80.91.229.3 (28 Apr 2012 12:04:57 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 28 Apr 2012 12:04:57 +0000 (UTC) Cc: emacs-devel@gnu.org, Jeremiah Dodds , Miles Bader To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Apr 28 14:04:56 2012 Return-path: Envelope-to: ged-emacs-devel@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 1SO6OW-0003GH-B8 for ged-emacs-devel@m.gmane.org; Sat, 28 Apr 2012 14:04:56 +0200 Original-Received: from localhost ([::1]:45049 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SO6OV-00010l-KZ for ged-emacs-devel@m.gmane.org; Sat, 28 Apr 2012 08:04:55 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:37406) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SO6OS-00010g-BE for emacs-devel@gnu.org; Sat, 28 Apr 2012 08:04:53 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SO6OQ-0005tb-KK for emacs-devel@gnu.org; Sat, 28 Apr 2012 08:04:51 -0400 Original-Received: from icebox.esperi.org.uk ([81.187.191.129]:47275 helo=mail.esperi.org.uk) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SO6OQ-0005sH-AQ; Sat, 28 Apr 2012 08:04:50 -0400 Original-Received: from esperi.org.uk (nix@spindle.srvr.nix [192.168.14.15]) by mail.esperi.org.uk (8.14.5/8.14.5) with ESMTP id q3SC4i2S030435; Sat, 28 Apr 2012 13:04:44 +0100 Original-Received: (from nix@localhost) by esperi.org.uk (8.14.5/8.14.5/Submit) id q3SC4ici018678; Sat, 28 Apr 2012 13:04:44 +0100 Emacs: if it payed rent for disk space, you'd be rich. In-Reply-To: (Stefan Monnier's message of "Fri, 27 Apr 2012 22:07:56 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.95 (gnu/linux) X-DCC-dcc1.aftenposten.no-Metrics: spindle 1215; Body=4 Fuz1=4 Fuz2=4 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 81.187.191.129 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:150114 Archived-At: On 28 Apr 2012, Stefan Monnier spake thusly: > The way I see it, we should ideally be able to load the .emacs in such > a way that an error doesn't prevent the rest of the file from being > loaded, and the error should be clearly signaled to the user with some > kind of line-number information. Yes. This presumably means some sort of evaluator hook to execute some code between each toplevel form, or wrap each top-level form in a condition-case -- reader macros would I think handle it, but elisp doesn't have those. > In my wildest dreams I also imagine that we'd check for obsolete vars, > hooks, and functions. Maybe even give the same kind of feedback that > the byte-compiler gives about the code. Can't you do that trivially by loading .emacs into a temporary buffer in default.el, then byte-compiling it and throwing the results away? (In default.el because that way it picks up changes to the byte-compiler configuration that you may have made in .emacs.) Downsides: loads the byte-compiler even in sessions that don't need it, and notably inefficient. -- NULL && (void)