help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: About HOME in OS X


From: Barry Margolin
Subject: Re: About HOME in OS X
Date: Tue, 11 Jun 2013 12:45:09 -0400
User-agent: MT-NewsWatcher/3.5.3b3 (Intel Mac OS X)

In article <mailman.1403.1370966034.22516.help-gnu-emacs@gnu.org>,
 Eli Zaretskii <eliz@gnu.org> wrote:

> > Date: Tue, 11 Jun 2013 19:27:46 +0800
> > From: Xue Fuqiao <xfq.free@gmail.com>
> > 
> > On Tue, Jun 11, 2013 at 7:22 PM, Xue Fuqiao <xfq.free@gmail.com> wrote:
> > > Hi list,
> > >
> > > On my system (OS X 10.8.4):
> > >
> > >   ELISP> (getenv "HOME")
> > >   "/Users/xfq"
> > >   ELISP> (expand-file-name "$HOME/foo")
> > >   "/Users/xfq/emacs-repo/bzr/trunk/nextstep/Emacs.app/Contents/MacOS/$HOME
> > >   /foo"
> > >
> > > I'm confused here.  Why don't the result of two evaluations be the same?
> 
> Could be a symlink or something similar?

No, it just means that he did it while his current directory was 
/Users/xfq/emacs-repo/bzr/trunk/nextstep/Emacs.app/Contents/MacOS. 
"$HOME/foo" is a relative path, so it's appended to the current 
directory.

As someone else pointed out, expand-file-name doesn't expand environment 
variables.

-- 
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***


reply via email to

[Prev in Thread] Current Thread [Next in Thread]