From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: bojohan+news@dd.chalmers.se (Johan =?iso-8859-1?q?Bockg=E5rd?=) Newsgroups: gmane.emacs.help Subject: Re: emacs windows load path Date: Sat, 29 Mar 2003 21:46:55 +0100 Organization: Chalmers University of Technology, Sweden Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1048971192 9386 80.91.224.249 (29 Mar 2003 20:53:12 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sat, 29 Mar 2003 20:53:12 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Sat Mar 29 21:53:11 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18zNKA-0002RC-00 for ; Sat, 29 Mar 2003 21:53:10 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18zNIn-0001sd-02 for gnu-help-gnu-emacs@m.gmane.org; Sat, 29 Mar 2003 15:51:45 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!feed.news.nacamar.de!uninett.no!ntnu.no!uio.no!news.netg.se!dd.chalmers.se!not-for-mail Original-Newsgroups: gnu.emacs.help,comp.emacs Original-Lines: 33 Original-NNTP-Posting-Host: helm.dd.chalmers.se User-Agent: Gnus/5.090016 (Oort Gnus v0.16) Emacs/21.2 (usg-unix-v) Cancel-Lock: sha1:0TGCNVUvQyqRKzzxHJ8Nw4Oj7tE= Original-Xref: shelby.stanford.edu gnu.emacs.help:111483 comp.emacs:78445 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:7983 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:7983 Chris writes: > With emacs 21 on Windows, is there a way to get the load-path > behavior to work as it does in Linux. Specifically, I have this in > my linux .emacs: > > ;; Add Personal lisp files to load path > (add-to-list 'load-path "~/elisp") > > Which gets all the files in ~/elisp and all subdirectories. Really? I don't think it does. I do think that it is convenient, though, so I use the following hack. (defun add-subdirs-to-load-path (dir) ;; wants a trailing slash (let ((default-directory (concat dir "/"))) (normal-top-level-add-subdirs-to-load-path))) ,----[ C-h f normal-top-level-add-subdirs-to-load-path RET ] | normal-top-level-add-subdirs-to-load-path is a compiled Lisp | function in `startup'. | (normal-top-level-add-subdirs-to-load-path) | | Add all subdirectories of current directory to `load-path'. | More precisely, this uses only the subdirectories whose names | start with letters or digits; it excludes any subdirectory named `RCS' | or `CVS', and any subdirectory that contains a file named `.nosearch'. `---- Then I can do (add-subdirs-to-load-path "~/elisp"). /Johan