From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.help Subject: Re: Speeding up Emacs load time Date: Sun, 30 Jun 2013 23:00:16 +0800 Message-ID: <8738rzej9b.fsf@ericabrahamsen.net> References: <87y59urnfn.fsf@VLAN-3434.student.uu.se> <877ghbkbpq.fsf@VLAN-3434.student.uu.se> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1372604425 14075 80.91.229.3 (30 Jun 2013 15:00:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 30 Jun 2013 15:00:25 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Jun 30 17:00:22 2013 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 1UtJ70-00031J-IL for geh-help-gnu-emacs@m.gmane.org; Sun, 30 Jun 2013 17:00:22 +0200 Original-Received: from localhost ([::1]:59316 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UtJ70-0006r7-2u for geh-help-gnu-emacs@m.gmane.org; Sun, 30 Jun 2013 11:00:22 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53327) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UtJ6o-0006q2-W1 for help-gnu-emacs@gnu.org; Sun, 30 Jun 2013 11:00:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UtJ6l-0004Vu-VX for help-gnu-emacs@gnu.org; Sun, 30 Jun 2013 11:00:10 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:47980) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UtJ6l-0004VR-NU for help-gnu-emacs@gnu.org; Sun, 30 Jun 2013 11:00:07 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UtJ6j-0002qv-LJ for help-gnu-emacs@gnu.org; Sun, 30 Jun 2013 17:00:05 +0200 Original-Received: from 114.250.134.4 ([114.250.134.4]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 30 Jun 2013 17:00:05 +0200 Original-Received: from eric by 114.250.134.4 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 30 Jun 2013 17:00:05 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 39 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 114.250.134.4 User-Agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:PyWYrHTuxNZScDCffcwbV43cgl8= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 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:91869 Archived-At: Emanuel Berg writes: > Rustom Mody writes: > >> The problem is that Emacs invites tinkering with my Elisp >> settings. And Elisp is such an imperative language >> ... >> And that means that Elisp-hacking means frequent restarts of >> Emacs. > > Say what?! I do Elisp all the time and I *never* restart Emacs. > > Why do you have to restart it? > > You know about `eval-defun', `eval-last-sexp`, `load-file`, etc.? Ideally, this works fine. Mostly, it works for smaller libraries you've written yourself. But try hacking on something larger (org-mode or, god help you, gnus), and it becomes very, very difficult to make sure you've cleaned up the run-time. Some vars are read at load time only (so re-evaling base vars does nothing), and often you succeed only in eval-ing yourself to a non-working environment. Especially if you're planning on pushing your changes to some poor unsuspecting group of users, you need to start from a clean slate. > For hooks and the like you can simply set them to certain things > instead of adding (which implies there are stuff there to begin > with). You can comment out those sections and still eval them when > needed, so they won't be evaled on init. (This is the only case I > can think of when writing Elisp would benefit from restarting > Emacs. I don't know if I'm missing something here.) > > And, although Lisp (and Elisp) are a bit "everything goes", not > really adhering to any paradigm (at least not consistently so), > which I think is a *good* thing, I still would say Elisp is (if > anything) functional - imperative/procedural, that's like Basic or > C (although C obviously is much better, for example the shunned > goto - what about continue and break in C? Isn't that sort of a > goto?).