Hi! I did some simple measurements with and without this patch. I ran `(file-name-all-completions "x" "src")' on the Emacs src directory. The timing values were almost identical (varying between 0.001012 and 0.001080). The way I see it, the patch doesn't do any harm in any coding system, and it is fast. Hence, I don't really see that it's worth the effort to make this code conditional. However, please write a patch for this if you still thinks it's necessary. I can test it here to make sure it works under OS X. -- Anders On Mon, Dec 21, 2015 at 4:39 AM, Eli Zaretskii wrote: > > Date: Sun, 20 Dec 2015 23:00:40 +0100 > > From: Anders Lindgren > > Cc: random832@fastmail.com, 22169@debbugs.gnu.org > > > > I managed to get the attached patch to work (when used in conjunction > with my > > previous patch). > > > > I've tested: > > > > * C-x C-f a TAB > > * (find-file-all-competions "a" ".") > > OK, thanks. > > The next step is arrange for this to happen only with those values of > file-name-coding-system that require it. My idea is to put a special > property on the coding-system's symbol, and check that inside > file_name_completion (outside of the loop). Can you add this, or do > you want me to suggest a patch along these lines for you to test? > Note that the property check will have to be done on > file-name-coding-system if it is non-nil, otherwise on > default-file-name-coding-system (if that is non-nil). > > Thanks. >