all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Piet van Oostrum <piet@cs.uu.nl>
To: help-gnu-emacs@gnu.org
Subject: Re: File name completion on Mac OS X with German umlauts
Date: Mon, 17 Mar 2008 15:07:58 +0100	[thread overview]
Message-ID: <m2myoxv3y9.fsf@cochabamba.cs.uu.nl> (raw)
In-Reply-To: mailman.8794.1205357174.18990.help-gnu-emacs@gnu.org

>>>>> Nikolaj Schumacher <n_schumacher@web.de> (NS) wrote:

>NS> Eli Zaretskii <eliz@gnu.org> wrote:
>>> It is only a ``problem'' if you accept the view that no two files in
>>> the same directory can have names that are pronounced identically.

>NS> No, it's not just that.
>NS> Certainly, you could have files "X" and "Ⅹ" (the Roman numeral).  Even
>NS> if they look the same there is no problem (other than likely user
>NS> confusion) in having both.

>NS> However, the two types of "ü" are the same character, or at least
>NS> functionally equivalent characters.  They should be considered equal.
>NS> But comparing them properly requires normalization
>NS> (cf. http://www.unicode.org/unicode/reports/tr15/).

>NS> OSX does normalization in its file system.  GNU/Linux apparently does not.

Right. In GNU/Linux a filename is just a sequence of bytes without
interpretation. The interpretation is done by the programs. Nowadays modern
GNU/Linux systems tend to use UTF-8 as the default interpretation. But if
you would mount a filesystem from such a system on another one that has
Latin-1 as the preferred encoding, your filenames with non-ASCII characters
would look weird. And also a filename with ü as unnormalized UTF-8 and
another one with ü as normalised UTF-8 would be different files, but in an
ls listing they would look identical (the filenames, not the files). And I
guess the normalised one would not complete on ü, but ir will on u, and the
other one just the opposite.

On Mac OS X, however, the interpretation of the filenames as UTF-8 is part
of the filesystem. It will only use the normalized version, even when you
use the unnormalized in a system call. So you can't have both in the
filesystem. However, Emacs only uses the unnormalized version when you
enter characters in the normal way, and therefore the completion fails. For
it to succeed Emacs would have to do the normalization first (there are OS
functions for this.

>NS> Emacs must also be doing some normalization... switch-to-buffer
>NS> completion works on "rückerstattung" after all.  Only `read-file-name'
>NS> doesn't.  Hmm, maybe this /is/ an Emacs bug after all.

No, it doesn't do normalization. For buffers it is the same as for
filenames. But usually you don't have normalized buffer names (except for
those where normalized is the same as unnormalized of course). When you
create a file with name rückerstattung on OS X and open it from a directory
listing (where it shows as rückerstattung) you get a buffer name
rückerstattung. This will not complete from rü.
-- 
Piet van Oostrum <piet@cs.uu.nl>
URL: http://pietvanoostrum.com [PGP 8DAE142BE17999C4]
Private email: piet@vanoostrum.org


  parent reply	other threads:[~2008-03-17 14:07 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-09 11:53 File name completion on Mac OS X with German umlauts Markus
2008-03-09 14:39 ` Peter Dyballa
2008-03-09 15:22 ` Nikolaj Schumacher
     [not found] ` <mailman.8596.1205073587.18990.help-gnu-emacs@gnu.org>
2008-03-09 21:44   ` Markus
2008-03-09 23:21     ` Peter Dyballa
     [not found]     ` <mailman.8623.1205104885.18990.help-gnu-emacs@gnu.org>
2008-03-10 18:57       ` Markus
2008-03-10 21:01         ` Peter Dyballa
     [not found]         ` <mailman.8673.1205182919.18990.help-gnu-emacs@gnu.org>
2008-03-10 21:25           ` Markus
2008-03-10 22:49             ` Peter Dyballa
     [not found]             ` <mailman.8682.1205189384.18990.help-gnu-emacs@gnu.org>
2008-03-11 21:24               ` Markus
2008-03-11 22:14                 ` Peter Dyballa
     [not found]                 ` <mailman.8727.1205273706.18990.help-gnu-emacs@gnu.org>
2008-03-13 22:11                   ` Markus
2008-03-13 23:11                     ` Peter Dyballa
     [not found]                     ` <mailman.8870.1205449910.18990.help-gnu-emacs@gnu.org>
2008-03-16 12:51                       ` Markus
2008-03-16 14:21                         ` Peter Dyballa
     [not found] ` <mailman.8598.1205076134.18990.help-gnu-emacs@gnu.org>
2008-03-09 21:47   ` Markus
2008-03-12 15:44     ` Nikolaj Schumacher
2008-03-12 18:46       ` Eli Zaretskii
2008-03-12 21:25         ` Nikolaj Schumacher
2008-03-12 21:55           ` Eli Zaretskii
2008-03-12 23:23             ` Juanma Barranquero
2008-03-13  4:28               ` Eli Zaretskii
2008-03-13  8:18                 ` Juanma Barranquero
2008-03-13 13:49                   ` Nikolaj Schumacher
2008-03-13 14:17                     ` Juanma Barranquero
2008-03-13 14:18                       ` Juanma Barranquero
2008-03-13 20:10                   ` Eli Zaretskii
2008-03-13 21:03                     ` Juanma Barranquero
     [not found]                     ` <mailman.8859.1205442242.18990.help-gnu-emacs@gnu.org>
2008-03-13 22:09                       ` Markus
2008-03-13 23:08                         ` Peter Dyballa
     [not found]         ` <mailman.8794.1205357174.18990.help-gnu-emacs@gnu.org>
2008-03-17 14:07           ` Piet van Oostrum [this message]
2008-03-17 16:44             ` Nikolaj Schumacher
2008-03-17 20:24               ` Eli Zaretskii
2008-03-18 18:05                 ` Nikolaj Schumacher

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

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

  git send-email \
    --in-reply-to=m2myoxv3y9.fsf@cochabamba.cs.uu.nl \
    --to=piet@cs.uu.nl \
    --cc=help-gnu-emacs@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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.