From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.help Subject: RE: Lisp code to expand /~ and // but not env vars? Date: Sun, 2 Oct 2005 17:03:32 -0700 Message-ID: References: <43406A33.1080107@student.lu.se> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1128298108 25779 80.91.229.2 (3 Oct 2005 00:08:28 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 3 Oct 2005 00:08:28 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Oct 03 02:08:27 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EMDsC-0006zH-RG for geh-help-gnu-emacs@m.gmane.org; Mon, 03 Oct 2005 02:08:05 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EMDsC-0006ao-3g for geh-help-gnu-emacs@m.gmane.org; Sun, 02 Oct 2005 20:08:04 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EMDqC-0005pz-9x for help-gnu-emacs@gnu.org; Sun, 02 Oct 2005 20:06:03 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EMDq0-0005jM-Va for help-gnu-emacs@gnu.org; Sun, 02 Oct 2005 20:05:53 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EMDpz-0005ic-Ez for help-gnu-emacs@gnu.org; Sun, 02 Oct 2005 20:05:47 -0400 Original-Received: from [141.146.126.228] (helo=agminet01.oracle.com) by monty-python.gnu.org with esmtp (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.34) id 1EMDo3-0000d3-Pz for help-gnu-emacs@gnu.org; Sun, 02 Oct 2005 20:03:47 -0400 Original-Received: from rgmsgw300.us.oracle.com (rgmsgw300.us.oracle.com [138.1.186.49]) by agminet01.oracle.com (Switch-3.1.7/Switch-3.1.7) with ESMTP id j93078V2005396 for ; Sun, 2 Oct 2005 19:07:09 -0500 Original-Received: from rgmsgw300.us.oracle.com (localhost [127.0.0.1]) by rgmsgw300.us.oracle.com (Switch-3.1.7/Switch-3.1.7) with ESMTP id j9303jNw030136 for ; Sun, 2 Oct 2005 18:03:45 -0600 Original-Received: from dradamslap (dhcp-amer-csvpn-gw1-141-144-64-204.vpn.oracle.com [141.144.64.204]) by rgmsgw300.us.oracle.com (Switch-3.1.7/Switch-3.1.7) with SMTP id j9303iKa030129 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) for ; Sun, 2 Oct 2005 18:03:45 -0600 Original-To: "Help-Gnu-Emacs" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) Importance: Normal In-Reply-To: <43406A33.1080107@student.lu.se> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506 X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:29869 Archived-At: >I'm looking for Lisp code that will expand /~ and // in a file name, just as Not quite what you are looking for, but maybe you can use (expand-file-name "" "~/")? Thanks Lennart, but no, that's not it. I need to deal with an arbitrary input file name, and an arbitrary default directory. Function `expand-file-name' does not replace "//" and "/~" as `substitute-in-file-name' does.