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: Peter Dyballa
Subject: Re: About HOME in OS X
Date: Tue, 11 Jun 2013 17:13:15 +0200

Am 11.06.2013 um 13:22 schrieb Xue Fuqiao:

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


This must be a failure on Mac OS X – I see it too in GNU Emacs of some 23.x and 
24.x versions and variants… But wait! What is the documentation saying?

        Convert filename NAME to absolute, and canonicalize it.
        Second arg DEFAULT-DIRECTORY is directory to start with if NAME is 
relative
        (does not start with slash or tilde); if DEFAULT-DIRECTORY is nil or 
missing,
        the current buffer's value of `default-directory' is used.
        NAME should be a string that is a valid file name for the underlying
        filesystem.

So this is *not* a function or function that deals with some shell's 
constructs. "$HOME" is such a thing.

--
Greetings

  Pete

Every instructor assumes that you have nothing else to do except study for that 
instructor's course. 
                                – Fourth Law of Applied Terror




reply via email to

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