bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#51622: 29.0.50; [PATCH v2] Abbreviate remote home directories in `ab


From: Jim Porter
Subject: bug#51622: 29.0.50; [PATCH v2] Abbreviate remote home directories in `abbreviate-file-name'
Date: Sat, 6 Nov 2021 20:30:39 -0700

On 11/6/2021 10:41 AM, Michael Albinus wrote:
The general rule is, to keep all this specific handling away from
files.el and companions. Emacs has the concept of file name handlers,
and if there is something to be done special, a file name handler shall
offer an alternative implementation.

Thanks for the pointers. I've attached a new version of the patch, along with updated benchmark results. When abbreviating Tramp files, not only is this version faster than my previous patch, it's also 2-4x faster(!) than Emacs trunk.

I included a couple of related patches in this series, although I can split them out if it would be easier. The first patch just reorders a couple of Tramp tests that got added in the wrong order previously (I only did this because I wanted to add my new test to the end, and figured it would be simpler to fix the order first).

The second patch is the main patch and uses a file name handler as you suggested. Hopefully I got everything right here; I'm not very familiar with these parts of Tramp. The test I added passes for me, though a bunch of the other Tramp tests fail for me (with or without my patches).

Finally, since I already had them lying around, I added a few tests for `abbreviate-file-name' for local files. They're pretty simple, but should help catch any regressions in the future.

Attachment: 0001-test-lisp-net-tramp-tests.el-Rearrange-tests-to-be-i.patch
Description: Text document

Attachment: 0002-Support-abbreviating-home-directory-of-Tramp-filenam.patch
Description: Text document

Attachment: 0003-Add-some-unit-tests-for-abbreviate-file-name.patch
Description: Text document

Attachment: benchmark-results.txt
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]