all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: emacs-devel@gnu.org
Subject: file-remote-p and its arguments
Date: Wed, 30 Jan 2008 16:26:26 -0500	[thread overview]
Message-ID: <jwv7ihrt3r5.fsf-monnier+emacs@gnu.org> (raw)


Currently file-remote-p accepts two optional arguments:

   IDENTIFICATION specifies which part of the identification shall
   be returned as string.  IDENTIFICATION can be the symbol
   `method', `user' or `host'; any other value is handled like nil
   and means to return the complete identification string.
   
   If CONNECTED is non-nil, the function returns an identification only
   if FILE is located on a remote system, and a connection is established
   to that remote system.

From what I can tell, the `connected' argument is *never* used.
And I have found only one use of the `identification' argument, if
grep.el where it seems not to be necessary: grep.el passes `host' for
that argument in order to build a map from hosts to default grep
commands and arguments, on the assumption that all users on a host will
have the same grep commands in their PATH.  I think this "optimization"
in grep.el (where they determine the grep defaults once per host instead
of once per remote access method (typically a triplet of
protocol/user/host)) is of no importance and is even not 100% reliable.

So I suggest:
1 - remove the `connected' argument of file-remote-p.
2 - change grep.el not to pass `host' as `identification' argument to
    file-remote-p.
3 - remove the `identification' argument to file-remote-p.


        Stefan


PS: If we want to make file-remote-p return non-nil for /afs/<foo> and
other such remote file systems, we'll need to update `file-relative-name'.




             reply	other threads:[~2008-01-30 21:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-30 21:26 Stefan Monnier [this message]
2008-01-31  9:43 ` file-remote-p and its arguments Michael Albinus
2008-01-31 14:49   ` Stefan Monnier
2008-01-31 15:49     ` Michael Albinus

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

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

  git send-email \
    --in-reply-to=jwv7ihrt3r5.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.