unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Alp Aker <aker@pitt.edu>
To: Glenn Morris <rgm@gnu.org>
Cc: 2940@debbugs.gnu.org, markus.triska@gmx.at
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)	[thread overview]
Message-ID: <Pine.GSO.4.63.1107152036370.6793@unixs1.cis.pitt.edu> (raw)
In-Reply-To: <j2ipr3b7pr.fsf@fencepost.gnu.org>

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.






  reply	other threads:[~2011-07-16 17:38 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-09 16:28 bug#2940: 23.0.92; C-s in dired fails to find files with umlauts Markus Triska
2009-04-09 17:22 ` Eli Zaretskii
2009-04-09 17:33   ` Markus Triska
2011-07-11 22:02 ` Alp Aker
2011-07-15 20:38   ` Glenn Morris
2011-07-16 17:38     ` Alp Aker [this message]
2019-11-02  6:12 ` Stefan Kangas
2019-11-02  9:17   ` bug#2940: Aw: " Markus Triska
     [not found] <mailman.4984.1239295440.31690.bug-gnu-emacs@gnu.org>
2009-04-10  2:08 ` bug#2940: " Miles Bader
2009-04-10  5:53   ` Stefan Monnier
     [not found]   ` <mailman.5035.1239343440.31690.bug-gnu-emacs@gnu.org>
2009-04-10 10:48     ` Markus Triska
2009-04-10 11:34       ` Kenichi Handa
2009-08-13 12:25       ` Kenichi Handa
2011-07-10 18:26         ` Glenn Morris
2011-07-10 21:11           ` Markus Triska
2011-07-11  2:01             ` Glenn Morris
2011-07-11  2:56               ` Eli Zaretskii
2011-07-11 16:21               ` Markus Triska

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.GSO.4.63.1107152036370.6793@unixs1.cis.pitt.edu \
    --to=aker@pitt.edu \
    --cc=2940@debbugs.gnu.org \
    --cc=markus.triska@gmx.at \
    --cc=rgm@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).