unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Emacs and Squiggles as filenames
@ 2005-07-07 19:07 D Goel
  2005-07-09  4:21 ` Richard M. Stallman
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: D Goel @ 2005-07-07 19:07 UTC (permalink / raw)



(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 ?

The exception I saw was here:

If there exists a file named "~" in my ~/tmp/, I see funny things:

(expand-file-name (file-name-nondirectory "~/tmp/~") "~/tmp"), returns

=>/home/deego instead of /home/deego/tmp/~ 
 

^^ I had a function doing recursive stuff using directory-files.. and
	ascending up 2 directories like this caused an infinite loop..



Other interesting things:

(file-truename "~/tmp/~")
=> "/home/deego/tmp/~"



Yet, "~/tmp/~" is apparently the correct representation, as returned by
 (directory-files "~/tmp" t)

Moreover, (directory-files "~/tmp" nil) simply returns "~".


Is an escape missing somewhere in emacs internals?  Or, is an elisp
user supposed to call some escaping functions before doing
expand-file-name ?

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2005-07-11 21:14 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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).