From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: `concat' a dir and a file (was: Strange `file-name-sans-extension' behavior ) Date: Fri, 16 Aug 2002 22:51:10 -0600 (MDT) Sender: emacs-devel-admin@gnu.org Message-ID: <200208170451.g7H4pAN08664@wijiji.santafe.edu> References: <200207271853.g6RIrf310840@aztec.santafe.edu> <200208090738.g797clg11797@rum.cs.yale.edu> <200208101716.g7AHGqc05959@wijiji.santafe.edu> <200208121558.g7CFw0K29043@rum.cs.yale.edu> <8011-Mon12Aug2002202814+0300-eliz@is.elta.co.il> <200208132247.g7DMl0607244@wijiji.santafe.edu> <2593-Wed14Aug2002140316+0300-eliz@is.elta.co.il> <200208142314.g7ENEMX07736@wijiji.santafe.edu> <2110-Thu15Aug2002195139+0300-eliz@is.elta.co.il> <200208160231.g7G2Vb508088@wijiji.santafe.edu> <200208161717.g7GHHWw31172@rum.cs.yale.edu> Reply-To: rms@gnu.org NNTP-Posting-Host: localhost.gmane.org X-Trace: main.gmane.org 1029559904 19400 127.0.0.1 (17 Aug 2002 04:51:44 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sat, 17 Aug 2002 04:51:44 +0000 (UTC) Cc: eliz@is.elta.co.il, Jens.Schmidt27@epost.de, emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17fvYs-00052n-00 for ; Sat, 17 Aug 2002 06:51:42 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 17fvzB-0000Kr-00 for ; Sat, 17 Aug 2002 07:18:53 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17fvZs-0006cC-00; Sat, 17 Aug 2002 00:52:44 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17fvYk-0006Kw-00 for emacs-devel@gnu.org; Sat, 17 Aug 2002 00:51:34 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17fvYQ-0006BZ-00 for emacs-devel@gnu.org; Sat, 17 Aug 2002 00:51:26 -0400 Original-Received: from pele.santafe.edu ([192.12.12.119]) by monty-python.gnu.org with esmtp (Exim 4.10) id 17fvYP-0006Af-00; Sat, 17 Aug 2002 00:51:13 -0400 Original-Received: from wijiji.santafe.edu (wijiji [192.12.12.5]) by pele.santafe.edu (8.11.6+Sun/8.11.6) with ESMTP id g7H4pV512737; Fri, 16 Aug 2002 22:51:31 -0600 (MDT) Original-Received: (from rms@localhost) by wijiji.santafe.edu (8.11.6+Sun/8.9.3) id g7H4pAN08664; Fri, 16 Aug 2002 22:51:10 -0600 (MDT) X-Authentication-Warning: wijiji.santafe.edu: rms set sender to rms@wijiji using -f Original-To: monnier+gnu/emacs@rum.cs.yale.edu In-Reply-To: <200208161717.g7GHHWw31172@rum.cs.yale.edu> (monnier+gnu/emacs@rum.cs.yale.edu) Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:6595 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:6595 The `Subject:' had not been updated, so it was misleading. The discussion is about whether or not we need a new function that is like expand-file-name but does not necessarily return an absolute file name. I treated that as a subtopic of the issue of what to do with file-name-sans-extension, and considered it only in reference to that main topic. Now I will address the new topic As far as I can see, if you don't insist on an absolute file name, it is correct to use concat. As far as I can see, Eli's example is only an issue if you want an absolute file name: > It means that to produce a full file name from a relative directory > "c:" and a relative file name "bar", a function should yield > "c:./bar". Eli, is c:bar an invalid file name on MSDOS? So it seems that in the case where you are happy to have a non-absolute file name as the result, there is no problem. I've sometimes tried to use (let ((default-directory nil)) (expand-file-name bar foo)) or (let ((default-directory "")) (expand-file-name bar foo)) but it prepends "/" or "./" to the result. Is that what you had in mind when you spoke of appending a slash? It would follow that these methods are not good ones. However, that doesn't say anything about whether concat is a good method.