From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Random832 Newsgroups: gmane.emacs.bugs Subject: bug#22169: 25.0.50; File name compiletion doesn't work with non-ASCII characters on OS X Date: Tue, 15 Dec 2015 16:53:37 -0500 Message-ID: <87d1u74bvi.fsf@fastmail.com> References: <83y4cw3kie.fsf@gnu.org> <83twnk3fg1.fsf@gnu.org> <83oads2x99.fsf@gnu.org> <83io3z3drh.fsf@gnu.org> <831tan32q2.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1450216523 9807 80.91.229.3 (15 Dec 2015 21:55:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 15 Dec 2015 21:55:23 +0000 (UTC) To: 22169@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Dec 15 22:55:11 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 1a8xYr-0006LA-EC for geb-bug-gnu-emacs@m.gmane.org; Tue, 15 Dec 2015 22:55:09 +0100 Original-Received: from localhost ([::1]:39263 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a8xYq-0001TQ-Uu for geb-bug-gnu-emacs@m.gmane.org; Tue, 15 Dec 2015 16:55:08 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47539) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a8xYn-0001Rg-90 for bug-gnu-emacs@gnu.org; Tue, 15 Dec 2015 16:55:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a8xYk-0005pR-2w for bug-gnu-emacs@gnu.org; Tue, 15 Dec 2015 16:55:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:45396) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a8xYk-0005pN-0T for bug-gnu-emacs@gnu.org; Tue, 15 Dec 2015 16:55:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1a8xYj-0005w4-SC for bug-gnu-emacs@gnu.org; Tue, 15 Dec 2015 16:55:01 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Random832 Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 15 Dec 2015 21:55:01 +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: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.145021644622751 (code B ref -1); Tue, 15 Dec 2015 21:55:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 15 Dec 2015 21:54:06 +0000 Original-Received: from localhost ([127.0.0.1]:52998 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1a8xXq-0005ut-6P for submit@debbugs.gnu.org; Tue, 15 Dec 2015 16:54:06 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:37466) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1a8xXn-0005uO-OX for submit@debbugs.gnu.org; Tue, 15 Dec 2015 16:54:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a8xXh-0005jR-KE for submit@debbugs.gnu.org; Tue, 15 Dec 2015 16:53:58 -0500 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:37641) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a8xXh-0005jN-IQ for submit@debbugs.gnu.org; Tue, 15 Dec 2015 16:53:57 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47470) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a8xXg-0001Md-Bn for bug-gnu-emacs@gnu.org; Tue, 15 Dec 2015 16:53:57 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a8xXd-0005j4-4I for bug-gnu-emacs@gnu.org; Tue, 15 Dec 2015 16:53:56 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:41777) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a8xXc-0005ir-To for bug-gnu-emacs@gnu.org; Tue, 15 Dec 2015 16:53:53 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1a8xXa-0003tX-6K for bug-gnu-emacs@gnu.org; Tue, 15 Dec 2015 22:53:50 +0100 Original-Received: from c-68-39-146-59.hsd1.in.comcast.net ([68.39.146.59]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 15 Dec 2015 22:53:50 +0100 Original-Received: from random832 by c-68-39-146-59.hsd1.in.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 15 Dec 2015 22:53:50 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 38 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: c-68-39-146-59.hsd1.in.comcast.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) Cancel-Lock: sha1:5jZsbzwabUK+HddtVcn6JGpecHk= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x 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:110034 Archived-At: Eli Zaretskii writes: > . encode the file argument > . encode the directory argument and pass it to opendir > . loop calling readdir, and for each file name it returns: > . if the file name begins with the same characters as the encoded > file argument, then: > . decode the file name > . cons the decoded name onto the list to be returned My guess from the symptoms is that utf-8-nfd doesn't actually bother to make any attempt to convert to decomposed form when encoding, since in *most* cases e.g. for opening a file, the underlying filesystem will take care of this automatically. This is backed up by the fact that, looking at the code, it apparently has a post-read-conversion but no matching pre-write-conversion. Anders Lindgren writes: > I tried setting it to nil. This made completion work. However, > the letters are presented in decomposed form, so that pressing > backspace first converts "å" to "a", a second backspace > deletes the "a" -- this is not how we would like to present > file names to users. Why? That _is_, for better or worse, the filename on the disk. On a non-OSX system, someone might actually have such a filename, distinct from the composed one. For that matter, what happens if an OSX user saves or opens a file on a non-HFS filesystem? Can Emacs handle the concept of different filesystems having different encodings? Ultimately, this isn't really an encoding - it is a destructive folding operation performed by the filesystem (the same as if, say, some filesystem stored filenames in all uppercase), and we've decided, for some reason, that we want the filenames back in what we've judged to be more likely to be the original form.