GNU bug report logs - #15426
24.3.50; Multibyte filenames and directory-files in unibyte buffer

Previous Next

Package: emacs;

Reported by: Andreas Politz <politza <at> hochschule-trier.de>

Date: Fri, 20 Sep 2013 16:49:01 UTC

Severity: normal

Found in version 24.3.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Andreas Politz <politza <at> hochschule-trier.de>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 15426 <at> debbugs.gnu.org, monnier <at> iro.umontreal.ca
Subject: bug#15426: 24.3.50; Multibyte filenames and directory-files in unibyte buffer
Date: Sat, 21 Sep 2013 19:12:48 +0200
Eli Zaretskii <eliz <at> gnu.org> 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




This bug report was last modified 11 years and 242 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.