From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: =?ISO-8859-1?Q?S=E9bastien_Kirche?= Newsgroups: gmane.emacs.help Subject: Re: Auto load at startup Date: Tue, 14 Oct 2003 10:43:42 +0200 Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <83CA5165-FE22-11D7-A6A2-000393861220@sage.com> References: <3F8AE45A.7080606@yahoo.com> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 (Apple Message framework v552) Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1066121329 11568 80.91.224.253 (14 Oct 2003 08:48:49 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 14 Oct 2003 08:48:49 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Oct 14 10:48:46 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1A9KrC-00022R-00 for ; Tue, 14 Oct 2003 10:48:46 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1A9Kon-0003rG-7k for geh-help-gnu-emacs@m.gmane.org; Tue, 14 Oct 2003 04:46:13 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1A9Kno-0003ir-U4 for help-gnu-emacs@gnu.org; Tue, 14 Oct 2003 04:45:12 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1A9KnH-0003PF-Vk for help-gnu-emacs@gnu.org; Tue, 14 Oct 2003 04:45:11 -0400 Original-Received: from [195.25.216.129] (helo=Mis.sage.fr) by monty-python.gnu.org with esmtp (Exim 4.24) id 1A9KnH-0003Nd-4j for help-gnu-emacs@gnu.org; Tue, 14 Oct 2003 04:44:39 -0400 Original-Received: from sage.com (SEKIMACG4 [172.18.3.54]) by Mis.sage.fr with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13) id TFSF0X5T; Tue, 14 Oct 2003 10:47:34 +0200 Original-To: emacs-help In-Reply-To: <3F8AE45A.7080606@yahoo.com> X-Mailer: Apple Mail (2.552) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 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 Xref: main.gmane.org gmane.emacs.help:13169 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:13169 Le lundi, 13 oct 2003, =E0 19:43 Europe/Paris, Kevin Rodgers a =E9crit : >> I tried this tip that seems to work, but I would like to understand=20= >> why the subdirs.el fails/isn't sufficient. > > What exactly did you put in ~/.my_elisp_dir/subdirs.el that didn't=20 > work? Well, actually, i think after investigation that I could have fixed my=20 problem. It was mainly a mis-understand of behaviour of emacs about the=20 load-path : i first added the following in my .emacs : ,---- | (if (file-exists-p "~/.elisp/" ) | (setq load-path (cons (concat "~/.elisp/" ) load-path)) | ) `---- and that subdirs.el in ~/.elisp : ,---- | (if (fboundp 'normal-top-level-add-subdirs-to-load-path) | (normal-top-level-add-subdirs-to-load-path)) `---- the lisp files that were in ~/.elisp were accessible, but i found that=20= packages in subdirs were accessibles but not pre-loaded, that was what=20= i mis-understood. I corrected the following like this : ,---- | ; check either Emacs or XEmacs | (defvar is-xemacs | (string-match "XEmacs" emacs-version) | "Variable interne differente de nil si on est dans XEmacs" | ) | | ; add my personal elisp directory to search path + preload | (defvar my-elisp-path "~/.elisp" "Chemin vers mes packages elisp") | (if is-xemacs | (setq my-elisp-path (expand-file-name my-elisp-path)) | ) | (add-to-list 'load-path my-elisp-path)=09 | (progn (cd my-elisp-path) (normal-top-level-add-subdirs-to-load-path)) `---- What do you think of that proposition ? Thanks for any remark S=E9bastien.=