all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* How to customize load-path in v21.2.1?
@ 2002-10-29 17:11 Da Witch
  2002-10-29 17:32 ` Michael Slass
  0 siblings, 1 reply; 7+ messages in thread
From: Da Witch @ 2002-10-29 17:11 UTC (permalink / raw)




The transition from 20.7.2 to 21.2.1 is turning out to be painful...

How do I customize load-path in 21.2.1?  describe-variable suggests
that it is no longer customizable...

hk

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

* Re: How to customize load-path in v21.2.1?
  2002-10-29 17:11 How to customize load-path in v21.2.1? Da Witch
@ 2002-10-29 17:32 ` Michael Slass
  0 siblings, 0 replies; 7+ messages in thread
From: Michael Slass @ 2002-10-29 17:32 UTC (permalink / raw)


Da Witch <heather710101@yahoo.com> writes:

>The transition from 20.7.2 to 21.2.1 is turning out to be painful...
>
>How do I customize load-path in 21.2.1?  describe-variable suggests
>that it is no longer customizable...
>
>hk
>

I'm not sure why it's not customizeable any more, but here's one way
to do it programmatically.

(mapcar
 (lambda (dir)
   (add-to-list 'load-path dir))
 ;; these directories get added to the front of the load-path
 '("/path/to/dir"
   "/path/to/another/dir"
   ;; add more load-path directories here
   ))



(mapcar
 (lambda (dir)
   (add-to-list 'load-path dir t))
 ;; these directories get added to the end of the load-path
 '("/path/to/yet/another/dir"
   "/path/to/still/another/dir"
   ;; add more load-path directories here
   ))

  


-- 
Mike Slass

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

* RE: How to customize load-path in v21.2.1?
@ 2002-10-29 18:08 Bingham, Jay
  0 siblings, 0 replies; 7+ messages in thread
From: Bingham, Jay @ 2002-10-29 18:08 UTC (permalink / raw)


I don't know what the variable documentation in your version 21.2 says, but I would hope that it says the same thing that mine does in both 21.2 and 20.4, which is:

*List of directories to search for files to load.
Each element is a string (directory name) or nil (try default directory).
Initialized based on EMACSLOADPATH environment variable, if any,
otherwise to default specified by file `epaths.h' when Emacs was built.

I don't see anything in there that I would interpret as an indication that it is not customizable.  What it says is that if you do not have a environment variable EMACSLOADPATH then it will contain what was specified in the file 'epaths.h' when the version of emacs that you are using was built.  If that is a Unix system, then that is likely the system where you are running it.  The value can be very specific to the system (and you probably do not want to remove any of it).  Also implied is that if you set the variable EMACSLOADPATH it will replace what emacs was built with.  Sounds customizable to me.

Of course you may not want to replicate everything that emacs was built with to in order to add a couple of directories to the front or end of the load path.  In which case the method that is shown here or some other method of adding to the list is the preferred method.

-_
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-

 -----Original Message-----
From: 	Michael Slass [mailto:miknrene@drizzle.com] 
Sent:	Tuesday, October 29, 2002 11:33 AM
To:	help-gnu-emacs@gnu.org
Subject:	Re: How to customize load-path in v21.2.1?

Da Witch <heather710101@yahoo.com> writes:

>The transition from 20.7.2 to 21.2.1 is turning out to be painful...
>
>How do I customize load-path in 21.2.1?  describe-variable suggests
>that it is no longer customizable...
>
>hk
>

I'm not sure why it's not customizeable any more, but here's one way
to do it programmatically.

(mapcar
 (lambda (dir)
   (add-to-list 'load-path dir))
 ;; these directories get added to the front of the load-path
 '("/path/to/dir"
   "/path/to/another/dir"
   ;; add more load-path directories here
   ))



(mapcar
 (lambda (dir)
   (add-to-list 'load-path dir t))
 ;; these directories get added to the end of the load-path
 '("/path/to/yet/another/dir"
   "/path/to/still/another/dir"
   ;; add more load-path directories here
   ))

  


-- 
Mike Slass
_______________________________________________
Help-gnu-emacs mailing list
Help-gnu-emacs@gnu.org
http://mail.gnu.org/mailman/listinfo/help-gnu-emacs

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

* Re: How to customize load-path in v21.2.1?
       [not found] <mailman.1035914973.24180.help-gnu-emacs@gnu.org>
@ 2002-10-29 18:21 ` Da Witch
  2002-10-29 19:06   ` Stefan Monnier <foo@acm.com>
  0 siblings, 1 reply; 7+ messages in thread
From: Da Witch @ 2002-10-29 18:21 UTC (permalink / raw)


In <mailman.1035914973.24180.help-gnu-emacs@gnu.org> "Bingham, Jay" <Jay.Bingham@hp.com> writes:

>I don't know what the variable documentation in your version 21.2 says, =
>but I would hope that it says the same thing that mine does in both 21.2 =
>and 20.4, which is:

In 20.7.2, the last line in the *Help* buffer for describe-variable
load-path is "You can customize this variable."  (The word "customize"
is a link to a customization screen.)  This line does not appear in
21.2.1.

hk

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

* Re: How to customize load-path in v21.2.1?
  2002-10-29 18:21 ` Da Witch
@ 2002-10-29 19:06   ` Stefan Monnier <foo@acm.com>
  2002-10-29 21:22     ` Michael Slass
  0 siblings, 1 reply; 7+ messages in thread
From: Stefan Monnier <foo@acm.com> @ 2002-10-29 19:06 UTC (permalink / raw)


>>>>> "Da" == Da Witch <heather710101@yahoo.com> writes:
> In 20.7.2, the last line in the *Help* buffer for describe-variable
> load-path is "You can customize this variable."  (The word "customize"
> is a link to a customization screen.)  This line does not appear in
> 21.2.1.

Indeed.  Customization of `load-path' was available under Emacs-20
but was turned off for Emacs-21 because it didn't do the right thing (it
hardcoded paths that change from version to version).

Just use (add-to-list 'load-path "/where/ever/I/put/my/elisp/files")


        Stefan

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

* RE: How to customize load-path in v21.2.1?
@ 2002-10-29 20:13 Bingham, Jay
  0 siblings, 0 replies; 7+ messages in thread
From: Bingham, Jay @ 2002-10-29 20:13 UTC (permalink / raw)


Now that I look closer at what is displayed by 20.4 I see that I overlooked that line, sorry about that.  Now I understand what you mean by "customizable".  Since I do not like the way that "custom" messes with my .emacs I avoid using it if at all possible.

A search through the Emacs News (Help > Emacs News) yields the following in the section on 21.1:

** Variable `load-path' is no longer customizable through Customize.

You can no longer use `M-x customize-variable' to customize `load-path'
because it now contains a version-dependent component.  You can still
use `add-to-list' and `setq' to customize this variable in your
`~/.emacs' init file or to modify it from any Lisp program in general.

I assume that the link that used to be there invoked customize-variable.

Having discovered the above information I went to the Options menu and selecting Customize Emacs > Settings Matching Regexp..., set the regexp to load-path, edited the load-path that was displayed in the resulting *Customize Apropos* buffer and saved it for a future session.  I then opened up my .emacs and looked at what was put into the file.

Now I think that I understand why this capability was removed.  Customize puts the entire load path into your .emacs, not just the things you changed.  Since the default load path has version-specific components in the directory specifications it is not a good idea to have those hard coded in your .emacs file when you upgrade to a new version of emacs.  The version-specific components were present in the directory specifications as far back as 20.4, so even then it was a dangerous thing to do.  It is much safer to customize your load path by adding to the default load path, then you do not have to edit your .emacs file to change the load path when you upgrade.

-_
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-

 -----Original Message-----
From: 	Da Witch [mailto:heather710101@yahoo.com] 
Sent:	Tuesday, October 29, 2002 12:22 PM
To:	help-gnu-emacs@gnu.org
Subject:	Re: How to customize load-path in v21.2.1?

In <mailman.1035914973.24180.help-gnu-emacs@gnu.org> "Bingham, Jay" <Jay.Bingham@hp.com> writes:

>I don't know what the variable documentation in your version 21.2 says, =
>but I would hope that it says the same thing that mine does in both 21.2 =
>and 20.4, which is:

In 20.7.2, the last line in the *Help* buffer for describe-variable
load-path is "You can customize this variable."  (The word "customize"
is a link to a customization screen.)  This line does not appear in
21.2.1.

hk

_______________________________________________
Help-gnu-emacs mailing list
Help-gnu-emacs@gnu.org
http://mail.gnu.org/mailman/listinfo/help-gnu-emacs

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

* Re: How to customize load-path in v21.2.1?
  2002-10-29 19:06   ` Stefan Monnier <foo@acm.com>
@ 2002-10-29 21:22     ` Michael Slass
  0 siblings, 0 replies; 7+ messages in thread
From: Michael Slass @ 2002-10-29 21:22 UTC (permalink / raw)


"Stefan Monnier <foo@acm.com>" <monnier+gnu.emacs.help/news/@flint.cs.yale.edu> writes:

>>>>>> "Da" == Da Witch <heather710101@yahoo.com> writes:
>> In 20.7.2, the last line in the *Help* buffer for describe-variable
>> load-path is "You can customize this variable."  (The word "customize"
>> is a link to a customization screen.)  This line does not appear in
>> 21.2.1.
>
>Indeed.  Customization of `load-path' was available under Emacs-20
>but was turned off for Emacs-21 because it didn't do the right thing (it
>hardcoded paths that change from version to version).
>
>Just use (add-to-list 'load-path "/where/ever/I/put/my/elisp/files")
>
>
>        Stefan

Perhaps there should be a customizeable feature like
user-load-path-before and user-load-path-after which load would look
in before and after load-path respectively.

-- 
Mike Slass

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

end of thread, other threads:[~2002-10-29 21:22 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-10-29 17:11 How to customize load-path in v21.2.1? Da Witch
2002-10-29 17:32 ` Michael Slass
  -- strict thread matches above, loose matches on Subject: below --
2002-10-29 18:08 Bingham, Jay
     [not found] <mailman.1035914973.24180.help-gnu-emacs@gnu.org>
2002-10-29 18:21 ` Da Witch
2002-10-29 19:06   ` Stefan Monnier <foo@acm.com>
2002-10-29 21:22     ` Michael Slass
2002-10-29 20:13 Bingham, Jay

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.