From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tim X Newsgroups: gmane.emacs.help Subject: Re: customize versus own expressions in .emacs Date: Sat, 02 Apr 2005 14:29:57 +1000 Message-ID: <87vf75243e.fsf@tiger.rapttech.com.au> References: Reply-To: timx@spamto.devnul.com NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1112416143 23932 80.91.229.2 (2 Apr 2005 04:29:03 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 2 Apr 2005 04:29:03 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Apr 02 06:29:01 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DHaFm-0004io-F4 for geh-help-gnu-emacs@m.gmane.org; Sat, 02 Apr 2005 06:28:58 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DHaHB-000749-6Q for geh-help-gnu-emacs@m.gmane.org; Fri, 01 Apr 2005 23:30:25 -0500 Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) Cancel-Lock: sha1:K5YNvDE+xaaoVGWQN36xJAB/2u0= Original-NNTP-Posting-Host: ppp195-176.lns1.syd2.internode.on.net Original-X-Trace: duster.adelaide.on.net 1112416198 203.122.195.176 (2 Apr 2005 13:59:58 +0950) Original-Lines: 52 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!news4.google.com!news.glorb.com!newsfeed-east.nntpserver.com!nntpserver.com!newsfeed-west.nntpserver.com!news1.optus.net.au!optus!news.mel.connect.com.au!news-south.connect.com.au!duster.adelaide.on.net!not-for-mail Original-Xref: shelby.stanford.edu gnu.emacs.help:129791 Original-To: help-gnu-emacs@gnu.org 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:25347 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:25347 Sebastian Luque writes: > Since I began using Emacs a little over a year now, I've been mixing my > own entries with those made by the Customize interface in my ~/.emacs. As > I learned more and started using more libraries, it has become more > difficult to maintain this file due to the mixing of the two styles. > However, I'm not sure which approach to take in the long run; the > Customize interface is ideal for initially setting options, because you > can look at all the available options at once. OTOH, having a section with > my own expressions in the file is much better for keeping track of > everything afterward. > > Something similar to this was discussed in this list ("is Customize the > right advice to give?") back in 1999. Variation in preferences was very > large. Is there some general consensus regarding this today, given that > Customize seems to have improved since 1999? > What I found works well for me is to put a bit of elisp at the beginning of my .emacs file which tells emacs to look in my own .emacs.d directory and load the files in that directory. I then can break up all my own customization code into individual files within this directory, which makes it easy to temporarily remove a customization or add new ones. The side effect of doing this is that my .emacs file only contains one bit of elisp code and the 'customize' settings. Prior to adding the bit of elisp, I took an even simpler approach where I added my .emacs.d directory to the load path and then put (provide 'my-xxx) lines in all my setup files. Then I'd have lines like (require 'my-gnusconf) (require 'my-vmconf) in my .emacs file to load each of my config files. both methods worked fine. However, I like the version I have now with the function to load the files as it provides better debuggin/tracking mechanisms. If some new change causes a problem with .emacs and you get the "Cannot load .emacs" error at startup, you can identify which is the offending file slightly more easily than you can using the require/provide approach. The require/provide approach has the advantage that your configs won't be loaded more than once (which can have unexpected side effects) should you decide to re-load .emacs Tim -- Tim Cross The e-mail address on this message is FALSE (obviously!). My real e-mail is to a company in Australia called rapttech and my login is tcross - if you really need to send mail, you should be able to work it out!