From: Dmitry Gutov <dgutov@yandex.ru>
To: Michael Albinus <michael.albinus@gmx.de>, emacs-devel@gnu.org
Subject: Re: emacs-27 b46c75b: xref-matches-in-files: Big Tramp speed-up
Date: Wed, 8 Jan 2020 16:52:21 +0300 [thread overview]
Message-ID: <6255626b-0422-c1d2-af66-5cbd0f496719@yandex.ru> (raw)
In-Reply-To: <87y2uiiakq.fsf@gmx.de>
Hi Michael,
On 08.01.2020 11:03, Michael Albinus wrote:
> dgutov@yandex.ru (Dmitry Gutov) writes:
>
>> xref-matches-in-files: Big Tramp speed-up
>>
>> * lisp/progmodes/xref.el (xref-matches-in-files):
>> Greatly improve performance with remote files using Tramp
>> (bug#34343).
>
> Thanks. I've made a further improvement in tramp-file-local-name. In
> case NAME is not a Tramp file name, it calls file-local-name now.
>
> This is to handle use cases like
>
> (copy-file "/ssh:host:/path/index.html" "https://example.com/path/index.html")
>
> and more subtle constellations.
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.
>> + (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.
But allow me to state for the record once more that I'm puzzled by the
architectural choice we're working with here.
next parent reply other threads:[~2020-01-08 13:52 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20200107133628.1996.14412@vcs0.savannah.gnu.org>
[not found] ` <20200107133629.2E736211A5@vcs0.savannah.gnu.org>
[not found] ` <87y2uiiakq.fsf@gmx.de>
2020-01-08 13:52 ` Dmitry Gutov [this message]
2020-01-08 14:13 ` emacs-27 b46c75b: xref-matches-in-files: Big Tramp speed-up Michael Albinus
2020-01-08 14:56 ` Stefan Monnier
2020-01-08 15:13 ` Michael Albinus
2020-01-08 16:25 ` Stefan Monnier
2020-01-08 16:40 ` Michael Albinus
2020-01-08 18:56 ` Stefan Monnier
2020-01-08 20:10 ` Michael Albinus
2020-01-08 20:51 ` Stefan Monnier
2020-01-08 23:42 ` Dmitry Gutov
2020-01-13 9:50 ` Philippe Vaucher
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=6255626b-0422-c1d2-af66-5cbd0f496719@yandex.ru \
--to=dgutov@yandex.ru \
--cc=emacs-devel@gnu.org \
--cc=michael.albinus@gmx.de \
/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.