unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Richard Stallman <rms@gnu.org>
Cc: eliz@is.elta.co.il, Jens.Schmidt27@epost.de, emacs-devel@gnu.org
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)	[thread overview]
Message-ID: <200208170451.g7H4pAN08664@wijiji.santafe.edu> (raw)
In-Reply-To: <200208161717.g7GHHWw31172@rum.cs.yale.edu> (monnier+gnu/emacs@rum.cs.yale.edu)

    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.

  reply	other threads:[~2002-08-17  4:51 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <uptxa211i.fsf@oracle.com>
2002-07-27 18:53 ` Strange `file-name-sans-extension' behavior Richard Stallman
2002-08-09  7:38   ` Stefan Monnier
2002-08-10 17:16     ` Richard Stallman
2002-08-12 15:58       ` Stefan Monnier
2002-08-12 17:28         ` Eli Zaretskii
2002-08-12 18:21           ` Andreas Schwab
2002-08-13 22:47           ` Richard Stallman
2002-08-14 11:03             ` Eli Zaretskii
2002-08-14 23:14               ` Richard Stallman
2002-08-15 16:51                 ` Eli Zaretskii
2002-08-16  2:31                   ` Richard Stallman
2002-08-16 17:17                     ` `concat' a dir and a file (was: Strange `file-name-sans-extension' behavior ) Stefan Monnier
2002-08-17  4:51                       ` Richard Stallman [this message]
2002-08-18 19:25                         ` Eli Zaretskii
2002-08-19 15:32                           ` Stefan Monnier
2002-08-19 18:39                           ` Richard Stallman
2002-08-20 11:33                             ` Eli Zaretskii
2002-08-13  1:48         ` Strange `file-name-sans-extension' behavior Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200208170451.g7H4pAN08664@wijiji.santafe.edu \
    --to=rms@gnu.org \
    --cc=Jens.Schmidt27@epost.de \
    --cc=eliz@is.elta.co.il \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).