unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Load ESS lisp file from user directory instead of from shared location
@ 2010-12-27 20:36 epowell
  0 siblings, 0 replies; 5+ messages in thread
From: epowell @ 2010-12-27 20:36 UTC (permalink / raw)
  To: Help-gnu-emacs


Hello,  

I noticed that I have been using an old version of ESS (stored on a shared
location) and wanted to upgrade to the more recent one.  Rather than contact
the sysadmins, I was hoping I could do this locally.

I downloaded the newest version and placed the folder here:
~/elisp/ess-5.12/ and I added 
(require 'ess-site) to my .emacs file.  Note that my .emacs file also has
(add-to-list 'load-path "~/elisp"). 

Unfortunately, I do not think this worked because when I open an R script
then open an R process, it says: "Type C-h m for help on ESS version 5.3.3". 
(Aside question: Is there any better way to check the version of ESS which
is running?) 

My first thought was that the load path was not searching in the
subdirectories of ~/elisp.  Is this true?  I tried to account for that by
also putting this in my .emacs :

(let ((default-directory "~/elisp"))
      (normal-top-level-add-to-load-path '("ess-5.12" "cedet-1.0pre7")))

This also did not help.  I'm running gnu emacs 21.4.1.

-- 
View this message in context: http://old.nabble.com/Load-ESS-lisp-file-from-user-directory-instead-of-from-shared-location-tp30541254p30541254.html
Sent from the Emacs - Help mailing list archive at Nabble.com.




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

* Re: Load ESS lisp file from user directory instead of from shared location
       [not found] <mailman.4.1293482217.2341.help-gnu-emacs@gnu.org>
@ 2010-12-27 22:41 ` Tim X
  2010-12-28 20:03   ` epowell
       [not found]   ` <mailman.1.1293566701.3661.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 5+ messages in thread
From: Tim X @ 2010-12-27 22:41 UTC (permalink / raw)
  To: help-gnu-emacs

epowell <epowell1@med.miami.edu> writes:

> Hello,  
>
> I noticed that I have been using an old version of ESS (stored on a shared
> location) and wanted to upgrade to the more recent one.  Rather than contact
> the sysadmins, I was hoping I could do this locally.
>
> I downloaded the newest version and placed the folder here:
> ~/elisp/ess-5.12/ and I added 
> (require 'ess-site) to my .emacs file.  Note that my .emacs file also has
> (add-to-list 'load-path "~/elisp"). 
>
> Unfortunately, I do not think this worked because when I open an R script
> then open an R process, it says: "Type C-h m for help on ESS version 5.3.3". 
> (Aside question: Is there any better way to check the version of ESS which
> is running?) 
>
> My first thought was that the load path was not searching in the
> subdirectories of ~/elisp.  Is this true?  I tried to account for that by
> also putting this in my .emacs :
>
> (let ((default-directory "~/elisp"))
>       (normal-top-level-add-to-load-path '("ess-5.12" "cedet-1.0pre7")))
>
> This also did not help.  I'm running gnu emacs 21.4.1.

,----[ C-h f list-load-path-shadows RET ]
| list-load-path-shadows is an interactive autoloaded Lisp function in
| `shadow.el'.
| 
| (list-load-path-shadows &optional STRINGP)
| 
| Display a list of Emacs Lisp files that shadow other files.
| 
| If STRINGP is non-nil, returns any shadows as a string.
| Otherwise, if interactive shows any shadows in a `*Shadows*' buffer;
| else prints messages listing any shadows.
| 
| This function lists potential load path problems.  Directories in
| the `load-path' variable are searched, in order, for Emacs Lisp
| files.  When a previously encountered file name is found again, a
| message is displayed indicating that the later file is "hidden" by
| the earlier.
| 
| For example, suppose `load-path' is set to
| 
| ("/usr/gnu/emacs/site-lisp" "/usr/gnu/emacs/share/emacs/19.30/lisp")
| 
| and that each of these directories contains a file called XXX.el.  Then
| XXX.el in the site-lisp directory is referred to by all of:
| (require 'XXX), (autoload .... "XXX"), (load-library "XXX") etc.
| 
| The first XXX.el file prevents Emacs from seeing the second (unless
| the second is loaded explicitly via `load-file').
| 
| When not intended, such shadowings can be the source of subtle
| problems.  For example, the above situation may have arisen because the
| XXX package was not distributed with versions of Emacs prior to
| 19.30.  An Emacs maintainer downloaded XXX from elsewhere and installed
| it.  Later, XXX was updated and included in the Emacs distribution.
| Unless the Emacs maintainer checks for this, the new version of XXX
| will be hidden behind the old (which may no longer work with the new
| Emacs version).
| 
| This function performs these checks and flags all possible
| shadowings.  Because a .el file may exist without a corresponding .elc
| (or vice-versa), these suffixes are essentially ignored.  A file
| XXX.elc in an early directory (that does not contain XXX.el) is
| considered to shadow a later file XXX.el, and vice-versa.
| 
| Shadowings are located by calling the (non-interactive) companion
| function, `load-path-shadows-find'.
`----

-- 
tcross (at) rapttech dot com dot au


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

* Re: Load ESS lisp file from user directory instead of from shared location
  2010-12-27 22:41 ` Load ESS lisp file from user directory instead of from shared location Tim X
@ 2010-12-28 20:03   ` epowell
       [not found]   ` <mailman.1.1293566701.3661.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 5+ messages in thread
From: epowell @ 2010-12-28 20:03 UTC (permalink / raw)
  To: Help-gnu-emacs


Here's where I'm at now: 

By examining the load-path variable, I was able to determine that the
appropriate subdirectories were added to my load-path (e.g. ess-5.12), but I
didn't take account of the fact that all the lisp files were in a further
sub-directory of that.  This also explains why the list-load-path-shadows
command was not picking up a conflict between my ess files and those on the
shared location.  

I updated my .emacs file with: (add-to-list 'load-path
"~/elisp/ess-5.12/lisp") and now when I do list-load-path-shadows I get a
ton of messages about my ess files hiding the ones in the shared location.  

Unfortunately, the ess in the shared location still gets loaded over mine,
though.  I think this could be because there is a site-start.el file that
calls (require 'ess-site), and since that file gets read before my .emacs
file adds new locations to load-path, that could explain the problem. 
Still, I'm not sure how to fix it.

I am aware of the --no-site-file argument that can be used when invoking
emacs, but I was hoping I could find a solution that wouldn't compromise all
the other things done by site-start.el.

Thanks in advance!
-- 
View this message in context: http://old.nabble.com/Load-ESS-lisp-file-from-user-directory-instead-of-from-shared-location-tp30541254p30547016.html
Sent from the Emacs - Help mailing list archive at Nabble.com.




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

* Re: Load ESS lisp file from user directory instead of from shared location
       [not found]   ` <mailman.1.1293566701.3661.help-gnu-emacs@gnu.org>
@ 2010-12-29  0:16     ` Tim X
  2010-12-29 14:58       ` epowell
  0 siblings, 1 reply; 5+ messages in thread
From: Tim X @ 2010-12-29  0:16 UTC (permalink / raw)
  To: help-gnu-emacs

epowell <epowell1@med.miami.edu> writes:

> Here's where I'm at now: 
>
> By examining the load-path variable, I was able to determine that the
> appropriate subdirectories were added to my load-path (e.g. ess-5.12), but I
> didn't take account of the fact that all the lisp files were in a further
> sub-directory of that.  This also explains why the list-load-path-shadows
> command was not picking up a conflict between my ess files and those on the
> shared location.  
>
> I updated my .emacs file with: (add-to-list 'load-path
> "~/elisp/ess-5.12/lisp") and now when I do list-load-path-shadows I get a
> ton of messages about my ess files hiding the ones in the shared location.  
>
> Unfortunately, the ess in the shared location still gets loaded over mine,
> though.  I think this could be because there is a site-start.el file that
> calls (require 'ess-site), and since that file gets read before my .emacs
> file adds new locations to load-path, that could explain the problem. 
> Still, I'm not sure how to fix it.
>
> I am aware of the --no-site-file argument that can be used when invoking
> emacs, but I was hoping I could find a solution that wouldn't compromise all
> the other things done by site-start.el.
>
> Thanks in advance!

Why not just remove the old version? ESS is not part of the standard
emacs distribution, it is an add on. 

On most (modern) systems, site wide configuraitons are broken up into
individual files with a numberic prefix (usually in somewhere like
/etc/emacs or similar). You could create your own one and make sure it
has a numeric prefix smaller than the existing one. This would mean your
config would be loaded before the other one. However, this is still a
kludge - I'd just remove the old version. 

Tim

-- 
tcross (at) rapttech dot com dot au


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

* Re: Load ESS lisp file from user directory instead of from shared location
  2010-12-29  0:16     ` Tim X
@ 2010-12-29 14:58       ` epowell
  0 siblings, 0 replies; 5+ messages in thread
From: epowell @ 2010-12-29 14:58 UTC (permalink / raw)
  To: Help-gnu-emacs


I don't actually have sufficient permissions to do that.  I would have to ask
our sysadmins and I was hoping I could avoid involving them.  Nevertheless,
I will take that into consideration. 

Thanks for all your help.  I learned a fair bit in the process :)
-- 
View this message in context: http://old.nabble.com/Load-ESS-lisp-file-from-user-directory-instead-of-from-shared-location-tp30541254p30551670.html
Sent from the Emacs - Help mailing list archive at Nabble.com.




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

end of thread, other threads:[~2010-12-29 14:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.4.1293482217.2341.help-gnu-emacs@gnu.org>
2010-12-27 22:41 ` Load ESS lisp file from user directory instead of from shared location Tim X
2010-12-28 20:03   ` epowell
     [not found]   ` <mailman.1.1293566701.3661.help-gnu-emacs@gnu.org>
2010-12-29  0:16     ` Tim X
2010-12-29 14:58       ` epowell
2010-12-27 20:36 epowell

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).