From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.bugs Subject: bug#10319: 24.0.92; doc string of `file-remote-p' Date: Mon, 19 Dec 2011 22:18:43 +0100 Message-ID: <877h1sdzv0.fsf@gmx.de> References: <87wr9uuvn3.fsf@gmx.de> <1C247F238CC24F6F9A0A3D077D3E09FE@us.oracle.com> <87bor5eyz0.fsf@gmx.de> <88D1EF1166814B70B0E2CD052362AA72@us.oracle.com> <87ehw0e7u0.fsf@gmx.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1324329561 8048 80.91.229.12 (19 Dec 2011 21:19:21 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 19 Dec 2011 21:19:21 +0000 (UTC) Cc: 10319@debbugs.gnu.org To: "Drew Adams" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Dec 19 22:19:15 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Rckc6-00044l-Nb for geb-bug-gnu-emacs@m.gmane.org; Mon, 19 Dec 2011 22:19:14 +0100 Original-Received: from localhost ([::1]:51752 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rckc6-0003km-88 for geb-bug-gnu-emacs@m.gmane.org; Mon, 19 Dec 2011 16:19:14 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:50301) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rckc1-0003kZ-FZ for bug-gnu-emacs@gnu.org; Mon, 19 Dec 2011 16:19:11 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rckc0-0003AU-4n for bug-gnu-emacs@gnu.org; Mon, 19 Dec 2011 16:19:09 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:44924) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rckc0-0003AQ-3E for bug-gnu-emacs@gnu.org; Mon, 19 Dec 2011 16:19:08 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1Rckdq-0007CN-95 for bug-gnu-emacs@gnu.org; Mon, 19 Dec 2011 16:21:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Michael Albinus Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 19 Dec 2011 21:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10319 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 10319-submit@debbugs.gnu.org id=B10319.132432966027661 (code B ref 10319); Mon, 19 Dec 2011 21:21:02 +0000 Original-Received: (at 10319) by debbugs.gnu.org; 19 Dec 2011 21:21:00 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Rckdo-0007C1-4q for submit@debbugs.gnu.org; Mon, 19 Dec 2011 16:21:00 -0500 Original-Received: from mailout-de.gmx.net ([213.165.64.23]) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1RckdX-0007BZ-RB for 10319@debbugs.gnu.org; Mon, 19 Dec 2011 16:20:59 -0500 Original-Received: (qmail invoked by alias); 19 Dec 2011 21:18:47 -0000 Original-Received: from p57BB978C.dip0.t-ipconnect.de (EHLO detlef.gmx.de) [87.187.151.140] by mail.gmx.net (mp025) with SMTP; 19 Dec 2011 22:18:47 +0100 X-Authenticated: #3708877 X-Provags-ID: V01U2FsdGVkX19SbCV3wuRSFMYbg22hV206xcn5RDCruocFacav0S Olr0KoItF+ErIN In-Reply-To: (Drew Adams's message of "Mon, 19 Dec 2011 11:44:16 -0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux) X-Y-GMX-Trusted: 0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Mon, 19 Dec 2011 16:21:02 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:55074 Archived-At: "Drew Adams" writes: >> A file is considered "remote" if accessing it is likely to >> be slower or less reliable than accessing local files. > > I'd suggest moving that just after the first sentence ("Test..."). > >> Furthermore, relative file names do not work across remote >> connections. > > Why "Furthermore"? This seems unrelated to anything preceding it. If I'm > right, I'd suggest just dropping "Furthermore". But in fact I don't know what > this sentence means. What do you mean here by "do not work"? Both sentences from the docstring are not from me. For the first sentence, I even disagree with Stefan (but we should NOT discuss this here). The second sentence means that a relative filename like "/sudo::../../.." does not make sense, because it cannot expand out of the "/sudo::" jail. > Something like this (but see my question about relative file names not working): > > Test whether FILE specifies a location on a remote system. > A file is considered remote if accessing it is likely to > be slower or less reliable than accessing local files. > > `file-remote-p' never opens a new remote connection. It can > only reuse a connection that is already open. Relative file > names do not work across remote connections (????). > > Return nil or a string identifying the remote connection > (ideally a prefix of FILE). For example, the remote > identification for filename "/user@host:/foo" could be > "/user@host:". > > IDENTIFICATION specifies which part of the identification to > return. IDENTIFICATION can be the symbol `method', > `user', `host', or `localname'. Any other value is handled > like nil and means to return the complete identification. > The string returned for IDENTIFICATION `localname' can differ > depending on whether there is an existing connection." > > If CONNECTED is non-nil, return an identification only > if FILE is located on a remote system and a connection is > established to that remote system. Sounds OK to me. From my point of view you could submit the changed docstring. > We should also perhaps say what "the complete identification" is/means. IOW, > when IDENTIFICATION is nil, what can we say about the return value? In that case, the returned string could make a local file name remote. We could always offer to apply (concat (file-remote-p "whatever") "local-file-name") given that `concat' accepts nil as argument. > HTH - Drew Best regards, Michael.