From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alp Aker Newsgroups: gmane.emacs.bugs Subject: bug#2940: 23.0.92; C-s in dired fails to find files with umlauts Date: Sat, 16 Jul 2011 13:38:19 -0400 (EDT) Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII X-Trace: dough.gmane.org 1310837965 13696 80.91.229.12 (16 Jul 2011 17:39:25 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 16 Jul 2011 17:39:25 +0000 (UTC) Cc: 2940@debbugs.gnu.org, markus.triska@gmx.at To: Glenn Morris Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jul 16 19:39:21 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Qi8pj-0005Yw-Cb for geb-bug-gnu-emacs@m.gmane.org; Sat, 16 Jul 2011 19:39:19 +0200 Original-Received: from localhost ([::1]:50361 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qi8pi-0000ox-He for geb-bug-gnu-emacs@m.gmane.org; Sat, 16 Jul 2011 13:39:18 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:37273) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qi8pU-0000on-8W for bug-gnu-emacs@gnu.org; Sat, 16 Jul 2011 13:39:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qi8pT-000843-5c for bug-gnu-emacs@gnu.org; Sat, 16 Jul 2011 13:39:04 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:54934) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qi8pS-00083u-Tn for bug-gnu-emacs@gnu.org; Sat, 16 Jul 2011 13:39:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1Qi8pR-00088f-TY; Sat, 16 Jul 2011 13:39:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alp Aker Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 16 Jul 2011 17:39:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 2940 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 2940-submit@debbugs.gnu.org id=B2940.131083790731241 (code B ref 2940); Sat, 16 Jul 2011 17:39:01 +0000 Original-Received: (at 2940) by debbugs.gnu.org; 16 Jul 2011 17:38:27 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Qi8ot-00087q-Hy for submit@debbugs.gnu.org; Sat, 16 Jul 2011 13:38:27 -0400 Original-Received: from exprod7og111.obsmtp.com ([64.18.2.175]) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1Qi8or-00087d-SV for 2940@debbugs.gnu.org; Sat, 16 Jul 2011 13:38:27 -0400 Original-Received: from mb2i1.ns.pitt.edu ([136.142.11.153]) by exprod7ob111.postini.com ([64.18.6.12]) with SMTP ID DSNKTiHMi4U/UuC+HSRfi1x4LEwf+OM3hpcN@postini.com; Sat, 16 Jul 2011 10:38:25 PDT Original-Received: from unixs1.cis.pitt.edu ([136.142.4.246]) by pitt.edu (PMDF V6.3-x11 #31505) with ESMTP id <0LOF008ISSZVRP@mb2i1.ns.pitt.edu> for 2940@debbugs.gnu.org; Sat, 16 Jul 2011 13:38:19 -0400 (EDT) In-reply-to: X-X-Sender: aker@unixs1.cis.pitt.edu X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Sat, 16 Jul 2011 13:39:01 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.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:49258 Archived-At: Glenn Morris wrote: > IIUC, he's not using a --with-ns build. It's a "normal", gtk build that > happens to be running on a Mac. So ns-win.el isn't in use. My mistake; since it was running on Darwin I just assumed an NS build, and didn't look at the build info in the original bug report. Making this the default behavior for non-NS builds running on a Mac is probably TRT. It was once possible to use Darwin with UFS, but that hasn't been true for the last three major versions, so going forward it will be a vanishingly rare case where (eq system-type 'darwin) doesn't imply that the file system is a variant of HFS+. And it's reasonable for users to expect that Emacs will, out of the box, properly handle file names on the system it was built on. OTOH, just adding something like: (when (eq system-type 'darwin) (require 'ucs-normalize) (setq file-name-coding-system 'utf-8-hfs)) to x-win.el might not be the best solution. The utf-8-hfs coding system does both post-read conversion (normalizing to precomposed utf-8) and pre-write conversion (normalizing to Apple's variant of decomposed utf-8). The latter is unnecessary: the OS itself will do normalization on any filename handed to it. (Observe that the coding system defined in ns-win.el only does post-read conversion.) For local operations, the redundant pre-write conversion is harmless. But using decomposed utf-8 might cause trouble when dealing with remote files. So it's probably more robust to follow ns-win.el's lead and define a coding system that only does post-read conversion. Thus: (when (eq system-type 'darwin) (require 'ucs-normalize) (define-coding-system 'utf-8-hfs-for-read "UTF-8 based coding system for HFS+ file names." :coding-type 'utf-8 :mnemonic ?U :charset-list '(unicode) :post-read-conversion 'ucs-normalize-hfs-nfd-post-read-conversion) (setq file-name-coding-system 'utf-8-hfs-for-read)) would be the addition to make to x-win.el.