From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: applying changes in .emacs Date: Mon, 29 Aug 2005 21:12:06 +0300 Message-ID: References: <42e00e0d_1@news.iprimus.com.au> NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1125340444 9363 80.91.229.2 (29 Aug 2005 18:34:04 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 29 Aug 2005 18:34:04 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Aug 29 20:34:02 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1E9oNM-0006RQ-GE for geh-help-gnu-emacs@m.gmane.org; Mon, 29 Aug 2005 20:28:57 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1E9oRS-0006A0-2F for geh-help-gnu-emacs@m.gmane.org; Mon, 29 Aug 2005 14:33:10 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1E9oR8-00069H-T9 for help-gnu-emacs@gnu.org; Mon, 29 Aug 2005 14:32:50 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1E9oJu-0004fz-Ol for help-gnu-emacs@gnu.org; Mon, 29 Aug 2005 14:25:31 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1E9oJq-0004dH-Kk for help-gnu-emacs@gnu.org; Mon, 29 Aug 2005 14:25:18 -0400 Original-Received: from [192.114.186.20] (helo=nitzan.inter.net.il) by monty-python.gnu.org with esmtp (Exim 4.34) id 1E9o9O-000707-RD for help-gnu-emacs@gnu.org; Mon, 29 Aug 2005 14:14:31 -0400 Original-Received: from HOME-C4E4A596F7 (IGLD-80-230-83-228.inter.net.il [80.230.83.228]) by nitzan.inter.net.il (MOS 3.6.5-GR) with ESMTP id BHD46807 (AUTH halo1); Mon, 29 Aug 2005 21:12:02 +0300 (IDT) Original-To: help-gnu-emacs@gnu.org In-reply-to: (message from don provan on Mon, 29 Aug 2005 00:35:25 -0700) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:29067 Archived-At: > From: don provan > Date: Mon, 29 Aug 2005 00:35:25 -0700 > > Eli Zaretskii writes: > > There's no command to do that, since quite a few fragments in a > > typical .emacs file cannot be re-evaluated without causing bad side > > effects. > > Wow. I would have said .emacs code is broken if it cannot be > re-evaluated without causing bad side effects, so I must be missing > something. You are not missing anything, I think. Simply put, typical .emacs code is written assuming that it is evaluated only once, when Emacs starts. While that might be a bad assumption for general-purpose Lisp code, what one puts in .emacs is not general-purpose code, and in any case, that's how people tend to do it. > Can you give some examples and explain why they can't be avoided? > About the only thing I'm aware of doing is adding duplicate entries > to some lists, and even that I could avoid if I thought the effect > would amount to something bad. Adding things to a list is one typical example (adding a hook function is a frequently seen variant of this). Doing something if some symbol is not bound or if some feature is not available (meaning a package is not loaded) is another. There's more.