lewis@rocky.STANFORD.EDU (Bil Lewis) (01/27/88)
Harald, There is this function: substitute-in-file-name: Substitute environment variables referred to in STRING. A $ begins a request to substitute; the env variable name is the alphanumeric characters after the $, or else is surrounded by braces. If a ~ appears following a /, everything through that / is discarded. On VMS, $ substitution is not done; this function does little and only duplicates what expand-file-name does. which should solve your problem: (setq load-path (cons (substitute-in-file-name "$HOME/emacs") load-path)) => ("/user/lewis/emacs" "/usr/stanford/lib/gnuemacs/lisp") -Bil --
karl@haddock.ISC.COM (Karl Heuer) (01/27/88)
In article <724@PT.CS.CMU.EDU> cef@H.GP.CS.CMU.EDU (Charles Fineman) writes: >[Since load-path doesn't like tildes], you might try the following: > (setq load-path (cons (format "%s/.emacs" (getenv "HOME")) load-path)) I ran into this problem, too. I think a better solution is (setq load-path (cons (expand-file-name "~/lib/emacs") load-path)) Karl W. Z. Heuer (ima!haddock!karl or karl@haddock.isc.com), The Walking Lint
msb@ho5cad.ATT.COM (02/08/88)
In article <2402@haddock.ISC.COM> karl@haddock.ISC.COM (Karl Heuer) writes: In article <724@PT.CS.CMU.EDU> cef@H.GP.CS.CMU.EDU (Charles Fineman) writes: >[Since load-path doesn't like tildes], you might try the following: > (setq load-path (cons (format "%s/.emacs" (getenv "HOME")) load-path)) I ran into this problem, too. I think a better solution is (setq load-path (cons (expand-file-name "~/lib/emacs") load-path)) Karl W. Z. Heuer (ima!haddock!karl or karl@haddock.isc.com), The Walking Lint ---------------------------------------------------------------- ---------------------------------------------------------------- My first question: Why is this a "better solution"? My second question: I am just starting to learn some of this GNU .el stuff -- I'd looked a bit into the UniPress .ml stuff. Since there is not a 'tutorial' on the language, I'd be interested to hear from some experienced .el-programmers. All of the following were proposed as solutions to the original problem. Are any of the following good/bad, correct/incorrect, efficient/inefficient, etc? (setq load-path (cons (format "%s/.emacs" (getenv "HOME")) load-path)) (setq load-path (concat (getenv "HOME") "/elisp-library") load-path) (setq load-path (cons (substitute-in-file-name "$HOME/emacs") load-path)) (setq load-path (cons (expand-file-name "~/lib/emacs") load-path)) Sorry I couldn't give specific credit to the authors of the lines -- you can look them up for yourself in previous net-news articles. My third question: Is it true that there is no 'tutorial' on the elisp language? Thanks in advance for any help -- I'm sure that others will appreciate it also.
markl@PTT.LCS.MIT.EDU (02/11/88)
From: msb@ho5cad.ATT.COM Date: 8 Feb 88 14:59:34 GMT Sender: nuucp@ho7cad.ATT.COM In article <2402@haddock.ISC.COM> karl@haddock.ISC.COM (Karl Heuer) writes: In article <724@PT.CS.CMU.EDU> cef@H.GP.CS.CMU.EDU (Charles Fineman) writes: >[Since load-path doesn't like tildes], you might try the following: > (setq load-path (cons (format "%s/.emacs" (getenv "HOME")) load-path)) I ran into this problem, too. I think a better solution is (setq load-path (cons (expand-file-name "~/lib/emacs") load-path)) Karl W. Z. Heuer (ima!haddock!karl or karl@haddock.isc.com), The Walking Lint ---------------------------------------------------------------- ---------------------------------------------------------------- My first question: Why is this a "better solution"? My second question: I am just starting to learn some of this GNU .el stuff -- I'd looked a bit into the UniPress .ml stuff. Since there is not a 'tutorial' on the language, I'd be interested to hear from some experienced .el-programmers. All of the following were proposed as solutions to the original problem. Are any of the following good/bad, correct/incorrect, efficient/inefficient, etc? (setq load-path (cons (format "%s/.emacs" (getenv "HOME")) load-path)) (setq load-path (concat (getenv "HOME") "/elisp-library") load-path) (setq load-path (cons (substitute-in-file-name "$HOME/emacs") load-path)) (setq load-path (cons (expand-file-name "~/lib/emacs") load-path)) Sorry I couldn't give specific credit to the authors of the lines -- you can look them up for yourself in previous net-news articles. My third question: Is it true that there is no 'tutorial' on the elisp language? Thanks in advance for any help -- I'm sure that others will appreciate it also.