From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Giorgos Keramidas Newsgroups: gmane.emacs.help Subject: Re: Take effect on changes in .emacs without closing emacs Date: Thu, 17 Apr 2008 02:55:31 +0300 Organization: SunSITE.dk - Supporting Open source Message-ID: <87myntnymk.fsf@kobe.laptop> References: <9caa44ec-01a0-4638-a4ea-d819525400a5@w5g2000prd.googlegroups.com> <87od898tch.fsf@merkury.smsnet.pl> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1208392854 17615 80.91.229.12 (17 Apr 2008 00:40:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 17 Apr 2008 00:40:54 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Apr 17 02:41:15 2008 connect(): Connection refused Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JmIBb-0001Yx-UF for geh-help-gnu-emacs@m.gmane.org; Thu, 17 Apr 2008 02:41:12 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JmIAw-0002es-N4 for geh-help-gnu-emacs@m.gmane.org; Wed, 16 Apr 2008 20:40:30 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!goblin1!goblin2!goblin.stu.neva.ru!news.net.uni-c.dk!dotsrc.org!filter.dotsrc.org!news.dotsrc.org!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) Cancel-Lock: sha1:o1O0t9dyWmvG2UtMFEdCEOu5JwU= Original-Lines: 23 Original-NNTP-Posting-Host: 77.49.237.36 Original-X-Trace: news.sunsite.dk DXC=JKgJUDJ`Af; jd^7_dR6Ih5YSB=nbEKnk; jL0kO3l6od>L^Mj7bH?lJH1Tkj<^8N_5Y`W4g4k0GeS5Mj=Y> Original-X-Complaints-To: staff@sunsite.dk Original-Xref: shelby.stanford.edu gnu.emacs.help:157979 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:53345 Archived-At: On Wed, 16 Apr 2008 21:58:38 +0200, Rob Wolfe wrote: > istillshine@gmail.com writes: > >> How to see the results of my change of .emacs without exiting emacs? > > I use this function: > > ;; reload the init file > (defun reload () > "Reload the .emacs file" > (interactive "*" ) > (load-file ".emacs")) The current directory may have changed since Emacs started. A minor improvement is probably: (load-file user-init-file) The `user-init-file' contains the absolute path of the user's init file. If the actual init file loaded is a compiled file, such as `.emacs.elc', the value refers to the corresponding source file, so the `load-file' call will DTRT regardless of the current working directory.