From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#22169: 25.0.50; File name compiletion doesn't work with non-ASCII characters on OS X Date: Fri, 18 Dec 2015 11:15:29 +0200 Message-ID: <837fkcxglq.fsf@gnu.org> References: <83y4cw3kie.fsf@gnu.org> <83twnk3fg1.fsf@gnu.org> <83oads2x99.fsf@gnu.org> <83io3z3drh.fsf@gnu.org> <831tan32q2.fsf@gnu.org> <83h9jgxloz.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1450430193 8681 80.91.229.3 (18 Dec 2015 09:16:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 18 Dec 2015 09:16:33 +0000 (UTC) Cc: 22169@debbugs.gnu.org To: Anders Lindgren Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Dec 18 10:16:21 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1a9r8z-0007KK-MO for geb-bug-gnu-emacs@m.gmane.org; Fri, 18 Dec 2015 10:16:09 +0100 Original-Received: from localhost ([::1]:59132 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a9r8z-0006Jv-53 for geb-bug-gnu-emacs@m.gmane.org; Fri, 18 Dec 2015 04:16:09 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56673) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a9r8w-0006Jm-2N for bug-gnu-emacs@gnu.org; Fri, 18 Dec 2015 04:16:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a9r8s-0002xN-MR for bug-gnu-emacs@gnu.org; Fri, 18 Dec 2015 04:16:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:47522) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a9r8s-0002xJ-IS for bug-gnu-emacs@gnu.org; Fri, 18 Dec 2015 04:16:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1a9r8s-00034O-7s for bug-gnu-emacs@gnu.org; Fri, 18 Dec 2015 04:16:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 18 Dec 2015 09:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22169 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 22169-submit@debbugs.gnu.org id=B22169.145043012011745 (code B ref 22169); Fri, 18 Dec 2015 09:16:02 +0000 Original-Received: (at 22169) by debbugs.gnu.org; 18 Dec 2015 09:15:20 +0000 Original-Received: from localhost ([127.0.0.1]:55124 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1a9r8C-00033N-02 for submit@debbugs.gnu.org; Fri, 18 Dec 2015 04:15:20 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:37142) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1a9r8A-00033A-9i for 22169@debbugs.gnu.org; Fri, 18 Dec 2015 04:15:18 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a9r81-0002kf-No for 22169@debbugs.gnu.org; Fri, 18 Dec 2015 04:15:12 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:52819) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a9r81-0002ka-JQ; Fri, 18 Dec 2015 04:15:09 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1722 helo=HOME-C4E4A596F7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1a9r7y-0001Qg-Df; Fri, 18 Dec 2015 04:15:09 -0500 In-reply-to: (message from Anders Lindgren on Fri, 18 Dec 2015 09:38:08 +0100) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:110111 Archived-At: > Date: Fri, 18 Dec 2015 09:38:08 +0100 > From: Anders Lindgren > Cc: 22169@debbugs.gnu.org > > I was just trying to follow the pattern in ns-win.el, there are a number of > requires at the beginning, after a comment saying ";; Documentation-purposes > only: actually loaded in loadup.el." > > I can easily drop the line, if you think it's better. I see other files do the same, so I'm probably missing something here. Let's leave that as you wrote it. > > I rather think it's a non-starter, at least for Emacs 25.1. It > > probably means users of all systems will be punished by slower > > directory searches, on behalf of one peculiar filesystem. Unless > > there's some clever idea that avoids decoding each file name returned > > by readdir, that is. > > The eternal question of correctness versus speed... No, it's correctness on one platform vs speed on all the rest. > My gut feeling is that the time it takes to decode the file names is dwarfed by > the time it takes to read the file list from the harddisk (this needs to be > verified, of course). I think you should time this. My gut feeling is the other way around, for several reasons: . reading file entries in a directory is essentially a system call, that is usually highly optimized code . modern OSes cache this stuff, so you can do that without ever hitting the disk . many modern machines have SSDs (mine does), where disk drive accesses, even when they are needed, are very fast . by contrast, decoding a non-trivial encoding might take many CPU cycles, especially in the utf-8-hfs case, where we call Lisp as part of that Nevertheless, my gut feeling could also be false. We should time that. > In addition, for systems like Linux, encoding and decoding are > no-ops (as both the source and destination is UTF-8), so there won't > be a penalty there. Yes, but only in UTF-8 locales. I won't be surprised to learn that most of Far East uses something else, even on GNU/Linux. And then there are Windows volumes mounted via NFS and such likes. > I agree that this is not a project for Emacs 25.1 -- however, I think that we > should at explore this for future versions. I suggest that we push the current > patch (after dropping the `require' line), close the current issue, and post a > new bug report suggesting performing the completion on decoded strings. I have a simpler idea for fixing the issue without decoding every file in a directory. Please wait for a couple of days. (There's no need for another bug report, we could continue solving the left-over problem as part of this one.)