unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* emacs windows load path
@ 2003-03-29 19:08 Chris
  2003-03-29 20:46 ` Johan Bockgård
  2003-03-29 20:52 ` Ehud Karni
  0 siblings, 2 replies; 5+ messages in thread
From: Chris @ 2003-03-29 19:08 UTC (permalink / raw)


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. On Windows, 
however, it seems that I have to specifically add every subdirectory in my 
~/elisp directory or else Emacs doesn't see them. Why?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: emacs windows load path
@ 2003-03-29 19:43 Bingham, Jay
  0 siblings, 0 replies; 5+ messages in thread
From: Bingham, Jay @ 2003-03-29 19:43 UTC (permalink / raw)


On Saturday, March 29, 2003 1:09 PM Chris wrote:

>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. On Windows,

>however, it seems that I have to specifically add every subdirectory in
my 
>~/elisp directory or else Emacs doesn't see them. Why?

That is curious, I run Emacs on unix and on windows and the load path
acts just the same as on both, only the directories specified in the
path are searched.  You may want to check out what the Elisp manual says
about load-path and subdirectories, (if you do not have it installed
see:
http://www.gnu.org/manual/elisp-manual-21-2.8/html_mono/elisp.html).

-_
J_)
C_)ingham
.    HP - NonStop Austin Software & Services - Software Quality
Assurance
.    Austin, TX
. "Language is the apparel in which your thoughts parade in public.
.  Never clothe them in vulgar and shoddy attire."     -Dr. George W.
Crane-

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: emacs windows load path
  2003-03-29 19:08 emacs windows load path Chris
@ 2003-03-29 20:46 ` Johan Bockgård
  2003-03-31 16:08   ` Stefan Monnier
  2003-03-29 20:52 ` Ehud Karni
  1 sibling, 1 reply; 5+ messages in thread
From: Johan Bockgård @ 2003-03-29 20:46 UTC (permalink / raw)


Chris <chrisl_ak@hotmail.com> 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: emacs windows load path
  2003-03-29 19:08 emacs windows load path Chris
  2003-03-29 20:46 ` Johan Bockgård
@ 2003-03-29 20:52 ` Ehud Karni
  1 sibling, 0 replies; 5+ messages in thread
From: Ehud Karni @ 2003-03-29 20:52 UTC (permalink / raw)
  Cc: help-gnu-emacs

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sat, 29 Mar 2003 19:08:40 -0000, Chris <chrisl_ak@hotmail.com> wrote:
> 
> 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")

Add the subdirs.el to your directory with line like:
(normal-top-level-add-subdirs-to-load-path)
Search the `site-lisp' directory for this file.
See the help for this function.

Ehud.


- -- 
 Ehud Karni           Tel: +972-3-7966-561  /"\
 Mivtach - Simon      Fax: +972-3-7966-667  \ /  ASCII Ribbon Campaign
 Insurance agencies   (USA) voice mail and   X   Against   HTML   Mail
 http://www.mvs.co.il  FAX:  1-815-5509341  / \
 mailto:ehud@unix.mvs.co.il                  Better  Safe  Than  Sorry
-----BEGIN PGP SIGNATURE-----
Comment: use http://www.keyserver.net/ to get my key (and others)

iD8DBQE+hgeFLFvTvpjqOY0RAjEIAJ9m7xrAFrT1JROXHUPP6DgW2waa0gCfRlO9
ixGbywEDpSkuXWCT+a0JZ40=
=wp3D
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: emacs windows load path
  2003-03-29 20:46 ` Johan Bockgård
@ 2003-03-31 16:08   ` Stefan Monnier
  0 siblings, 0 replies; 5+ messages in thread
From: Stefan Monnier @ 2003-03-31 16:08 UTC (permalink / raw)


>   (let ((default-directory (concat dir "/")))

    (let ((default-directory (file-name-as-directory dir)))


        Stefan

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-03-31 16:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-03-29 19:08 emacs windows load path Chris
2003-03-29 20:46 ` Johan Bockgård
2003-03-31 16:08   ` Stefan Monnier
2003-03-29 20:52 ` Ehud Karni
  -- strict thread matches above, loose matches on Subject: below --
2003-03-29 19:43 Bingham, Jay

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).