[Top][All Lists]

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

Re: master 28bf387: Tweak Fdirectory_append for efficiency

From: Lars Ingebrigtsen
Subject: Re: master 28bf387: Tweak Fdirectory_append for efficiency
Date: Sat, 24 Jul 2021 19:05:20 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:

>> So that when constructing the final string all the elements have the
>> same(ish) multibytedness.
> Why not just require that up front?  It makes no sense to append
> strings of different multibytedness to make a single file name from
> them.  The only cases that make sense to me are:
>   . all the strings are multibyte
>   . some of the strings are multibyte, and some unibyte and pure-ASCII
>   . all the strings are unibyte
> The last case can happen when we call this function very early during
> the startup process, before we set up the file-encoding stuff, and
> thus all the file names are unibyte strings.

I don't understand your point here, I'm afraid.

Whenever there's

(multibyte-string-p "/tmp")
=> nil

(multibyte-string-p "bár")
=> t

Why shouldn't I be able to run

(directory-append "/tmp" "bár")
=> "/tmp/bár"

without caring about multibytedness?  This is just a string manipulation
function (geared towards file names).

(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no

reply via email to

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