emacs-devel
[Top][All Lists]
Advanced

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

Re: Function to normalize windows file name


From: yyoncho
Subject: Re: Function to normalize windows file name
Date: Tue, 16 Feb 2021 23:15:30 +0200

Hi Eli,

Our main issue is that we cannot use anything that involves file-truename when we are handling server diagnostic events due to the method being too slow. We avoid calling file-truename successfully - it just took us a lot of iterations to end up with what we currently have. 

>  compare file names case-insensitively

Hm, we use it for hashtable keys, so I guess we can create ht with a custom hash/equal functions and avoid downcasing upfront. I will check if this works because it will certainly yield better code. 

Thanks,
Ivan

On Tue, Feb 16, 2021 at 5:48 PM Eli Zaretskii <eliz@gnu.org> wrote:
> From: yyoncho <yyoncho@gmail.com>
> Date: Tue, 16 Feb 2021 15:49:38 +0200
> Cc: emacs-devel <emacs-devel@gnu.org>
>
> The issue is the letter case because for one reason or another we often end up with file names being
> downcased. Apparently, file-truename is able to fix that issue(I was under the impression that it does not
> work that way).

Yes, file-truename is the solution for the letter-case issue.

However, if the problem to solve is that you compare file names as
strings, and that's why downcasing gets in the way, I'd like to point
out a few related aspects:

  . first, file names aren't supposed to be downcased in Emacs, at
    least not by default, so figuring out why this happens could solve
    the issue more cleanly (file-truename can be expensive)


reply via email to

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