unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: David Kastrup <dak@gnu.org>
Cc: deego@gnufans.org, emacs-devel@gnu.org
Subject: Re: Emacs and Squiggles as filenames
Date: Mon, 11 Jul 2005 09:53:18 +0200	[thread overview]
Message-ID: <85br59aidt.fsf@lola.goethe.zz> (raw)
In-Reply-To: <E1DrqwT-0007fT-E0@fencepost.gnu.org> (Richard M. Stallman's message of "Mon, 11 Jul 2005 01:34:57 -0400")

"Richard M. Stallman" <rms@gnu.org> writes:

>     >> (expand-file-name (file-name-nondirectory fname) dir)
>     >>
>     >>
>     >> should return fname back.  It is like an identity, right?  If not,
>     >> what is the way to *always* correctly do an expand-file-name ?
>     >
>     > This works for me:
>     > (concat (file-name-as-directory "~/tmp")
>     >         (file-name-nondirectory "~/tmp/~"))
>
>     I am afraid that the former version is _so_ ingrained into Elisp code
>     that we should add advice into DOC strings and Elisp manual.
>
> It is not just frequent, it is what we have always called "the right
> way".  Using concat has been slightly deprecated, partly because it
> won't work in the case where the directory name fails to end in a
> slash.

Can't happen when file-name-as-directory is used, right?

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

  reply	other threads:[~2005-07-11  7:53 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-07 19:07 Emacs and Squiggles as filenames D Goel
2005-07-09  4:21 ` Richard M. Stallman
2005-07-09  4:21 ` Richard M. Stallman
2005-07-10  4:05 ` Paul Jarc
2005-07-10  8:31   ` David Kastrup
2005-07-11  5:34     ` Richard M. Stallman
2005-07-11  7:53       ` David Kastrup [this message]
2005-07-11 21:14         ` Richard M. Stallman
2005-07-11 12:37   ` D Goel
2005-07-11 13:41     ` David Kastrup
2005-07-11 15:32       ` Stefan Monnier

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=85br59aidt.fsf@lola.goethe.zz \
    --to=dak@gnu.org \
    --cc=deego@gnufans.org \
    --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).