From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.devel Subject: Re: emacs-27 b46c75b: xref-matches-in-files: Big Tramp speed-up Date: Wed, 08 Jan 2020 15:13:25 +0100 Message-ID: <87muayhw8q.fsf@gmx.de> References: <20200107133628.1996.14412@vcs0.savannah.gnu.org> <20200107133629.2E736211A5@vcs0.savannah.gnu.org> <87y2uiiakq.fsf@gmx.de> <6255626b-0422-c1d2-af66-5cbd0f496719@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="248158"; 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 To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Jan 08 15:17:11 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.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 1ipC8j-000ru2-Iw for ged-emacs-devel@m.gmane-mx.org; Wed, 08 Jan 2020 15:16:53 +0100 Original-Received: from localhost ([::1]:44682 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ipC8h-0001V6-Qp for ged-emacs-devel@m.gmane-mx.org; Wed, 08 Jan 2020 09:16:52 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42767) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ipC5U-0006fy-T0 for emacs-devel@gnu.org; Wed, 08 Jan 2020 09:13:33 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ipC5T-0005F7-I4 for emacs-devel@gnu.org; Wed, 08 Jan 2020 09:13:32 -0500 Original-Received: from mout.gmx.net ([212.227.17.20]:36611) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ipC5T-0005Dp-5K for emacs-devel@gnu.org; Wed, 08 Jan 2020 09:13:31 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1578492809; bh=CNaSz7hQlFgh0X0wt0TvRQx2kAxY69ciUg/qf6lZtmg=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=gzmJM1afA1m6KoRm6x/dV9xjCKvKRT6nS1gf81pmEP7KSz28FwebS3kky/iomULTr nA6mk05uY6fo6KU+L8qlLYRuea5k7gf65yWbjK/hWrGyRnrU155bPGeWImL1xGw0Wn lBHzDt9LYDKZD6flrcQTmsf1qRY7+Hsa5EIx06Ws= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from detlef.gmx.de ([212.86.59.73]) by mail.gmx.com (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MXp9Y-1jCDhC1deu-00Y7cC; Wed, 08 Jan 2020 15:13:26 +0100 In-Reply-To: <6255626b-0422-c1d2-af66-5cbd0f496719@yandex.ru> (Dmitry Gutov's message of "Wed, 8 Jan 2020 16:52:21 +0300") X-Provags-ID: V03:K1:X/5KfgViPsnFUrWJnWy4VA3qjq6OVxjEojqly9j/B7sFnDt5x1u cnQs7oW/6xstHaqpGJyi902PFcsDggWDT1SbixJ+F89/BcFyNmRW0q4b4tqd4ocCkXR9FGn yFSL9GWczofTl70qlZrX+e2NwZN7m3ztLypE6OsidHYasZfUPh4I+1zomZPwDVraw5NNHj8 S9gz/SDpN//O5pRDmc/QA== X-UI-Out-Filterresults: notjunk:1;V03:K0:MUWzq4fP2ME=:klLmyiKEAqVIleJnAYs20f Hpe3OMpREXE4fDYjClaVe/4522JVRclGSsma87HatVsRV3U5XAh3Z260sJ2Zts7l0AEOP09nj MvGmKwAKco9jSjvqAWhMfFlwb+Kxh6QDCzlg1jFuBgGboTvfIZ7TEUb8WsFD8y1Z63DdxHFV5 LhTXD4sHSJvAH+cADFIGbDSnpK/lZf7SyKm7ftR2CDSw0RCkWoABx+0Zq//0qPF1QVkFH+ZQ+ ym8ZgYanatknlg3IFNInl3SpAPwPHqioHpnopiB4DY2xLMUojzoocQymx7REPVIbL7tT+a/zA 4AYDIDIhlEdMwLfYvlOjpKzg6m6Y/HASe8MKLsqqMR77sn+7hs4gWcc5s+q4GsHl6mIqGAZ3v V6BLzMqrfF1qXne89GrlYsWk9cn3UbUGJrev6Xy6GbhyetH7Oz4IVZxIUSJkSWw5zFzi7tviE LJlHWLEvDRO3m6O7lxdpn056M1Jigx7kH3ymTH8bNf9trAk8wkge2IowTiXvVy80CWRrppg5O YkdQL6Yg9jLLSzjcFr8EW744PFnu9SQ6k4D9j8TNgihCvZQ46NU0NbLLDdzFoP8how2rcJFAt DPIC90vzcunmGE7ySkF3jkrqdqhp7a0SUQPSxjKcGswzuhzS9vjJib3kDoTCpoi9BjaZNrKp5 Mv0rz0QxDZw0vy+AgD8L4D9hkqql6xieMgPGp83qLxNjpfWRJ+i+eFFutKFalM6mbLCVW/glt LSml7iWBv7dFhonxhX3EluMo9PAkp5aKBzO0mT62FeukW6kq0B6Eyu8bZh6O886Nmj1fig2O X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.17.20 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:244119 Archived-At: Dmitry Gutov writes: > Hi Michael, Hi Dmitry, > Looks like a good change, functionality-wise. But speaking of the > change below, I'll probably make it, but upon reading the code anybody > would struggle to guess that this function can handle other local > names, not just Tramp ones. Yes. I made this change because I need it Tramp internal. No tramp-* function is intended to be called outside Tramp itself except the ones in the Tramp manual. By intention, I haven't documented it there, and I have given it also a comment NOT to use it outside Tramp. You're the only one so far I gave permission :-) >>> + (setq files (mapcar >>> + (if (tramp-tramp-file-p dir) >>> + #'tramp-file-local-name >>> + #'file-local-name) >>> + files))) >> You can change this now to >> (setq files (mapcar #'tramp-file-local-name files)) > > This will shorten the code, and it'll require one fewer > declare-function in the file. And it avoids one tramp-tramp-file-p call. > But allow me to state for the record once more that I'm puzzled by the > architectural choice we're working with here. I know that. Tramp follows the generic file name handler approach, as described in (info "(elisp) Magic File Names") . This works fine for single files, but might not be appropriate for filesets, as you happen to be faced with. Maybe we need an architectural extension for a file name handler of filesets. Or we add new magic operations, which work over a fileset. Like vc operations do :-) Best regards, Michael.