GNUAspell/aspell

Sort personal word and replacment files

Closed this issue · 2 comments

https://bugs.debian.org/900162

Date: Tue, 12 Jun 2018 12:08:23
From: Agustin Martin <agustin6martin@gmail.com>
To: aspell-devel@gnu.org
Subject: [aspell-devel] Suggestion in Debian#900162: Sorted personal word and replace files

Hi,

We have received this suggestion by Guillem Jover in the Debian
GNU/Linux BTS,

https://bugs.debian.org/900162

  The user personal word and replace files stored under
  ~/.aspell.LL.prepl and ~/.aspell.LL.pws are not internally sorted, so
  whenever there are additions the entire contents change, making big
  diffs which is annoying if you store the files under a VCS.

  It would be really nice if the contents could be stored sorted
  alphabetically for example.

Regards,

-- 
Agustin

I think I will introduce a new format where you can manually edit the file to specify that you want the order to remain stable (i.e sorted). The header might be:

personal_ws-1.2 en nosize UTF-8 sorted

and

 personal_repl-1.2 en nosize UTF-8 sorted

I decided just to sort the lists based on the internal encoding. It is not necessary alphabetically, but it is stable.