emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Heikki Lehvaslaiho <heikki.lehvaslaiho@gmail.com>
To: "Sebastian Reuße" <seb@wirrsal.net>
Cc: emacs-orgmode@gnu.org, Nicolas Goaziou <mail@nicolasgoaziou.fr>
Subject: Re: bug: org-table-sort-lines does only case sensitive alphabetical sorting
Date: Thu, 19 Jul 2018 10:29:31 +0300	[thread overview]
Message-ID: <CAK=ukcaUZOUs1G1e3cMbKRr_Le-sV2hXzOY8DFJyCY+jf2YLXw@mail.gmail.com> (raw)
In-Reply-To: <87y3ea4abe.fsf@wirrsal.net>

[-- Attachment #1: Type: text/plain, Size: 2433 bytes --]

My emacs is from homebrew without any manual settings on locale. I assume a
number of locale settings come with it. I have not had any problems before
this.

OS X does not have LANG envvar set. This computer came with Finnish
language set and I switched to English (Australian) for interface. This has
lead to somewhat weird locale setting at OS:

$ defaults read .GlobalPreferences AppleLanguages
(
    "en-FI"
)

Apart from ssa, the output from string-collate-lessp seems to be what is to
be expected:

(string-collate-lessp "a" "x" "de_DE.utf-8" nil) ; t
(string-collate-lessp "a" "X" "de_DE.utf-8" nil) ; nil
(string-collate-lessp "ß" "ssa" "de_DE.utf-8") ; nil
(string-lessp "ß" "ssa")                       ; nil
(string-collate-lessp "ä" "ö" "fi_FI.utf-8") ; t
(string-collate-lessp "Ä" "ö" "fi_FI.utf-8") ; t

I can not able to comment on C code, but it really seems that alphabetic
sorting is fixed to case-sensitive mode.




     -Heikki

Heikki Lehväslaiho - skype:heikki_lehvaslaiho cell: +358 40 850 6640
http://about.me/heikki

On 17 July 2018 at 09:59, Sebastian Reuße <seb@wirrsal.net> wrote:

>
> Heikki Lehvaslaiho <heikki.lehvaslaiho@gmail.com> writes:
>
> > x86_64-apple-darwin14.5.0
>
> Looking at the C source of ‘string-collate-lessp’ (src/fns.c), it looks
> like there exists a case where Emacs itself will fall back on
> ‘string-lessp’ even when ‘string-collate-lessp’ is invoked.
>
>     #else  /* !__STDC_ISO_10646__, !WINDOWSNT */
>      return Fstring_lessp (s1, s2);
>     #endif /* !__STDC_ISO_10646__, !WINDOWSNT */
>
> I can’t tell what the first macro evaluates to on your platform. Might
> this be the cause?
>
> An indication for whether your Emacs uses the locale at all may be
> testing the following (presuming you have the German locale data
> installed and compiled):
>
>     (string-collate-lessp "ß" "ssa" "de_DE.utf-8") ; t
>     (string-lessp "ß" "ssa")                       ; nil
>
> This is based on the German ‘ß’ ligature being sorted as if it were
> equal to the string ‘ss’ (you can probably construct something analogous
> using fi_FI). If the first call returns nil, your Emacs isn’t using the
> locale data at all.
>
> Kind regards,
> SR
>
> --
> Insane cobra split the wood
> Trader of the lowland breed
> Call a jittney, drive away
> In the slipstream we will stay
>

[-- Attachment #2: Type: text/html, Size: 3905 bytes --]

  reply	other threads:[~2018-07-19  7:29 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-03  9:21 bug: org-table-sort-lines does only case sensitive alphabetical sorting Heikki Lehvaslaiho
2018-07-04 16:16 ` Nicolas Goaziou
2018-07-12  6:58   ` Heikki Lehvaslaiho
2018-07-14  9:10     ` Nicolas Goaziou
2018-07-14 12:31       ` Sebastian Reuße
2018-07-17  6:24         ` Heikki Lehvaslaiho
2018-07-17  6:59           ` Sebastian Reuße
2018-07-19  7:29             ` Heikki Lehvaslaiho [this message]
2018-07-19 11:20               ` Sebastian Reuße

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.orgmode.org/

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

  git send-email \
    --in-reply-to='CAK=ukcaUZOUs1G1e3cMbKRr_Le-sV2hXzOY8DFJyCY+jf2YLXw@mail.gmail.com' \
    --to=heikki.lehvaslaiho@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=mail@nicolasgoaziou.fr \
    --cc=seb@wirrsal.net \
    /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/org-mode.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).