emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Patch] to correctly sort the items with emphasis marks in a list


From: Maxim Nikulin
Subject: Re: [Patch] to correctly sort the items with emphasis marks in a list
Date: Sat, 17 Apr 2021 20:27:31 +0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1

On 10/04/2021 07:01, Juan Manuel Macías wrote:
Nicolas Goaziou writes:
Could you apply the same fix to the `org-verbatim-re' match above, and
provide an appropriate commit message?

Done! I've attached the corrected patch. Sorry for the flaws in me
previous patch: I'm a bit of a novice at submitting patches...

I have not read yet the following documents to realize what pitfalls could be expected due to significant space added to Spanish and Polish collation rules in libc.

http://www.unicode.org/reports/tr10/
Unicode® Technical Standard #10
Unicode Collation Algorithm

http://www.unicode.org/reports/tr35/tr35-collation.html#CLDR_Collation_Algorithm
Unicode Technical Standard #35
Unicode Locale Data Markup Language (LDML)
Part 5: Collation

In the meanwhile I have realized that org-sort-remove-invisible function has rather strange behavior. There are no tests, so I am in doubt if the following result is expected and intended (unpatched version)

(org-sort-remove-invisible "- (*bold*)")
"-  bold "

I would expect
"- (bold)"

P.S.

On 10/04/2021 17:19, Nicolas Goaziou wrote:
>
> Do you have a simple test case to reproduce the problem? Currently
> sorting the following trivial lists causes no issue:

After the lengthy discussion the problem is traced down to the following:

- Ensure that you have *compiled* recent enough es_ES.UTF-8 locale (description includes https://sourceware.org/git/?p=glibc.git;a=blobdiff;f=localedata/locales/es_ES;h=aa919a26267fd6311b71d7aeb81655e55787b4df;hp=d17612f6726d0c098ac981e06f3702106540bb23;hb=159738548130d5ac4fe6178977e940ed5f8cfdc4;hpb=ce6636b06b67d6bb9b3d6927bf2a926b9b7478f5)
- LC_ALL= LANG=es_ES.UTF-8 emacs
- (org-sort-list t ?a) for the following snippet

- /a/
- a
- /v/
- v

Significance of space should be better illustrated with multi-word items but I am not ready to provide an impressive example yet.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]