From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Barry Margolin Newsgroups: gmane.emacs.help Subject: Re: About HOME in OS X Date: Tue, 11 Jun 2013 12:45:09 -0400 Organization: A noiseless patient Spider Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 X-Trace: ger.gmane.org 1370970080 17878 80.91.229.3 (11 Jun 2013 17:01:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 11 Jun 2013 17:01:20 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jun 11 19:01:21 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UmRwb-0004WF-PU for geh-help-gnu-emacs@m.gmane.org; Tue, 11 Jun 2013 19:01:17 +0200 Original-Received: from localhost ([::1]:58262 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UmRwb-0008IY-Ed for geh-help-gnu-emacs@m.gmane.org; Tue, 11 Jun 2013 13:01:17 -0400 X-Received: by 10.180.185.132 with SMTP id fc4mr1356608wic.7.1370969110174; Tue, 11 Jun 2013 09:45:10 -0700 (PDT) Original-Path: usenet.stanford.edu!lg1no18664929wic.0!news-out.google.com!hv6ni14684wib.1!nntp.google.com!feeder1.cambriumusenet.nl!82.197.223.108.MISMATCH!feeder2.cambriumusenet.nl!feed.tweaknews.nl!195.71.90.67.MISMATCH!news.unit0.net!eternal-september.org!feeder.eternal-september.org!mx05.eternal-september.org!barmar.motzarella.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 33 Injection-Info: barmar.motzarella.org; posting-host="2be9e9f5dd9af768b8861af71b85fc28"; logging-data="30398"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+2mDF/RPIByQWmx+2bs4vh" User-Agent: MT-NewsWatcher/3.5.3b3 (Intel Mac OS X) Cancel-Lock: sha1:bQ7Eah9OAXnJeEgjdZAt3nxkmYA= Original-Xref: usenet.stanford.edu gnu.emacs.help:199195 X-Mailman-Approved-At: Tue, 11 Jun 2013 13:01:09 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:91460 Archived-At: In article , Eli Zaretskii wrote: > > Date: Tue, 11 Jun 2013 19:27:46 +0800 > > From: Xue Fuqiao > > > > On Tue, Jun 11, 2013 at 7:22 PM, Xue Fuqiao 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 ***