Bug#299725: dictionaries-common: Can no longer customise case/non-case chars in Emacs
On Tue, 29 Mar 2005, Agustin Martin wrote: Please try if this works as seems to be working here. If so I will add this mention to the README.emacs file. Yes, this seems to work fine now. Why can't I just use utf8 as the encoding in debian-ispell-add-dictionary-entry, though? -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#299725: dictionaries-common: Can no longer customise case/non-case chars in Emacs
On Tue, Mar 29, 2005 at 02:25:41AM +0200, Reuben Thomas wrote: I meant that .emacs might have been erroneously saved as utf8 (that sometimes happens, e.g., that recently happened to me with a .procmailrc that tried to exclude some 128 chars combinations, and was accidentally saved a utf8, so the strings were not correct and everything was messed up) OK, that definitely DID happen with my test .emacs. I fixed it with recode, and then (to avoid switching my .emacs around all the time) put it in a file called emacs.ispell and ran emacs with That is the reason why is good to use the octal codes. Anyway, I am back to my sid box with aspell-0.60 and could finally reproduce your problem. * When the problem appears? When the aspell dict is built for a 'canonical' locale, but run from emacs implicitely using a different one. I was testing everything in my es_ES (iso-8859-1) locale and then everything matched. For that reason I could not reproduce your problem. * What is the reason for that problem? With LANG=en_GB.UTF-8 when emacs calls aspell it implicitely expects utf8 and returns utf8. emacs however thinks the dict is iso-8859-1 and sends and expects iso-8859-1. For that reason ispell-check rôle sends a iso-8859-1 string, but aspell returns an utf-8 string having what emacs thinks is a two word string and complains about Checking spelling of RÔLE... ispell-word: Ispell and its process have different character maps. or the equivalent problem you found for ispell-buffer. This happens with aspell-0.60, but not with previous versions that had no utf8 support. * How to ( quick dirty ) work around this: Set explicitely the communication encoding to the dict encoding, e.g. ; (debian-ispell-add-dictionary-entry '(british+accs [A-Z\321\324a-z\361\364] [^A-Z\321\324a-z\361\364] ['] nil (-B -d british-w_accents --encoding=iso8859-1) nil iso-8859-1) aspell) (setq ispell-dictionary-alist debian-ispell-dictionary-alist) ; --- Please try if this works as seems to be working here. If so I will add this mention to the README.emacs file. I currently see no easy way of handling it more generally, unless there is an option to aspell saying 'do not implicitely reencode after LANG' that could be appended to ispell-program-name if appropriate. But I do not see it. Another possibility might be working out some table with the charset namings equivalences and use it for aspell-0.60 to make sure the 'native' encoding is used. I have to think about this. I am cc'ing aspell maintainer to make sure he is aware of this problem. Cheers, -- Agustin
Bug#299725: dictionaries-common: Can no longer customise case/non-case chars in Emacs
On Mon, Mar 28, 2005 at 03:06:53AM +0200, Reuben Thomas wrote: * Blind guess: Was the original code filed as latin1 or utf8? What exactly do you mean? I think this may be something to do with it. I meant that .emacs might have been erroneously saved as utf8 (that sometimes happens, e.g., that recently happened to me with a .procmailrc that tried to exclude some 128 chars combinations, and was accidentally saved a utf8, so the strings were not correct and everything was messed up) I have just tried again. This time my .emacs file contained only the following: - (debian-ispell-add-dictionary-entry '(british+accs [A-Z\321\324a-z\361\364] [^A-Z\321\324a-z\361\364] ['] nil (-B -d british-w_accents) nil iso-8859-1) aspell) (setq ispell-dictionary-alist debian-ispell-dictionary-alist) -- and I tried to run ispell-buffer on a Latin1 encoded file containing (shouldn't matter what the encoding of the file is, though, should it? Emacs takes care of this...). Should not be a problem, as long as the encoding is known to emacs and can be fully converted to the ispell dict encoding (expect misalignment errors otherwise) -- rôle Local Variables: ispell-program-name: aspell ispell-local-dictionary: british+accs End: -- and it gave the error I complained about before. I am completely puzzled by this, because is working like a charm here (in a woody box, but I am sure ?? I tested it also in a sid box before Easter). Can you please add to your .emacs file (setq debian-dict-common-debug yes) and see what is the related information in the messages buffer? Some keys to what you will find there, bfcs: buffer-file-coding-system ecs: emacs coding system (mime charset of bfcs) ics: ispell dict coding system did: default Debian ispell dictionary dad: default Debian aspell dictionary ild: ispell local dictionary Here I have: did: nil dad: nil ild: british+accs bfcs: iso-latin-1-unix ecs: iso-8859-1 ics: iso-8859-1 I hope to have access tomorrow to my development sid box and retry everything again. Cheers, -- Agustin
Bug#299725: dictionaries-common: Can no longer customise case/non-case chars in Emacs
I meant that .emacs might have been erroneously saved as utf8 (that sometimes happens, e.g., that recently happened to me with a .procmailrc that tried to exclude some 128 chars combinations, and was accidentally saved a utf8, so the strings were not correct and everything was messed up) OK, that definitely DID happen with my test .emacs. I fixed it with recode, and then (to avoid switching my .emacs around all the time) put it in a file called emacs.ispell and ran emacs with emacs -q -l emacs.ispell I am completely puzzled by this, because is working like a charm here (in a woody box, but I am sure ?? I tested it also in a sid box before Easter). Can you please add to your .emacs file (setq debian-dict-common-debug yes) It says: - dictionaries d-i-d:nil d-a-d:nil i-l-d:british+accs This is the only line I can find that corresponds to the codes you mention. -- http://rrt.sc3d.org/ | The shorter the better -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#299725: dictionaries-common: Can no longer customise case/non-case chars in Emacs
* Blind guess: Was the original code filed as latin1 or utf8? What exactly do you mean? I think this may be something to do with it. I have just tried again. This time my .emacs file contained only the following: - (debian-ispell-add-dictionary-entry '(british+accs [A-Z\321\324a-z\361\364] [^A-Z\321\324a-z\361\364] ['] nil (-B -d british-w_accents) nil iso-8859-1) aspell) (setq ispell-dictionary-alist debian-ispell-dictionary-alist) -- and I tried to run ispell-buffer on a Latin1 encoded file containing (shouldn't matter what the encoding of the file is, though, should it? Emacs takes care of this...). -- rôle Local Variables: ispell-program-name: aspell ispell-local-dictionary: british+accs End: -- and it gave the error I complained about before.
Bug#299725: dictionaries-common: Can no longer customise case/non-case chars in Emacs
On Sun, Mar 20, 2005 at 11:38:17PM +0100, Reuben Thomas wrote: OK. I reactivated dictionaries-common's .el init code, added the following: (debian-ispell-add-dictionary-entry '(british+accs [A-ZÑÔa-zñô] [^A-ZÑÔa-zñô] ['] nil (-B -d british-w_accents) nil iso-8859-1) aspell) (setq ispell-dictionary-alist debian-ispell-dictionary-alist) to my .emacs, set ispell-local-dictionary to british+accs, and it doesn't work: accented characters are still treated as non-word characters (so rôle doesn't spell-check). Strange, that is working here with the sample file I copied. Furthermore, directly modifying ispell-dictionary-alist also works, as long as you do not reload ispell.el, ; --- (setq ispell-dictionary-alist (append ispell-dictionary-alist '((british+accs ; British version [A-ZÑÔa-zñô] [^A-ZÑÔa-zñô] ['] nil (-B -d british-w_accents) nil iso-8859-1 ; * Blind guess: Was the original code filed as latin1 or utf8? Try with the octal codes (I hope they are not messed), that is how the example is expected to go in the new README.emacs file. ; (debian-ispell-add-dictionary-entry '(british+accs [A-Z\321\324a-z\361\364] [^A-Z\321\324a-z\361\364] ['] nil (-B -d british-w_accents) nil iso-8859-1) aspell) ; After Easter I will take a look at the ispell-local-dictionary-alist stuff, to see how to make it work as expected. Thanks for your feedback, Cheers, -- Agustin
Bug#299725: dictionaries-common: Can no longer customise case/non-case chars in Emacs
OK. I reactivated dictionaries-common's .el init code, added the following: (debian-ispell-add-dictionary-entry '(british+accs [A-ZÑÔa-zñô] [^A-ZÑÔa-zñô] ['] nil (-B -d british-w_accents) nil iso-8859-1) aspell) (setq ispell-dictionary-alist debian-ispell-dictionary-alist) to my .emacs, set ispell-local-dictionary to british+accs, and it doesn't work: accented characters are still treated as non-word characters (so rôle doesn't spell-check). If I set ispell-local-dictionary to francais, then accented characters are accepted as expected. -- http://rrt.sc3d.org/ | wisdom, n. knowing when to be foolish
Bug#299725: dictionaries-common: Can no longer customise case/non-case chars in Emacs
On Wed, Mar 16, 2005 at 02:32:57AM +0100, Reuben Thomas wrote: Since the current version of dictionaries-common and aspell-0.60, spell checking in Emacs using aspell no longer works properly for me. Even if the problem has been triggered now, there is nothing new related to this problem in either dictionaries-common or aspell not already present for the last two years. I guess you did not notice that previously because you had no ispell dicts at all installed and all the installed aspell dicts did not register for use with the dictionaries-common system. The difference is that aspell-en now does. For that reason you were using ispell.el provided by emacs while now you are using ispell.el provided by dictionaries-common. This latter is more recent, but the system nulls the ispell-dictionary-alist provided by ispell.el and refills it with the values provided by dict maintainers, either ispell or aspell. A bit of background: I use accented characters in my British English words (as does the Oxford English Dictionary). Having looked over the new version of dictionaries-common, it seems what I need to do is add an entry to ispell-local-dictionary-alist. I erased my previous customisation of ispell-dictionary-alist, added one for ispell-local-dictionary-alist, and added accented letters to the case and non-case character classes. But words like rôle (r-ocircumflex-l-e) still get mangled: aspell flags up le as not a word, treating the ô as not a letter. ispell.el is probably buggy related to ispell-local-dictionary-alist, while it should read it everytime it gets casechars and so on, seems that it is only read at load time before reading ~/.emacs. There is a patch for that in the emacs21 CVS I was considering for adition, but in the meantime I suggest you to use in ~/.emacs the same function (debian-add-dictionary-entry) used by dictionaries-common for this, just adding ñ and ô to ths {non}-casechars entries would look like (debian-ispell-add-dictionary-entry '(british+accs [A-ZÑÔa-zñô] [^A-ZÑÔa-zñô] ['] nil (-B -d british-w_accents) nil iso-8859-1) aspell) and then feed debian-ispell-dictionary-alist to ispell-dictionary-alist, (setq ispell-dictionary-alist debian-ispell-dictionary-alist) This way something like - rôle Local Variables: ispell-program-name: aspell ispell-local-dictionary: british+accs End: - should work, even if the dict is not shown as one of the possible values in ispell-change-dictionary (it should with the current dictionaries-common unstable version, 0.24.11, but I cannot check now). If you are going to add more changes, or the unpatched ispell.el can be run sometimes, is probably better to test for function availability, (if (fboundp 'debian-ispell-add-dictionary-entry) (progn (debian-ispell-add-dictionary-entry ... ) (debian-ispell-add-dictionary-entry ... ) ) ) Using this function has the drawback that is too Debian specific, but has another advantages for the future. On the one hand it should allow the entry be shown as one of the possible values for ispell-change-dictionary (although not in the popup menus). On the other hand, the trailing aspell is currently not used, but is intended to mean that the dict is available for aspell only. In the future I would like, for systems having both ispell and aspell installed, allow an automatic selection of the spellchecker program based on the value of ispell-program-name and dict availability for that entry and spellchecker. I have promising code for this, but requires flyspell.el modification and a lot of testing. I have definitely to write something about this in the README file. That should close the bug report. Thanks for yur feedback, Cheers, -- Agustin
Bug#299725: dictionaries-common: Can no longer customise case/non-case chars in Emacs
Package: dictionaries-common Version: 0.24.10 Severity: important Since the current version of dictionaries-common and aspell-0.60, spell checking in Emacs using aspell no longer works properly for me. A bit of background: I use accented characters in my British English words (as does the Oxford English Dictionary). Having looked over the new version of dictionaries-common, it seems what I need to do is add an entry to ispell-local-dictionary-alist. I erased my previous customisation of ispell-dictionary-alist, added one for ispell-local-dictionary-alist, and added accented letters to the case and non-case character classes. But words like rle (r-ocircumflex-l-e) still get mangled: aspell flags up le as not a word, treating the as not a letter. If I run the aspell command that emacs seems to be running, namely, /usr/bin/aspell -a -m -d en_GB on the same file, it doesn't complain (rle is in my personal wordlist; the file in question is UTF-8), so I'm not sure how Emacs is calling aspell differently (perhaps the file it passes is differently encoded?). I have LANG=en_GB.UTF-8 Normally, I could get around this problem by running aspell outside Emacs, but in this case I'm editing Mac ASCII files, and am relying on Emacs to do all the right recoding so that aspell doesn't mind. It all worked fine with aspell-0.50... I do not have ispell installed; if I do apt-get install ibritish, then the command line above becomes: /usr/bin/aspell -a -m -B -d british but the results I have reported are the same (the command works outside Emacs, and spell checking doesn't work in Emacs). -- System Information: Debian Release: 3.1 APT prefers testing APT policy: (500, 'testing') Architecture: i386 (i686) Kernel: Linux 2.6.8 Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) Versions of packages dictionaries-common depends on: ii debconf 1.4.30.11 Debian configuration management sy ii perl 5.8.4-6Larry Wall's Practical Extraction -- debconf information: dictionaries-common/invalid_debconf_value: dictionaries-common/selecting_ispell_wordlist_default: * dictionaries-common/default-ispell: british (British English) shared/packages-wordlist: * dictionaries-common/default-wordlist: british (British English) shared/packages-ispell: dictionaries-common/ispell-autobuildhash-message: dictionaries-common/old_wordlist_link: true dictionaries-common/languages: ~manual~ (I set symlinks manually) dictionaries-common/move_old_usr_dict: true dictionaries-common/remove_old_usr_dict_link: false -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]