Subject: Re: bug#15426: 24.3.50; Multibyte filenames and directory-files in unibyte buffer

From: Andreas Politz <[email-masked]>
Date: Sat, 21 Sep 2013 19:12:48 +0200

Eli Zaretskii <[email-masked]> writes:

> For the record, a much simpler test case is this:
>
>   M-: (multibyte-string-p (car (directory-files default-directory t))) RET
>

Ok, I didn't know about this invariant.

> [...]  So the problem happens inside the directory-files call.

That's why I put it's name in the title and description.

> (You should never trust what the echo area shows when potentially
> unibyte strings are involved, always use multibyte-string-p to tell if
> a string is multibyte or unibyte.)

I think it's reasonable to assume, that two strings have different
contents, if they display differently in the same buffer.

>> > "The minibuffer displays" is the key point here:[...]
>> 
>> No, the key is that the file's existence depends on the buffer's
>> multi-byte status, in which the code is evaluated.
>
> The truth is neither [...]

I guess we can agree on the key, that you seemed to have solved this
problem.

-ap