unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Stefan Monnier" <monnier+gnu/emacs@rum.cs.yale.edu>
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: Re: On DOS/Windows, unnecessary load of tramp by `file-relative-name'
Date: Tue, 29 Apr 2003 17:38:44 -0400	[thread overview]
Message-ID: <200304292138.h3TLcjcK007617@rum.cs.yale.edu> (raw)
In-Reply-To: 21141901.1051181645426.JavaMail.www@wwinf0602

> After some investigation, I found that `file-relative-name' put a
> leading slash on file and directory names before comparing them to
> find the relative name.  On DOS/Windows, when the name begins with a
> drive letter, for example "c:/emacs", `file-relative-name' actually
> use this form internally: "/c:/emacs".  Unfortunately that form
> matches `tramp-file-name-regexp', which causes "tramp.el" to be loaded
> when `file-relative-name' then calls `file-name-as-directory'.
[...]
> !    (unless (eq (aref filename 0) ?/)
>        (setq filename (concat "/" filename)))
> !    (unless (eq (aref directory 0) ?/)
>        (setq directory (concat "/" directory)))

Actually even after the change to file-name-absolute-p, the above
code looks bogus since both `filename' and `directory' have
passed through expand-file-name and should thus be absolute
already.

I suspect the four lines should purely and simply be removed.


	Stefan

  parent reply	other threads:[~2003-04-29 21:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-24 10:54 On DOS/Windows, unnecessary load of tramp by `file-relative-name' David PONCE
2003-04-24 14:12 ` Kai Großjohann
2003-04-29 21:38 ` Stefan Monnier [this message]
2003-04-30  8:21   ` Kai Großjohann
  -- strict thread matches above, loose matches on Subject: below --
2003-04-24 14:44 David PONCE
2003-04-25 13:23 ` Kai Großjohann

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=200304292138.h3TLcjcK007617@rum.cs.yale.edu \
    --to=monnier+gnu/emacs@rum.cs.yale.edu \
    --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).