From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: emacs-27 e1e0a7a 2/2: xref--collect-matches: Speed up on remote Date: Fri, 27 Dec 2019 17:06:11 -0500 Message-ID: References: <20191227141917.13328.16721@vcs0.savannah.gnu.org> <20191227141919.03F1321537@vcs0.savannah.gnu.org> <88d31403-1eb1-e294-4b88-15cacadd52a7@yandex.ru> <87imm1pllt.fsf@gmx.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="761"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: emacs-devel@gnu.org, Dmitry Gutov To: Michael Albinus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Dec 27 23:07:09 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1ikxlD-0018Fp-HM for ged-emacs-devel@m.gmane.org; Fri, 27 Dec 2019 23:07:07 +0100 Original-Received: from localhost ([::1]:39148 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ikxlC-0006yC-Bl for ged-emacs-devel@m.gmane.org; Fri, 27 Dec 2019 17:07:06 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55590) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ikxka-0006YF-HI for emacs-devel@gnu.org; Fri, 27 Dec 2019 17:06:29 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ikxkY-0007g1-Vj for emacs-devel@gnu.org; Fri, 27 Dec 2019 17:06:27 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:7524) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ikxkY-0007fb-Pg for emacs-devel@gnu.org; Fri, 27 Dec 2019 17:06:26 -0500 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id B32C910081D; Fri, 27 Dec 2019 17:06:25 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id AF7681000BA; Fri, 27 Dec 2019 17:06:22 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1577484382; bh=NQsPR+VxXux/cK9EeUytUCYf7IF6xQqwEz7KD1xjuR0=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=BB0YV7ipCCZSpjiKuLXebUp2oii526rIUgq3zp11uZrnVuec81ERx5gdyK5D2X7gO dNPs9MXphnNeaalUzIZdhBgT/18q1F7Ns5mpRpuOrfZyt8u+FKoAJI3WKc1kNbRu/m YOP5RgqsLNCuNXUuSgyG0vc+vNrlEAxh/K+/fEtji+VXHdeu/FtWb5ak41oDDPPNBy ha0qQyCKMPkp+PYoD3FLlsd2jwKl9G4sPH4YHr4y6OTg2ZuJpZ/oNpvg8LEToa6nFo +ZQ5JsR3C+yImR/nToyiSigP5jw4cNX5bPaKQtVWjxMs43Vrcpo4SzZ9aoJMkC+ccD K/E2bD5nTGshw== Original-Received: from alfajor (104-222-126-118.cpe.teksavvy.com [104.222.126.118]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 377AD121216; Fri, 27 Dec 2019 17:06:22 -0500 (EST) In-Reply-To: <87imm1pllt.fsf@gmx.de> (Michael Albinus's message of "Fri, 27 Dec 2019 21:19:42 +0100") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 132.204.25.50 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:243716 Archived-At: >> It does go through Tramp for the initial `expand-file-name`, but AFAIK >> this shouldn't need to talk to the remote host (unless it has a ~/ or >> ~/ in the remote part of the name, I guess?). > That's how it is implemented, yes. However, remote file names with a > relative localname part, are also expanded via prepending "~/" to the > localname. For performance reasons it is better to avoid such file names. In the context of `xref--collect-matches`, I'd expect the file name passed to `get-file-buffer` to be either fully expanded file names or relative file names (with a fully expanded `default-directory`), so in that case `expand-file-name` should presumably "always" return without contacting the remote host, right? Stefan